From 82f5d0c756cfffe02418e3c9109059e4bda7d8d5 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Fri, 3 Apr 2026 14:33:50 -0400 Subject: [PATCH] migration --- .../down.sql | 6 ++++++ .../up.sql | 6 ++++++ _database/sql/migrations_squashed/user_tables/users.sql | 5 +++++ 3 files changed, 17 insertions(+) create mode 100644 _database/sql/migrations/2026-04-03-175727-0000_alter_users_add_maybe_landing_url/down.sql create mode 100644 _database/sql/migrations/2026-04-03-175727-0000_alter_users_add_maybe_landing_url/up.sql diff --git a/_database/sql/migrations/2026-04-03-175727-0000_alter_users_add_maybe_landing_url/down.sql b/_database/sql/migrations/2026-04-03-175727-0000_alter_users_add_maybe_landing_url/down.sql new file mode 100644 index 0000000000..09a423d10c --- /dev/null +++ b/_database/sql/migrations/2026-04-03-175727-0000_alter_users_add_maybe_landing_url/down.sql @@ -0,0 +1,6 @@ +-- noinspection SqlDialectInspectionForFile +-- noinspection SqlNoDataSourceInspectionForFile +-- noinspection SqlResolveForFile + +ALTER TABLE users + DROP COLUMN maybe_landing_url; diff --git a/_database/sql/migrations/2026-04-03-175727-0000_alter_users_add_maybe_landing_url/up.sql b/_database/sql/migrations/2026-04-03-175727-0000_alter_users_add_maybe_landing_url/up.sql new file mode 100644 index 0000000000..ff32bf3cb5 --- /dev/null +++ b/_database/sql/migrations/2026-04-03-175727-0000_alter_users_add_maybe_landing_url/up.sql @@ -0,0 +1,6 @@ +-- noinspection SqlDialectInspectionForFile +-- noinspection SqlNoDataSourceInspectionForFile +-- noinspection SqlResolveForFile + +ALTER TABLE users + ADD COLUMN maybe_landing_url VARCHAR(255) DEFAULT NULL; diff --git a/_database/sql/migrations_squashed/user_tables/users.sql b/_database/sql/migrations_squashed/user_tables/users.sql index 52eaacbe57..8ff3e8590b 100644 --- a/_database/sql/migrations_squashed/user_tables/users.sql +++ b/_database/sql/migrations_squashed/user_tables/users.sql @@ -222,8 +222,13 @@ CREATE TABLE users ( was_eagerly_provisioned BOOLEAN NOT NULL DEFAULT false, -- The referral URL the user arrived from when signing up. + -- This helps us know what marketing is effective. maybe_referral_url VARCHAR(255) DEFAULT NULL, + -- The actual URL the user first arrived at when signing up, including query params. + -- This helps us know what marketing is effective. + maybe_landing_url VARCHAR(255) DEFAULT NULL, + -- ========== MODERATION DETAILS ========== -- Different than deleted.