schema_model library
Physical table, column, key, index, and constraint metadata.
TableSchema and Column describe storage independently of Dart row models, generated clients, and live connections. They can be assembled directly for schema tooling or consumed from generated Dart snapshots.
Collection inputs to TableSchema are copied into immutable lists. Creating metadata does not apply DDL: migration tooling validates the target engine and executes reviewed schema changes separately.
Use package:orm/schema.dart for application model declarations.
Classes
- CheckSchema
- A row CHECK expression. A null name leaves naming to the database.
-
Column<
T> - Physical column metadata coupled to the Dart/storage Codec.
- ComputedColumn
- Database-computed SQL using physical column names.
- ForeignKey
- A database foreign key described with ordered physical column names.
- IndexSchema
- A simple index over ordered physical columns.
- TableSchema
- Immutable physical table metadata, independent of Dart model identity.
Enums
- ComputedStorage
- How a database maintains a computed column, subject to engine capabilities.