mirror of https://github.com/AMT-Cheif/drift.git
fad654a5aa
Support PostgreSQL as a dialect in the main package and with an implementation provided in another package. Co-authored-by: Simon Binder <oss@simonbinder.eu> |
||
---|---|---|
.. | ||
drift_migrations | ||
lib | ||
test | ||
README.md | ||
analysis_options.yaml | ||
build.yaml | ||
pubspec.yaml |
README.md
Example to demonstrate tests for schema migrations.
See test/migration_test.dart
on how to use the generated verification code.
Workflow
Schema changes
After adapting a schema and incrementing the schemaVersion
in the database, run
dart run drift_dev schema dump lib/database.dart moor_migrations/moor_schema_v2.json
Replace _v2
with the current schemaVersion
.
Generating test code
Run
dart run drift_dev schema generate moor_migrations/ test/generated/ --data-classes --companions