Skip to content
Snippets Groups Projects
Commit 52174255 authored by Ruben Young On's avatar Ruben Young On
Browse files

Added new migrations

parent 6b6486ea
No related branches found
No related tags found
1 merge request!11MultipleChoiceOption is a widget, /exams API call now returns checkbox data
Pipeline #17585 failed
""" empty message """ empty message
Revision ID: 4a27f48d80d8 Revision ID: 26f690576109
Revises: 4204f4a83863 Revises: 4204f4a83863
""" """
...@@ -9,7 +9,7 @@ import sqlalchemy as sa ...@@ -9,7 +9,7 @@ import sqlalchemy as sa
# revision identifiers, used by Alembic. # revision identifiers, used by Alembic.
revision = '4a27f48d80d8' revision = '26f690576109'
down_revision = '4204f4a83863' down_revision = '4204f4a83863'
branch_labels = None branch_labels = None
depends_on = None depends_on = None
...@@ -18,16 +18,13 @@ depends_on = None ...@@ -18,16 +18,13 @@ depends_on = None
def upgrade(): def upgrade():
# ### commands auto generated by Alembic - please adjust! ### # ### commands auto generated by Alembic - please adjust! ###
op.create_table('mc_option', op.create_table('mc_option',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False), sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('label', sa.String(), nullable=True), sa.Column('label', sa.String(), nullable=True),
sa.Column('mc_type', sa.String(length=20), nullable=True), sa.Column('feedback_id', sa.Integer(), nullable=True),
sa.Column('problem_id', sa.Integer(), nullable=False), sa.ForeignKeyConstraint(['feedback_id'], ['feedback_option.id'], ),
sa.Column('feedback_id', sa.Integer(), nullable=True), sa.ForeignKeyConstraint(['id'], ['widget.id'], ),
sa.ForeignKeyConstraint(['feedback_id'], ['feedback_option.id'], ), sa.PrimaryKeyConstraint('id')
sa.ForeignKeyConstraint(['id'], ['widget.id'], ), )
sa.ForeignKeyConstraint(['problem_id'], ['solution.id'], ),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ### # ### end Alembic commands ###
......
""" empty message
Revision ID: f97aa3c73453
Revises: 4204f4a83863
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'f97aa3c73453'
down_revision = '4204f4a83863'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('mc_option',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('x', sa.Integer(), nullable=False),
sa.Column('y', sa.Integer(), nullable=False),
sa.Column('label', sa.String(), nullable=True),
sa.Column('problem_id', sa.Integer(), nullable=False),
sa.Column('feedback_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['feedback_id'], ['feedback_option.id'], ),
sa.ForeignKeyConstraint(['problem_id'], ['solution.id'], ),
sa.PrimaryKeyConstraint('id')
)
def downgrade():
op.drop_table('mc_option')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment