Skip to main content

create_apply_state_schemas

Function create_apply_state_schemas 

Source
pub(super) async fn create_apply_state_schemas(
    client: &Client,
    deploy_id: &str,
) -> Result<(), ConnectionError>
Expand description

Create apply state schemas with comments for tracking apply progress.

Creates two schemas in _mz_deploy:

  • apply_<deploy_id>_pre with comment ‘swapped=false’
  • apply_<deploy_id>_post with comment ‘swapped=true’

The schemas are created first (if they don’t exist), then comments are set (if they don’t have comments). During the swap transaction, the schemas exchange names, which effectively moves the ‘swapped=true’ comment to the _pre schema.