-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
voting identifier templates for proposition types
- Loading branch information
Holger Burbach
committed
Feb 16, 2021
1 parent
6b49a36
commit ca5f215
Showing
6 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
alembic/versions/cbe0faa6a28a_voting_identifier_template_for_propositiontypes.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,37 @@ | ||
"""voting_identifier_template for propositiontypes | ||
Revision ID: cbe0faa6a28a | ||
Revises: e2ce064655e8 | ||
Create Date: 2021-02-10 15:56:33.797513 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'cbe0faa6a28a' | ||
down_revision = 'e2ce064655e8' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table('voting_id_counter', | ||
sa.Column('proposition_type_id', sa.Integer(), nullable=False), | ||
sa.Column('voting_phase_id', sa.Integer(), nullable=False), | ||
sa.Column('counter', sa.Integer(), nullable=True), | ||
sa.ForeignKeyConstraint(['proposition_type_id'], ['propositiontypes.id'], name=op.f('fk_voting_id_counter_proposition_type_id_propositiontypes')), | ||
sa.ForeignKeyConstraint(['voting_phase_id'], ['votingphases.id'], name=op.f('fk_voting_id_counter_voting_phase_id_votingphases')), | ||
sa.PrimaryKeyConstraint('proposition_type_id', 'voting_phase_id', name=op.f('pk_voting_id_counter')) | ||
) | ||
op.add_column('propositiontypes', sa.Column('voting_identifier_template', sa.Text(), nullable=True)) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column('propositiontypes', 'voting_identifier_template') | ||
op.drop_table('voting_id_counter') | ||
# ### 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
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