internal/versioned_schema library
Defines base classes to generate lightweight tables and views. This library
is used by code generated via drift_dev schema steps
to generate snapshots
of every schema version of your database without much overhead.
For more information on how to use that feature, see https://drift.simonbinder.eu/docs/advanced-features/migrations/#step-by-step
Warning: This library is not meant to be imported into user-written code, and classes defined in this library are not part of drift's stable API.
Classes
- VersionedSchema
- A snapshot of a database schema at a previous version.
- VersionedTable
- A drift table implementation that, instead of being generated, is constructed from individual fields
- VersionedView
- A constructed from individual fields instead of being generated with a dedicated class.
- VersionedVirtualTable
- The version of VersionedTable for virtual tables.
Typedefs
-
MigrationStepWithVersion
= Future<
int> Function(int currentVersion, GeneratedDatabase database) -
Signature of a function, typically generated by drift, that runs a single
migration step with a given
currentVersion
and thedatabase
.