Skip to main content

migrate

Function migrate 

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

Idempotent migration runner.

Re-runs bootstrap() (all DDL uses CREATE … IF NOT EXISTS so existing tables/columns are left intact), then stamps the current schema version. Safe to call on databases created by any prior version of AgentDB.

In addition to adding new tables, this applies additive ALTER TABLE … ADD COLUMN statements for columns introduced in later schema versions. SQLite ignores duplicate columns via IF NOT EXISTS semantics.