Skip to main content

bootstrap

Function bootstrap 

Source
pub fn bootstrap(conn: &Connection) -> Result<()>
Expand description

Apply the schema (CREATE TABLE/INDEX IF NOT EXISTS) and run forward migrations from older versions. Idempotent on a v3 database.

Order matters: when an older schema is detected we run the column additions FIRST so that the v3 SCHEMA_SQL — which references the new columns in CREATE INDEX statements — can be applied as a no-op idempotent layer afterwards.