diff options
| author | Pitu <[email protected]> | 2020-05-10 21:12:30 +0900 |
|---|---|---|
| committer | Pitu <[email protected]> | 2020-05-10 21:12:30 +0900 |
| commit | 1836c8c93a60c9dc0f86859bcfd6ef497c6f7dcd (patch) | |
| tree | 9044aa01954c7a1b62de46c95d4f42909a324fc3 /src/api/databaseMigration.js | |
| parent | Features: (diff) | |
| download | host.fuwn.me-1836c8c93a60c9dc0f86859bcfd6ef497c6f7dcd.tar.xz host.fuwn.me-1836c8c93a60c9dc0f86859bcfd6ef497c6f7dcd.zip | |
Small fix for migration script, dont import deleted albums
Diffstat (limited to 'src/api/databaseMigration.js')
| -rw-r--r-- | src/api/databaseMigration.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/api/databaseMigration.js b/src/api/databaseMigration.js index 253ccbd..75611f3 100644 --- a/src/api/databaseMigration.js +++ b/src/api/databaseMigration.js @@ -63,6 +63,7 @@ const start = async () => { const albums = await oldDb.table('albums'); for (const album of albums) { + if (!album.enabled || album.enabled == 0) continue; const now = moment.utc().toDate(); const albumToInsert = { id: album.id, @@ -77,7 +78,7 @@ const start = async () => { albumId: album.id, identifier: album.identifier, views: 0, - enabled: album.enabled == 1 ? true : false, + enabled: true, enableDownload: true, createdAt: now, editedAt: now |