-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7df13bf
commit 59b9c67
Showing
6 changed files
with
307 additions
and
2 deletions.
There are no files selected for viewing
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,43 @@ | ||
"""add project_public table | ||
Revision ID: 49b9ed64d5a7 | ||
Revises: 70bf9033bd58 | ||
Create Date: 2024-12-23 14:12:25.662809 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
import geoalchemy2 | ||
import sqlmodel | ||
|
||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '49b9ed64d5a7' | ||
down_revision = '70bf9033bd58' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table('project_public', | ||
sa.Column('updated_at', sa.DateTime(timezone=True), nullable=False), | ||
sa.Column('created_at', sa.DateTime(timezone=True), server_default=sa.text('to_char(CURRENT_TIMESTAMP AT TIME ZONE \'UTC\', \'YYYY-MM-DD"T"HH24:MI:SSOF\')::timestamptz'), nullable=False), | ||
sa.Column('id', postgresql.UUID(as_uuid=True), server_default=sa.text('uuid_generate_v4()'), nullable=False), | ||
sa.Column('password', sa.Text(), nullable=True), | ||
sa.Column('config', postgresql.JSONB(astext_type=sa.Text()), nullable=False), | ||
sa.Column('project_id', postgresql.UUID(as_uuid=True), nullable=True), | ||
sa.ForeignKeyConstraint(['project_id'], ['customer.project.id'], ondelete='CASCADE'), | ||
sa.PrimaryKeyConstraint('id'), | ||
schema='customer' | ||
) | ||
op.create_index(op.f('ix_customer_project_public_id'), 'project_public', ['id'], unique=False, schema='customer') | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index(op.f('ix_customer_project_public_id'), table_name='project_public', schema='customer') | ||
op.drop_table('project_public', schema='customer') | ||
# ### end Alembic commands ### |
31 changes: 31 additions & 0 deletions
31
alembic/versions/70bf9033bd58_add_builder_config_column.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,31 @@ | ||
"""add builder_config column | ||
Revision ID: 70bf9033bd58 | ||
Revises: f3660efddfc9 | ||
Create Date: 2024-12-20 09:38:53.227648 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
import geoalchemy2 | ||
import sqlmodel | ||
|
||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '70bf9033bd58' | ||
down_revision = 'f3660efddfc9' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column('project', sa.Column('builder_config', postgresql.JSONB(astext_type=sa.Text()), nullable=True), schema='customer') | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column('project', 'builder_config', schema='customer') | ||
# ### end Alembic commands ### |
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
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
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
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