2021-11-12 22:17:46 +01:00
|
|
|
"""coefs modules but
|
|
|
|
|
|
|
|
Revision ID: 6cfc21a7ae1b
|
|
|
|
Revises: ada0d1f3d84f
|
|
|
|
Create Date: 2021-11-11 21:04:05.573172
|
|
|
|
|
|
|
|
"""
|
|
|
|
from alembic import op
|
|
|
|
import sqlalchemy as sa
|
|
|
|
|
|
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
2022-05-09 16:26:23 +02:00
|
|
|
revision = "6cfc21a7ae1b"
|
|
|
|
down_revision = "ada0d1f3d84f"
|
2021-11-12 22:17:46 +01:00
|
|
|
branch_labels = None
|
|
|
|
depends_on = None
|
|
|
|
|
|
|
|
|
|
|
|
def upgrade():
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
2022-05-09 16:26:23 +02:00
|
|
|
op.create_table(
|
|
|
|
"module_ue_coef",
|
|
|
|
sa.Column("module_id", sa.Integer(), nullable=False),
|
|
|
|
sa.Column("ue_id", sa.Integer(), nullable=False),
|
|
|
|
sa.Column("coef", sa.Float(), nullable=False),
|
|
|
|
sa.ForeignKeyConstraint(
|
|
|
|
["module_id"],
|
|
|
|
["notes_modules.id"],
|
|
|
|
),
|
|
|
|
sa.ForeignKeyConstraint(
|
|
|
|
["ue_id"],
|
|
|
|
["notes_ue.id"],
|
|
|
|
),
|
|
|
|
sa.PrimaryKeyConstraint("module_id", "ue_id"),
|
2021-11-12 22:17:46 +01:00
|
|
|
)
|
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
|
|
|
|
|
|
def downgrade():
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
2022-05-09 16:26:23 +02:00
|
|
|
op.drop_table("module_ue_coef")
|
2021-11-12 22:17:46 +01:00
|
|
|
# ### end Alembic commands ###
|