UNPKG

@accounter/server

Version:
19 lines (18 loc) 932 B
/** * Fix allow_bootstrap_root on financial_entities: * The FOR INSERT-only policy has no USING clause, so it doesn't help with SELECT visibility * and (unexpectedly) doesn't OR correctly with tenant_isolation FOR ALL's WITH CHECK in practice. * Replacing with FOR ALL + USING so the bootstrap entity is visible AND insertable. * * WITH CHECK allows: * - id = current_business_id (root entity insert with owner_id=NULL) * - owner_id = current_business_id (normal tenant rows) */ declare const _default: { name: string; run: ({ sql }: { sql: (template: TemplateStringsArray, ...values: import("@slonik/sql-tag").ValueExpression[]) => import("slonik").QuerySqlToken; connection: import("slonik").DatabaseTransactionConnection | import("slonik").DatabasePool; }) => import("slonik").QuerySqlToken<import("@standard-schema/spec").StandardSchemaV1<unknown, unknown>>; }; export default _default;