export function applyTransactionStateSchema(args) {
    args.engine.sqlite.exec(`
  CREATE TABLE IF NOT EXISTS lix_internal_transaction_state (
    id TEXT PRIMARY KEY DEFAULT (lix_uuid_v7()),
    entity_id TEXT NOT NULL,
    schema_key TEXT NOT NULL,
    schema_version TEXT NOT NULL,
    file_id TEXT NOT NULL,
    plugin_key TEXT NOT NULL,
    version_id TEXT NOT NULL,
    writer_key TEXT NULL,
    snapshot_content BLOB,
    metadata BLOB,
    created_at TEXT NOT NULL,
    untracked INTEGER NOT NULL DEFAULT 0,
    UNIQUE(entity_id, file_id, schema_key, version_id)
  ) STRICT;

  CREATE INDEX IF NOT EXISTS ix_txn_v_f_s_e
    ON lix_internal_transaction_state(version_id, file_id, schema_key, entity_id);
`);
}
// Kysely typing for the new view with lixcol_* naming
// No separate view – the table above is the source of truth.
//# sourceMappingURL=schema.js.map