Skip to content

Commit

Permalink
feat: adjusted migration
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrinson-rise8 committed Sep 19, 2024
1 parent 19c4f44 commit be1331d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
8 changes: 1 addition & 7 deletions .env
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
MPI_DB_TYPE=postgres
MPI_DBNAME=testdb
MPI_HOST=localhost
MPI_PORT=5432
MPI_USER=postgres
MPI_PASSWORD=pw
DB_URI="sqlite:///db.sqlite3"
DB_URI="postgresql+psycopg2://postgres:pw@localhost:5432/postgres"
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""create algorithm tables
Revision ID: 0db31a429322
Revision ID: 3a677cb88b01
Revises: 6052c193a26a
Create Date: 2024-09-19 11:45:31.232579
Create Date: 2024-09-19 17:07:41.379176
"""
from typing import Sequence, Union
Expand All @@ -12,7 +12,7 @@


# revision identifiers, used by Alembic.
revision: str = '0db31a429322'
revision: str = '3a677cb88b01'
down_revision: Union[str, None] = '6052c193a26a'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
Expand All @@ -24,10 +24,11 @@ def upgrade() -> None:
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('is_default', sa.Boolean(), nullable=False),
sa.Column('label', sa.String(length=255), nullable=False),
sa.Column('description', sa.String(), nullable=False),
sa.Column('description', sa.Text(), nullable=False),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('label')
)
op.create_index(op.f('ix_algorithm_is_default'), 'algorithm', ['is_default'], unique=False)
op.create_table('algorithm_pass',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('algorithm_id', sa.Integer(), nullable=False),
Expand All @@ -47,5 +48,6 @@ def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_mpi_blocking_key_key'), table_name='mpi_blocking_key')
op.drop_table('algorithm_pass')
op.drop_index(op.f('ix_algorithm_is_default'), table_name='algorithm')
op.drop_table('algorithm')
# ### end Alembic commands ###

0 comments on commit be1331d

Please sign in to comment.