"""empty message Revision ID: 9001356f0063 Revises: 058eb11c5b17 Create Date: 2024-06-08 21:59:45.214144 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "9001356f0063" down_revision = "058eb11c5b17" branch_labels = None depends_on = None def upgrade() -> None: # ### commands auto generated by Alembic - please adjust! ### settings_table = op.create_table( "settings", sa.Column("id", sa.Integer(), nullable=False), sa.Column("subscription", sa.JSON(), nullable=False), sa.Column("telegram", sa.JSON()), sa.PrimaryKeyConstraint("id"), ) # ### end Alembic commands ### op.bulk_insert( settings_table, [ { "telegram": None, "subscription": { "template_on_acceptance": True, "profile_title": "Support", "support_link": "t.me/support", "update_interval": 12, "rules": [ { "pattern": "^([Cc]lash-verge|[Cc]lash-?[Mm]eta)", "result": "clash-meta", }, {"pattern": "^([Cc]lash|[Ss]tash)", "result": "clash"}, { "pattern": "^(SFA|SFI|SFM|SFT|[Kk]aring|[Hh]iddify[Nn]ext)", "result": "sing-box", }, { "pattern": "^v2rayN/(:?6\\.(?:[5-9]\\d+|4[1-9])|[7-9]\\d*\\.\\d+)", "result": "xray", }, {"pattern": "^v2rayN/", "result": "base64-links"}, { "pattern": "^v2rayNG/([2-9]|1\\.(9|\\d{2,})|1\\.8\\.(1[7-9]|[2-9]\\d|\\d{3,}))", "result": "xray", }, {"pattern": "^v2rayNG/", "result": "base64-links"}, {"pattern": "^[Ss]treisand", "result": "xray"}, {"pattern": ".*", "result": "base64-links"}, ], }, } ], ) def downgrade() -> None: # ### commands auto generated by Alembic - please adjust! ### op.drop_table("settings") # ### end Alembic commands ###