Skip to content
Snippets Groups Projects
Commit 1c3f8a2b authored by Remco Tukker's avatar Remco Tukker
Browse files

fix typo in table name

parent 1a8ee8c7
No related branches found
No related tags found
1 merge request!83Feature/comp 284 old db publisher
This commit is part of merge request !83. Comments created here will be created in the context of that merge request.
...@@ -207,7 +207,7 @@ class Standards(db.Model): ...@@ -207,7 +207,7 @@ class Standards(db.Model):
class CrisisExercises(db.Model): class CrisisExercises(db.Model):
__tablename__ = 'crisis_excercises' __tablename__ = 'crisis_exercises'
nren_id: Mapped[int_pk_fkNREN] nren_id: Mapped[int_pk_fkNREN]
nren: Mapped[NREN] = relationship(lazy='joined') nren: Mapped[NREN] = relationship(lazy='joined')
year: Mapped[int_pk] year: Mapped[int_pk]
......
"""fix typo in table name
Revision ID: c7179d69907c
Revises: 1fbc4582c0ab
Create Date: 2023-09-22 15:33:04.699900
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = 'c7179d69907c'
down_revision = '1fbc4582c0ab'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table(
'crisis_exercises',
sa.Column('nren_id', sa.Integer(), nullable=False),
sa.Column('year', sa.Integer(), nullable=False),
sa.Column('exercise_descriptions', sa.JSON(), nullable=False),
sa.ForeignKeyConstraint(['nren_id'], ['nren.id'], name=op.f('fk_crisis_exercises_nren_id_nren')),
sa.PrimaryKeyConstraint('nren_id', 'year', name=op.f('pk_crisis_exercises'))
)
op.drop_table('crisis_excercises')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table(
'crisis_excercises',
sa.Column('nren_id', sa.INTEGER(), autoincrement=False, nullable=False),
sa.Column('year', sa.INTEGER(), autoincrement=False, nullable=False),
sa.Column('exercise_descriptions', postgresql.JSON(astext_type=sa.Text()), autoincrement=False, nullable=False),
sa.ForeignKeyConstraint(['nren_id'], ['nren.id'], name='fk_crisis_excercises_nren_id_nren'),
sa.PrimaryKeyConstraint('nren_id', 'year', name='pk_crisis_excercises')
)
op.drop_table('crisis_exercises')
# ### end Alembic commands ###
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment