Skip to main content

migration_sql

Function migration_sql 

Source
pub fn migration_sql(schema: &str) -> String
Expand description

The statements that create bb_workflow_instances and bb_workflow_steps in schema, fence them by company_id with row-level security. The outbox and inbox tables the engine stages events in and dedups resumes with are backbone_core::write_hooks::migrate_outbox‘s (a module that stages events runs it already). Run it as the table owner. Not idempotent for the policies’ sake: run it once, as a migration does; drop_and_create_policies is for a test that re-creates them.

§Panics

On a schema that is not a plain lowercase identifier.