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.

Merge branch 'feat/system-notices' into dev

Julien G.d80bbd5bedf9
diff --cc server/src/app.ts
index 8f590b721,34266f3d0..679e43f7e
--- a/server/src/app.ts
+++ b/server/src/app.ts
@@@ -45,7 -46,8 +46,9 @@@ import systemNoticesRoutes from './rout
import { mcpHandler } from './mcp';
import { Addon } from './types';
import { getPhotoProviderConfig } from './services/memories/helpersService';
+import { getCollabFeatures } from './services/adminService';
+ import { isAddonEnabled } from './services/adminService';
+ import { ADDON_IDS } from './addons';
export function createApp(): express.Application {
const app = express();
diff --cc server/src/db/migrations.ts
index 3b02bfe14,4eddc78da..e089da7b1
--- a/server/src/db/migrations.ts
+++ b/server/src/db/migrations.ts
@@@ -1605,15 -1605,19 +1605,28 @@@ function runMigrations(db: Database.Dat
CREATE INDEX IF NOT EXISTS idx_idempotency_keys_created ON idempotency_keys(created_at);
`);
},
- // Migration 101: System notices — user tracking columns + dismissals table
+
+ // Migration 101: Enable naver_list_import by default
+ () => {
+ db.prepare("UPDATE addons SET enabled = 1 WHERE id = 'naver_list_import'").run();
+ },
+
+ // Migration 102: Add check_in_end column for check-in time ranges
+ () => {
+ try { db.exec('ALTER TABLE day_accommodations ADD COLUMN check_in_end TEXT'); } catch (err: any) { if (!err.message?.includes('duplicate column name')) throw err; }
++ // Migration 103: System notices — user tracking columns + dismissals table
+ () => {
+ db.exec(`ALTER TABLE users ADD COLUMN first_seen_version TEXT NOT NULL DEFAULT '0.0.0'`);
+ db.exec(`ALTER TABLE users ADD COLUMN login_count INTEGER NOT NULL DEFAULT 0`);
+ db.exec(`
+ CREATE TABLE IF NOT EXISTS user_notice_dismissals (
+ user_id INTEGER NOT NULL,
+ notice_id TEXT NOT NULL,
+ dismissed_at INTEGER NOT NULL,
+ PRIMARY KEY (user_id, notice_id),
+ FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
+ )
+ `);
},
];