From 4325c145ce5767e6ee494be24d2ed012cc6f3fec Mon Sep 17 00:00:00 2001 From: Isaias Tavares Date: Wed, 4 Nov 2026 22:54:14 -0300 Subject: [PATCH] feat(db): cut the Postgres baseline at the newest migration The two migrations that landed on dev since the cut were written for SQLite: the longitude wrap subtracts a comparison from an integer, which Postgres refuses. No Postgres database exists yet, so the baseline now stands for both, and a new Postgres install starts with Journey and Collections on, as a new SQLite one does. --- server/assets/postgres/baseline.json | 6 ++++-- server/assets/postgres/baseline.sql | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/server/assets/postgres/baseline.json b/server/assets/postgres/baseline.json index a04af67fd..12dddea08 100644 --- a/server/assets/postgres/baseline.json +++ b/server/assets/postgres/baseline.json @@ -1,5 +1,5 @@ { - "through": "Migration20200101046340_a_released_object_outlasts_every_undo_before_it_goes", + "through": "Migration20200101046360_a_new_install_starts_with_more_addons_on", "migrations": [ "Migration20200101000000_baseline_schema", "Migration20200101000100_users_add_unsplash_api_key", @@ -331,6 +331,8 @@ "Migration20200101046310_an_admin_can_run_a_plugin_outside_its_trek_range", "Migration20200101046320_a_place_knows_where_its_details_came_from", "Migration20200101046330_an_object_no_row_names_is_marked_before_it_goes", - "Migration20200101046340_a_released_object_outlasts_every_undo_before_it_goes" + "Migration20200101046340_a_released_object_outlasts_every_undo_before_it_goes", + "Migration20200101046350_a_place_lies_on_the_real_world", + "Migration20200101046360_a_new_install_starts_with_more_addons_on" ] } diff --git a/server/assets/postgres/baseline.sql b/server/assets/postgres/baseline.sql index 843db56d3..97eabc300 100644 --- a/server/assets/postgres/baseline.sql +++ b/server/assets/postgres/baseline.sql @@ -801,7 +801,7 @@ alter table "wanderer_connections" add constraint "wanderer_connections_user_id_ alter table "webauthn_challenges" add constraint "webauthn_challenges_user_id_foreign" foreign key ("user_id") references "users" ("id") on delete cascade; alter table "webauthn_credentials" add constraint "webauthn_credentials_user_id_foreign" foreign key ("user_id") references "users" ("id") on delete cascade; insert into "app_settings" ("key", "value") values ('app_version', '3.0.15'), ('places_photos_enabled', 'true'), ('places_autocomplete_enabled', 'true'), ('places_details_enabled', 'true'); -insert into "addons" ("id", "name", "description", "type", "icon", "enabled", "config", "sort_order") values ('collab', 'Collab', 'Notes, polls, and live chat for trip collaboration', 'trip', 'Users', '1', '{}', '6'), ('memories', 'Photos', NULL, 'trip', 'Image', '0', '{}', '7'), ('mcp', 'MCP', 'Model Context Protocol for AI assistant integration', 'integration', 'Terminal', '0', '{}', '12'), ('naver_list_import', 'Naver List Import', 'Import places from shared Naver Maps lists', 'integration', 'Link2', '1', '{}', '13'), ('journey', 'Journey', 'Trip tracking & travel journal — check-ins, photos, daily stories', 'global', 'Compass', '0', '{}', '35'), ('airtrail', 'AirTrail', 'Sync flights from your self-hosted AirTrail instance', 'integration', 'Plane', '0', '{}', '14'), ('collections', 'Collections', 'Personal place library — save places across trips into named lists, copy into any trip, share with others', 'global', 'Bookmark', '0', '{}', '16'); +insert into "addons" ("id", "name", "description", "type", "icon", "enabled", "config", "sort_order") values ('collab', 'Collab', 'Notes, polls, and live chat for trip collaboration', 'trip', 'Users', '1', '{}', '6'), ('memories', 'Photos', NULL, 'trip', 'Image', '0', '{}', '7'), ('mcp', 'MCP', 'Model Context Protocol for AI assistant integration', 'integration', 'Terminal', '0', '{}', '12'), ('naver_list_import', 'Naver List Import', 'Import places from shared Naver Maps lists', 'integration', 'Link2', '1', '{}', '13'), ('journey', 'Journey', 'Trip tracking & travel journal — check-ins, photos, daily stories', 'global', 'Compass', '1', '{}', '35'), ('airtrail', 'AirTrail', 'Sync flights from your self-hosted AirTrail instance', 'integration', 'Plane', '0', '{}', '14'), ('collections', 'Collections', 'Personal place library — save places across trips into named lists, copy into any trip, share with others', 'global', 'Bookmark', '1', '{}', '16'); insert into "photo_providers" ("id", "name", "description", "icon", "enabled", "sort_order") values ('synologyphotos', 'Synology Photos', 'Synology Photos integration with separate account settings', 'Image', '0', '1'); insert into "photo_provider_fields" ("id", "provider_id", "field_key", "label", "input_type", "placeholder", "hint", "required", "secret", "settings_key", "payload_key", "sort_order") values ('1', 'synologyphotos', 'synology_url', 'providerUrl', 'url', 'https://synology.example.com', 'providerUrlHintSynology', '1', '0', 'synology_url', 'synology_url', '0'), ('2', 'synologyphotos', 'synology_username', 'providerUsername', 'text', 'Username', NULL, '1', '0', 'synology_username', 'synology_username', '1'), ('3', 'synologyphotos', 'synology_password', 'providerPassword', 'password', 'Password', NULL, '1', '1', NULL, 'synology_password', '2'), ('4', 'synologyphotos', 'synology_otp', 'providerOTP', 'text', '123456', NULL, '0', '0', NULL, 'synology_otp', '3'), ('5', 'synologyphotos', 'synology_skip_ssl', 'skipSSLVerification', 'checkbox', NULL, NULL, '0', '0', 'synology_skip_ssl', 'synology_skip_ssl', '4'); select setval(seq, greatest(max_id, 1)) from (select pg_get_serial_sequence('"photo_provider_fields"', 'id') as seq, max("id") as max_id from "photo_provider_fields") ids where seq is not null;