mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-26 18:57:25 +01:00
Enable foreign key support
This commit is contained in:
parent
4994f6395f
commit
71d51596ae
1 changed files with 7 additions and 0 deletions
|
|
@ -29,6 +29,13 @@ class Database extends _$Database {
|
||||||
@override
|
@override
|
||||||
int get schemaVersion => 1;
|
int get schemaVersion => 1;
|
||||||
|
|
||||||
|
@override
|
||||||
|
MigrationStrategy get migration => MigrationStrategy(
|
||||||
|
beforeOpen: (details) async {
|
||||||
|
await customStatement('PRAGMA foreign_keys = ON');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
// TODO: Remove this once https://github.com/simolus3/moor/issues/453 is fixed.
|
// TODO: Remove this once https://github.com/simolus3/moor/issues/453 is fixed.
|
||||||
Selectable<Work> worksByComposer(int id) {
|
Selectable<Work> worksByComposer(int id) {
|
||||||
return customSelectQuery(
|
return customSelectQuery(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue