-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migration for host_organization table
- Loading branch information
1 parent
25ee4c4
commit 9c53fbc
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
migrations/versions/5410668e15ad_add_host_organization_table.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |