Adjust joplin migration repair timestamp

This commit is contained in:
Alexandre
2025-12-28 23:31:15 +01:00
parent 77b01d9491
commit 9d052e7eb3
2 changed files with 3 additions and 3 deletions

View File

@@ -104,5 +104,5 @@ schema:
slug: joplin slug: joplin
udev: true udev: true
url: https://github.com/alexbelgium/hassio-addons url: https://github.com/alexbelgium/hassio-addons
version: 3.5.2-2 version: 3.5.2-3
webui: "[PROTO:ssl]://[HOST]:[PORT:22300]" webui: "[PROTO:ssl]://[HOST]:[PORT:22300]"

View File

@@ -71,7 +71,7 @@ repair_notifications_migration_sqlite() {
INSERT INTO knex_migrations(name, batch, migration_time) INSERT INTO knex_migrations(name, batch, migration_time)
VALUES ('20203012152842_notifications.js', VALUES ('20203012152842_notifications.js',
COALESCE((SELECT MAX(batch) FROM knex_migrations), 1), COALESCE((SELECT MAX(batch) FROM knex_migrations), 1),
CAST(strftime('%s','now') AS INTEGER) * 1000 CURRENT_TIMESTAMP
); );
" >/dev/null 2>&1 || bashio::log.warning "Failed to repair notifications migration entry." " >/dev/null 2>&1 || bashio::log.warning "Failed to repair notifications migration entry."
} }
@@ -147,7 +147,7 @@ repair_notifications_migration_postgres() {
"INSERT INTO knex_migrations(name, batch, migration_time) "INSERT INTO knex_migrations(name, batch, migration_time)
SELECT '20203012152842_notifications.js', SELECT '20203012152842_notifications.js',
COALESCE(MAX(batch), 1), COALESCE(MAX(batch), 1),
(EXTRACT(EPOCH FROM NOW()) * 1000)::bigint NOW()
FROM knex_migrations FROM knex_migrations
WHERE NOT EXISTS ( WHERE NOT EXISTS (
SELECT 1 FROM knex_migrations WHERE name='20203012152842_notifications.js' SELECT 1 FROM knex_migrations WHERE name='20203012152842_notifications.js'