feat(db): migration 0040 — rename briefing_date to day_date, hard cut briefing data
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -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")
|
||||||
Reference in New Issue
Block a user