From 0fe71419492449e257f67ab4dae67b87d2526a87 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sat, 25 Apr 2026 20:35:37 -0400 Subject: [PATCH] =?UTF-8?q?feat(db):=20migration=200040=20=E2=80=94=20rena?= =?UTF-8?q?me=20briefing=5Fdate=20to=20day=5Fdate,=20hard=20cut=20briefing?= =?UTF-8?q?=20data?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- ...rename_briefing_date_drop_briefing_data.py | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 alembic/versions/0040_rename_briefing_date_drop_briefing_data.py diff --git a/alembic/versions/0040_rename_briefing_date_drop_briefing_data.py b/alembic/versions/0040_rename_briefing_date_drop_briefing_data.py new file mode 100644 index 0000000..25ec187 --- /dev/null +++ b/alembic/versions/0040_rename_briefing_date_drop_briefing_data.py @@ -0,0 +1,26 @@ +"""rename briefing_date to day_date and drop existing briefing conversations + +Revision ID: 0040 +Revises: 0039 +Create Date: 2026-04-25 + +This is a hard-cut migration accompanying the Journal feature. The user +has accepted destruction of existing briefing data per the design spec. +""" +from alembic import op + + +revision = "0040" +down_revision = "0039" +branch_labels = None +depends_on = None + + +def upgrade() -> None: + op.execute("DELETE FROM conversations WHERE conversation_type = 'briefing'") + op.alter_column("conversations", "briefing_date", new_column_name="day_date") + op.execute("DELETE FROM settings WHERE key = 'briefing_config'") + + +def downgrade() -> None: + op.alter_column("conversations", "day_date", new_column_name="briefing_date")