Reads PostgreSQL, SQLite and MySQL table, column and uniqueness metadata.
Ithibati.Migration and Ithibati.Doctor use these queries to apply the same checks during
migration and setup diagnosis. Functions receive the repo explicitly; table lookup also takes
a PostgreSQL schema prefix. SQLite uses the unprefixed main database; MySQL uses the repo's
selected database without schema prefixes.
Summary
Functions
Returns {database_type, unique?} for a column, or nil if it does not exist.
Returns {:ok, description} when the column meets the configured account-key requirements.
Returns the table name, qualified with prefix when one is supplied, for diagnostic text.
Returns an opaque table reference, or nil when the table is absent.
Database column types compatible with a supported Ecto storage type.
Functions
Returns {database_type, unique?} for a column, or nil if it does not exist.
Domains resolve to their underlying type. unique? requires a non-partial unique index whose
only key column is this column. Additional included columns are allowed; for example,
PRIMARY KEY (id) INCLUDE (email) qualifies.
Returns {:ok, description} when the column meets the configured account-key requirements.
Returns {:error, description} for a missing column, an incompatible database type or missing
uniqueness. Both migration and doctor checks use this result so they agree on the schema
Ithibati can reference.
Returns the table name, qualified with prefix when one is supplied, for diagnostic text.
Returns an opaque table reference, or nil when the table is absent.
Database column types compatible with a supported Ecto storage type.