diff --git a/migrations/versions/32ec85002270_separate_topic_name_and_session_.py b/migrations/versions/32ec85002270_separate_topic_name_and_session_.py new file mode 100644 index 0000000..993a355 --- /dev/null +++ b/migrations/versions/32ec85002270_separate_topic_name_and_session_.py @@ -0,0 +1,30 @@ +"""separate topic name and session identifier + +Revision ID: 32ec85002270 +Revises: b2574371025b +Create Date: 2017-09-03 18:09:12.678823 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '32ec85002270' +down_revision = 'b2574371025b' +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.add_column('tops', sa.Column('name', sa.String(), nullable=True)) + op.add_column('tops', sa.Column('session_identifier', sa.String(), nullable=True)) + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_column('tops', 'session_identifier') + op.drop_column('tops', 'name') + # ### end Alembic commands ### diff --git a/models.py b/models.py index bfb153b..070559d 100644 --- a/models.py +++ b/models.py @@ -78,6 +78,8 @@ class Top(db.Model): duration = db.Column(db.Integer) held_on = db.Column(db.Date) sequence = db.Column(db.Integer) + name = db.Column(db.String) + session_identifier = db.Column(db.String) @staticmethod