42 lines
1.1 KiB
Python
42 lines
1.1 KiB
Python
"""spool weights.
|
|
|
|
Revision ID: aafcd7fb0e84
|
|
Revises: b8881bdb716c
|
|
Create Date: 2024-03-26 09:48:09.930022
|
|
"""
|
|
import sqlalchemy as sa
|
|
from alembic import op
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = "aafcd7fb0e84"
|
|
down_revision = "b8881bdb716c"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
"""Perform the upgrade."""
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.add_column(
|
|
"spool",
|
|
sa.Column(
|
|
"initial_weight",
|
|
sa.Float(),
|
|
nullable=True,
|
|
comment="The initial weight of the filament on the spool (net weight).",
|
|
),
|
|
)
|
|
op.add_column(
|
|
"spool",
|
|
sa.Column("spool_weight", sa.Float(), nullable=True, comment="The weight of the empty spool (tare weight)."),
|
|
)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
"""Perform the downgrade."""
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_column("spool", "spool_weight")
|
|
op.drop_column("spool", "initial_weight")
|
|
# ### end Alembic commands ###
|