|
| 1 | +"""create support listing table |
| 2 | +
|
| 3 | +Revision ID: 4d134292e5e3 |
| 4 | +Revises: 4ff1160282d1 |
| 5 | +Create Date: 2025-09-03 15:56:17.655320 |
| 6 | +
|
| 7 | +""" |
| 8 | +import sqlalchemy as sa |
| 9 | +from alembic import op |
| 10 | + |
| 11 | +# revision identifiers, used by Alembic. |
| 12 | +revision = "4d134292e5e3" |
| 13 | +down_revision = "4ff1160282d1" |
| 14 | +branch_labels = None |
| 15 | +depends_on = None |
| 16 | + |
| 17 | + |
| 18 | +def upgrade(): |
| 19 | + # ### commands auto generated by Alembic - please adjust! ### |
| 20 | + op.create_table( |
| 21 | + "support_listing", |
| 22 | + sa.Column( |
| 23 | + "name", |
| 24 | + sa.Text(), |
| 25 | + nullable=False, |
| 26 | + comment="name of the support listing; a human-readable identifier", |
| 27 | + ), |
| 28 | + sa.Column( |
| 29 | + "uri", |
| 30 | + sa.Text(), |
| 31 | + nullable=False, |
| 32 | + comment="origin of the Support Listing; a file path or a website URL", |
| 33 | + ), |
| 34 | + sa.Column("id", sa.UUID(), nullable=False), |
| 35 | + sa.Column( |
| 36 | + "created_at", |
| 37 | + sa.TIMESTAMP(timezone=True), |
| 38 | + server_default=sa.text("now()"), |
| 39 | + nullable=False, |
| 40 | + ), |
| 41 | + sa.Column( |
| 42 | + "updated_at", |
| 43 | + sa.TIMESTAMP(timezone=True), |
| 44 | + server_default=sa.text("now()"), |
| 45 | + nullable=False, |
| 46 | + ), |
| 47 | + sa.PrimaryKeyConstraint("id", name=op.f("support_listing_pkey")), |
| 48 | + sa.UniqueConstraint("name", name=op.f("support_listing_name_uniq")), |
| 49 | + ) |
| 50 | + # ### end Alembic commands ### |
| 51 | + |
| 52 | + |
| 53 | +def downgrade(): |
| 54 | + # ### commands auto generated by Alembic - please adjust! ### |
| 55 | + op.drop_table("support_listing") |
| 56 | + # ### end Alembic commands ### |
0 commit comments