uqa-storage-sqlite 0.3.6

SQLite catalog, indexes, compressed storage, graph and key/value providers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//
// Unified Query Algebra
//
// Copyright (c) 2023-2026 Cognica, Inc.
//

//! Persist ordinary table role ownership.

use super::super::super::{Catalog, Result};

pub(super) fn migrate(tx: &rusqlite::Connection) -> Result<()> {
    let columns = Catalog::table_columns(tx, "_tables")?.unwrap_or_default();
    if !columns.contains_key("role_owner") {
        tx.execute_batch("ALTER TABLE _tables ADD COLUMN role_owner TEXT NOT NULL DEFAULT 'uqa';")?;
    }
    Ok(())
}