re-building migrations.
This commit is contained in:
parent
f6b54cd318
commit
a734578327
|
@ -6,6 +6,7 @@ from flask_marshmallow import Marshmallow
|
|||
from flask_sqlalchemy import SQLAlchemy
|
||||
from flask_migrate import Migrate
|
||||
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
connexion_app = connexion.FlaskApp(__name__)
|
||||
|
@ -29,5 +30,5 @@ connexion_app.add_api('api.yml')
|
|||
@app.cli.command()
|
||||
def load_example_data():
|
||||
"""Load example data into the database."""
|
||||
from study import ExampleDataLoader
|
||||
ExampleDataLoader().load_studies()
|
||||
from example_data import ExampleDataLoader
|
||||
ExampleDataLoader().load_all()
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
"""empty message
|
||||
|
||||
Revision ID: 4363c8bb8f1b
|
||||
Revision ID: 53596ce86e7e
|
||||
Revises:
|
||||
Create Date: 2019-12-16 11:25:16.540952
|
||||
Create Date: 2019-12-18 14:15:34.674922
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
|
@ -10,7 +10,7 @@ import sqlalchemy as sa
|
|||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '4363c8bb8f1b'
|
||||
revision = '53596ce86e7e'
|
||||
down_revision = None
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
@ -18,28 +18,30 @@ depends_on = None
|
|||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('requirement',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.create_table('study',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('title', sa.String(), nullable=True),
|
||||
sa.Column('last_updated', sa.DateTime(timezone=True), nullable=True),
|
||||
sa.Column('protocol_builder_status', sa.String(), nullable=True),
|
||||
sa.Column('protocol_builder_status', sa.Enum('out_of_date', 'in_process', 'complete', 'updating', name='protocolbuilderstatus'), nullable=True),
|
||||
sa.Column('primary_investigator_id', sa.String(), nullable=True),
|
||||
sa.Column('sponsor', sa.String(), nullable=True),
|
||||
sa.Column('ind_number', sa.String(), nullable=True),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.create_table('user',
|
||||
op.create_table('workflow_spec',
|
||||
sa.Column('id', sa.String(), nullable=False),
|
||||
sa.Column('display_name', sa.String(), nullable=True),
|
||||
sa.Column('description', sa.Text(), nullable=True),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.create_table('workflow',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('requirement', sa.String(), nullable=True),
|
||||
sa.Column('bpmn_workflow_json', sa.TEXT(), nullable=True),
|
||||
sa.Column('status', sa.Enum('new', 'user_input_required', 'waiting', 'complete', name='workflowstatus'), nullable=True),
|
||||
sa.Column('study_id', sa.Integer(), nullable=True),
|
||||
sa.Column('workflow_spec_id', sa.Integer(), nullable=True),
|
||||
sa.ForeignKeyConstraint(['study_id'], ['study.id'], ),
|
||||
sa.ForeignKeyConstraint(['workflow_spec_id'], ['workflow_spec.id'], ),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
@ -48,7 +50,6 @@ def upgrade():
|
|||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table('workflow')
|
||||
op.drop_table('user')
|
||||
op.drop_table('workflow_spec')
|
||||
op.drop_table('study')
|
||||
op.drop_table('requirement')
|
||||
# ### end Alembic commands ###
|
Loading…
Reference in New Issue