43 lines
1.0 KiB
Python
43 lines
1.0 KiB
Python
"""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.
|
|
revision = "6cfc21a7ae1b"
|
|
down_revision = "ada0d1f3d84f"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
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"),
|
|
)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table("module_ue_coef")
|
|
# ### end Alembic commands ###
|