fix(d1): SystemSettings-Schema-Drift behoben — backup_interval/backup_retention_days/backup_destination Model-Spalten + Migration 0142 nachgezogen (10b1f83 hatte Schema/Service/Frontend erweitert ohne Model/Migration); Settings-API Create/Read wieder funktionsfähig; Fresh-DB-Kette 0001→0142 verifiziert
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
"""Add backup config columns to system_settings table.
|
||||
|
||||
Follow-up to 0130: the backup feature (10b1f83) added backup_interval,
|
||||
backup_retention_days and backup_destination to schema/service/frontend
|
||||
but missed model columns and this migration.
|
||||
|
||||
Revision ID: 0142
|
||||
Revises: 0141
|
||||
"""
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
revision = "0142"
|
||||
down_revision = "0141"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.add_column(
|
||||
"system_settings",
|
||||
sa.Column("backup_interval", sa.String(20), nullable=False, server_default="daily"),
|
||||
)
|
||||
op.add_column(
|
||||
"system_settings",
|
||||
sa.Column("backup_retention_days", sa.Integer(), nullable=False, server_default="7"),
|
||||
)
|
||||
op.add_column(
|
||||
"system_settings",
|
||||
sa.Column("backup_destination", sa.String(20), nullable=False, server_default="local"),
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_column("system_settings", "backup_destination")
|
||||
op.drop_column("system_settings", "backup_retention_days")
|
||||
op.drop_column("system_settings", "backup_interval")
|
||||
Reference in New Issue
Block a user