mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-04 20:30:35 +00:00
Fixed db create issue
This commit is contained in:
parent
525facc538
commit
210606306a
2 changed files with 2 additions and 2 deletions
|
@ -176,7 +176,7 @@ class ServersProvider with ChangeNotifier {
|
|||
final result = await client!.checkServerUpdates();
|
||||
if (result['result'] == 'success') {
|
||||
UpdateAvailableData data = UpdateAvailableData.fromJson(result['data']);
|
||||
final gitHubResult = await client!.getUpdateChangelog(releaseTag: data.newVersion ?? data.currentVersion);
|
||||
final gitHubResult = await client.getUpdateChangelog(releaseTag: data.newVersion ?? data.currentVersion);
|
||||
if (gitHubResult['result'] == 'success') {
|
||||
data.changelog = gitHubResult['body'];
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ Future<Map<String, dynamic>> loadDb(bool acceptsDynamicTheme) async {
|
|||
onCreate: (Database db, int version) async {
|
||||
await db.execute("CREATE TABLE servers (id TEXT PRIMARY KEY, name TEXT, connectionMethod TEXT, domain TEXT, path TEXT, port INTEGER, user TEXT, password TEXT, defaultServer INTEGER, authToken TEXT, runningOnHa INTEGER)");
|
||||
await db.execute("CREATE TABLE appConfig (theme NUMERIC, overrideSslCheck NUMERIC, hideZeroValues NUMERIC, useDynamicColor NUMERIC, staticColor NUMERIC, useThemeColorForStatus NUMERIC, showTimeLogs NUMERIC, showIpLogs NUMERIC, combinedChart NUMERIC, doNotRememberVersion TEXT, hideServerAddress NUMERIC, homeTopItemsOrder TEXT)");
|
||||
await db.execute("INSERT INTO appConfig (theme, overrideSslCheck, hideZeroValues, useDynamicColor, staticColor, useThemeColorForStatus, showTimeLogs, showIpLogs, combinedChart, hideServerAddress, homeTopItemsOrder) VALUES (0, 0, 0, ${acceptsDynamicTheme == true ? 1 : 0}, 0, 0, 0, 0, 0, 0, $homeTopItemsDefaultOrderString)");
|
||||
await db.execute("INSERT INTO appConfig (theme, overrideSslCheck, hideZeroValues, useDynamicColor, staticColor, useThemeColorForStatus, showTimeLogs, showIpLogs, combinedChart, hideServerAddress, homeTopItemsOrder) VALUES (0, 0, 0, ${acceptsDynamicTheme == true ? 1 : 0}, 0, 0, 0, 0, 0, 0, '$homeTopItemsDefaultOrderString')");
|
||||
},
|
||||
onUpgrade: (Database db, int oldVersion, int newVersion) async {
|
||||
if (oldVersion == 1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue