pub(crate) async fn create_phase(
client: &Client,
profile_name: &str,
project_name: &str,
in_project_databases: &BTreeSet<String>,
dirty_schemas: &BTreeSet<SchemaQualifier>,
overlay_objects: &[ObjectRef<'_>],
target_cluster: &str,
) -> Result<(), CliError>Expand description
Phase 2 of the dev rebuild: create overlay databases, schemas, and objects.
Per dirty schema we issue CREATE DATABASE IF NOT EXISTS <overlay_db>,
insert a manifest row (so drop_phase can always reach it even if we crash
mid-run), then CREATE SCHEMA IF NOT EXISTS. Objects are emitted in
dependency order with references rewritten through OverlayTransformer
and every IN CLUSTER clause rewritten to target_cluster.