diff --git a/app/models.py b/app/models.py index 6322b2e0..77892c02 100644 --- a/app/models.py +++ b/app/models.py @@ -436,6 +436,7 @@ class Corpus(db.Model): description = db.Column(db.String(255)) title = db.Column(db.String(32)) user_id = db.Column(db.Integer, db.ForeignKey('users.id')) + status = db.Column(db.String(16)) # Relationships files = db.relationship('CorpusFile', backref='corpus', diff --git a/migrations/versions/1210adfe1e34_.py b/migrations/versions/1210adfe1e34_.py new file mode 100644 index 00000000..edf3a2c9 --- /dev/null +++ b/migrations/versions/1210adfe1e34_.py @@ -0,0 +1,28 @@ +"""empty message + +Revision ID: 1210adfe1e34 +Revises: abf60427ff84 +Create Date: 2019-11-04 12:54:39.389263 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '1210adfe1e34' +down_revision = 'abf60427ff84' +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.add_column('corpora', sa.Column('status', sa.String(length=16), nullable=True)) + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_column('corpora', 'status') + # ### end Alembic commands ###