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

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.


A snapshot of a database schema at a previous version.
A drift table implementation that, instead of being generated, is constructed from individual fields
A constructed from individual fields instead of being generated with a dedicated class.
The version of VersionedTable for virtual tables.


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 the database.