Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

fixing migrations

Marek Maslowski5b25c60b6288
diff --git a/server/src/db/migrations.ts b/server/src/db/migrations.ts
index aee415e2f..fd0be24d9 100644
--- a/server/src/db/migrations.ts
+++ b/server/src/db/migrations.ts
@@ -692,6 +692,18 @@ function runMigrations(db: Database.Database): void {
db.exec('ALTER TABLE photo_providers DROP COLUMN config');
},
+ () => {
+ db.exec('ALTER TABLE `trip_photos` RENAME COLUMN immich_asset_id TO asset_id');
+ },
+ () => {
+ db.exec('ALTER TABLE `trip_photos` ADD COLUMN provider TEXT NOT NULL DEFAULT "immich"');
+ },
+ () => {
+ db.exec('ALTER TABLE `trip_album_links` ADD COLUMN provider TEXT NOT NULL DEFAULT "immich"');
+ },
+ () => {
+ db.exec('ALTER TABLE `trip_album_links` RENAME COLUMN immich_album_id TO album_id');
+ },
];
if (currentVersion < migrations.length) {