Skip to content
This repository was archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
update model and migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
knutator2 committed Sep 3, 2017
1 parent 219622b commit 41b82b6
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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 ###
2 changes: 2 additions & 0 deletions models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 41b82b6

Please sign in to comment.