Skip to content

Commit

Permalink
migration for host_organization table
Browse files Browse the repository at this point in the history
  • Loading branch information
brassy-endomorph committed Sep 28, 2024
1 parent 25ee4c4 commit 9c53fbc
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions migrations/versions/5410668e15ad_add_host_organization_table.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"""add host_organization table
Revision ID: 5410668e15ad
Revises: 5ffe5a5c8e9a
Create Date: 2024-09-28 09:38:02.716771
"""

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "5410668e15ad"
down_revision = "5ffe5a5c8e9a"
branch_labels = None
depends_on = None


def upgrade() -> None:
op.create_table(
"host_organization",
sa.Column("id", sa.Integer(), nullable=False),
sa.Column("brand_app_name", sa.String(length=255), nullable=False),
sa.Column("brand_primary_hex_color", sa.String(length=7), nullable=False),
sa.PrimaryKeyConstraint("id", name=op.f("pk_host_organization")),
)

op.execute(
"INSERT INTO host_organization (id, brand_app_name, brand_primary_hex_color) "
"VALUES (1, '🤫 Hush Line', '#7d25c1')"
)


def downgrade() -> None:
op.drop_table("host_organization")

0 comments on commit 9c53fbc

Please sign in to comment.