diff options
author | 2023-05-24 06:57:50 +0530 | |
---|---|---|
committer | 2023-05-24 16:40:43 +0530 | |
commit | e245b4fa229bee1e2ab97fcb42de3831b8bdbe5b (patch) | |
tree | d684777b3fde5470c9f99304a9f022422ffb8045 /src/internal-server/start | |
parent | 6.3.0-nightly.9 [skip ci] (diff) | |
download | ferdium-app-e245b4fa229bee1e2ab97fcb42de3831b8bdbe5b.tar.gz ferdium-app-e245b4fa229bee1e2ab97fcb42de3831b8bdbe5b.tar.zst ferdium-app-e245b4fa229bee1e2ab97fcb42de3831b8bdbe5b.zip |
Upgrade npm modules
Diffstat (limited to 'src/internal-server/start')
-rw-r--r-- | src/internal-server/start/migrate.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/internal-server/start/migrate.js b/src/internal-server/start/migrate.js index 0af33a977..4cd502c3f 100644 --- a/src/internal-server/start/migrate.js +++ b/src/internal-server/start/migrate.js | |||
@@ -21,13 +21,13 @@ module.exports = async () => { | |||
21 | 21 | ||
22 | const user = await User.find(1); | 22 | const user = await User.find(1); |
23 | let settings; | 23 | let settings; |
24 | if (!user) { | 24 | if (user) { |
25 | settings = convertToJSON(user.settings); | ||
26 | } else { | ||
25 | migrateLog("🎩 Migrating from old Ferdium version as user doesn't exist"); | 27 | migrateLog("🎩 Migrating from old Ferdium version as user doesn't exist"); |
26 | 28 | ||
27 | // Create new user | 29 | // Create new user |
28 | await Database.raw('INSERT INTO "users" ("id") VALUES (\'1\');'); | 30 | await Database.raw('INSERT INTO "users" ("id") VALUES (\'1\');'); |
29 | } else { | ||
30 | settings = convertToJSON(user.settings); | ||
31 | } | 31 | } |
32 | 32 | ||
33 | if ( | 33 | if ( |