Prostore::Drift::SchemaTable
CRUD for the prostore_schema bookkeeping table (ADR-0010).
The metadata used to live in a single definition JSON column. As of
internal schema version 2 it is promoted to typed columns; only the
three small identifier arrays (index columns, FK source/target columns)
remain JSON-encoded because neither SQLite nor Postgres expose a
portable native array type that fits a single-table layout.
All operations run on a caller-supplied executor (DB::Database, DB::Connection, or DB::Transaction).
Constants
COLUMNS = ["table_name", "kind", "tag", "current_name", "portable_type", "nullable", "is_primary", "auto_increment", "has_default", "default_sql", "has_backfill", "backfill_sql", "has_lazy", "enum_members", "enum_is_flags", "index_columns", "index_unique", "index_where_sql", "fk_columns", "fk_references_table", "fk_references_columns", "fk_on_delete", "fk_on_update"] of ::String
KIND_COLUMN = "column"
KIND_FOREIGN_KEY = "foreign_key"
KIND_INDEX = "index"
Instance methods
delete(adapter : Prostore::Adapter::Base, executor : Prostore::Adapter::Base::Executor, table : String, kind : String, tag : Int32) : Nil
Sourcefor_table(adapter : Prostore::Adapter::Base, executor : Prostore::Adapter::Base::Executor, table : String) : Array(Row)
Sourceupsert_field(adapter : Prostore::Adapter::Base, executor : Prostore::Adapter::Base::Executor, table : String, field : Schema::Field) : Nil
Sourceupsert_foreign_key(adapter : Prostore::Adapter::Base, executor : Prostore::Adapter::Base::Executor, table : String, fk : Schema::ForeignKey) : Nil
Sourceupsert_index(adapter : Prostore::Adapter::Base, executor : Prostore::Adapter::Base::Executor, table : String, index : Schema::Index) : Nil
Source