Small fix for migration script, dont import deleted albums
This commit is contained in:
parent
4c52932426
commit
1836c8c93a
|
@ -63,6 +63,7 @@ const start = async () => {
|
||||||
|
|
||||||
const albums = await oldDb.table('albums');
|
const albums = await oldDb.table('albums');
|
||||||
for (const album of albums) {
|
for (const album of albums) {
|
||||||
|
if (!album.enabled || album.enabled == 0) continue;
|
||||||
const now = moment.utc().toDate();
|
const now = moment.utc().toDate();
|
||||||
const albumToInsert = {
|
const albumToInsert = {
|
||||||
id: album.id,
|
id: album.id,
|
||||||
|
@ -77,7 +78,7 @@ const start = async () => {
|
||||||
albumId: album.id,
|
albumId: album.id,
|
||||||
identifier: album.identifier,
|
identifier: album.identifier,
|
||||||
views: 0,
|
views: 0,
|
||||||
enabled: album.enabled == 1 ? true : false,
|
enabled: true,
|
||||||
enableDownload: true,
|
enableDownload: true,
|
||||||
createdAt: now,
|
createdAt: now,
|
||||||
editedAt: now
|
editedAt: now
|
||||||
|
|
Loading…
Reference in New Issue