Added ID as pk
This commit is contained in:
parent
9a4d167dcd
commit
acaf633b45
|
@ -6,7 +6,8 @@ from crc import db
|
|||
|
||||
class DataStoreModel(db.Model):
|
||||
__tablename__ = 'data_store'
|
||||
key = db.Column(db.String, primary_key=True)
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
key = db.Column(db.String)
|
||||
workflow_id = db.Column(db.Integer)
|
||||
study_id = db.Column(db.Integer)
|
||||
task_id = db.Column(db.String)
|
||||
|
|
|
@ -19,9 +19,10 @@ depends_on = None
|
|||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('data_store',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('key', sa.String(), nullable=False),
|
||||
sa.Column('value', sa.String(), nullable=True),
|
||||
sa.PrimaryKeyConstraint('key')
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
|
Loading…
Reference in New Issue