Skip to content

Commit 46fde3b

Browse files
authored
fix readme
1 parent 97d92bd commit 46fde3b

File tree

1 file changed

+4
-26
lines changed

1 file changed

+4
-26
lines changed

examples/app/README.md

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -39,31 +39,9 @@ After changing the structure of your database schema, for instance by adding
3939
new tables or altering columns, you need to write a migration to ensure that
4040
existing users of your app can convert their database to the latest version.
4141

42-
Drift contains [builtin APIs](https://drift.simonbinder.eu/docs/advanced-features/migrations/)
43-
for common migrations.
44-
Also, it includes builtin tools to verify that migrations are doing what they're
45-
supposed to do.
42+
Run the following command to save the new schema and generate a step-by-step migration helper for
43+
this schema.
4644

47-
To write such tests, run the following command after making schema changes and
48-
incrementing your schema version. It will export the current schema of the
49-
database as a JSON file. You should check those generated files into source control.
50-
51-
```
52-
dart run drift_dev schema dump lib/database/database.dart drift_schemas/
53-
```
54-
55-
Then, run the following command to automatically generate test utilities which
56-
you can use to write unit tests for schema migrations:
57-
58-
```
59-
dart run drift_dev schema generate drift_schemas/ test/generated_migrations/
6045
```
61-
62-
To make migrations easier, this command updates the `lib/database/schema_versions.dart`
63-
file containing snapshots of older database schema:
64-
65-
```
66-
dart run drift_dev schema steps drift_schemas/ lib/database/schema_versions.dart
67-
```
68-
69-
An example for a schema test is in `test/migration_test.dart`.
46+
dart run drift_dev make-migration
47+
```

0 commit comments

Comments
 (0)