mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-12-05 23:19:42 +00:00
chore: ignore DB queries in migrations
This commit is contained in:
parent
4fae9013a7
commit
cab09e00ce
@ -19,6 +19,7 @@ import 'package:spotube/services/kv_store/kv_store.dart';
|
|||||||
import 'package:flutter/widgets.dart' hide Table, Key, View;
|
import 'package:flutter/widgets.dart' hide Table, Key, View;
|
||||||
import 'package:spotube/modules/settings/color_scheme_picker_dialog.dart';
|
import 'package:spotube/modules/settings/color_scheme_picker_dialog.dart';
|
||||||
import 'package:drift/native.dart';
|
import 'package:drift/native.dart';
|
||||||
|
import 'package:spotube/services/logger/logger.dart';
|
||||||
import 'package:spotube/services/youtube_engine/newpipe_engine.dart';
|
import 'package:spotube/services/youtube_engine/newpipe_engine.dart';
|
||||||
import 'package:spotube/services/youtube_engine/youtube_explode_engine.dart';
|
import 'package:spotube/services/youtube_engine/youtube_explode_engine.dart';
|
||||||
import 'package:spotube/services/youtube_engine/yt_dlp_engine.dart';
|
import 'package:spotube/services/youtube_engine/yt_dlp_engine.dart';
|
||||||
@ -200,26 +201,41 @@ class AppDatabase extends _$AppDatabase {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
from8To9: (m, schema) async {
|
from8To9: (m, schema) async {
|
||||||
await m.renameTable(schema.pluginsTable, "metadata_plugins_table");
|
await m
|
||||||
await m.renameColumn(
|
.renameTable(schema.pluginsTable, "metadata_plugins_table")
|
||||||
schema.pluginsTable,
|
.catchError((e, stack) => AppLogger.reportError(e, stack));
|
||||||
"selected",
|
await m
|
||||||
pluginsTable.selectedForMetadata,
|
.renameColumn(
|
||||||
);
|
schema.pluginsTable,
|
||||||
await m.addColumn(
|
"selected",
|
||||||
schema.pluginsTable,
|
pluginsTable.selectedForMetadata,
|
||||||
pluginsTable.selectedForAudioSource,
|
)
|
||||||
);
|
.catchError((e, stack) => AppLogger.reportError(e, stack));
|
||||||
|
await m
|
||||||
|
.addColumn(
|
||||||
|
schema.pluginsTable,
|
||||||
|
pluginsTable.selectedForAudioSource,
|
||||||
|
)
|
||||||
|
.catchError((e, stack) => AppLogger.reportError(e, stack));
|
||||||
},
|
},
|
||||||
from9To10: (m, schema) async {
|
from9To10: (m, schema) async {
|
||||||
await m.dropColumn(schema.preferencesTable, "piped_instance");
|
await m
|
||||||
await m.dropColumn(schema.preferencesTable, "invidious_instance");
|
.dropColumn(schema.preferencesTable, "piped_instance")
|
||||||
await m.addColumn(
|
.catchError((e, stack) => AppLogger.reportError(e, stack));
|
||||||
schema.sourceMatchTable,
|
await m
|
||||||
sourceMatchTable.sourceInfo,
|
.dropColumn(schema.preferencesTable, "invidious_instance")
|
||||||
);
|
.catchError((e, stack) => AppLogger.reportError(e, stack));
|
||||||
await customStatement("DROP INDEX IF EXISTS uniq_track_match;");
|
await m
|
||||||
await m.dropColumn(schema.sourceMatchTable, "source_id");
|
.addColumn(
|
||||||
|
schema.sourceMatchTable,
|
||||||
|
sourceMatchTable.sourceInfo,
|
||||||
|
)
|
||||||
|
.catchError((e, stack) => AppLogger.reportError(e, stack));
|
||||||
|
await customStatement("DROP INDEX IF EXISTS uniq_track_match;")
|
||||||
|
.catchError((e, stack) => AppLogger.reportError(e, stack));
|
||||||
|
await m
|
||||||
|
.dropColumn(schema.sourceMatchTable, "source_id")
|
||||||
|
.catchError((e, stack) => AppLogger.reportError(e, stack));
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user