mirror of
https://github.com/StefBuwalda/cal_counter.git
synced 2025-10-30 11:19:59 +00:00
Can now set macro target
This commit is contained in:
56
migrations/versions/21ec41b645e9_.py
Normal file
56
migrations/versions/21ec41b645e9_.py
Normal file
@@ -0,0 +1,56 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 21ec41b645e9
|
||||
Revises: 65eaeafb0904
|
||||
Create Date: 2025-10-10 19:26:21.718736
|
||||
|
||||
"""
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "21ec41b645e9"
|
||||
down_revision = "65eaeafb0904"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table("user", schema=None) as batch_op:
|
||||
batch_op.add_column(
|
||||
sa.Column(
|
||||
"protein", sa.Float(), nullable=False, server_default="100"
|
||||
)
|
||||
)
|
||||
batch_op.add_column(
|
||||
sa.Column(
|
||||
"carbohydrates",
|
||||
sa.Float(),
|
||||
nullable=False,
|
||||
server_default="250",
|
||||
)
|
||||
)
|
||||
batch_op.add_column(
|
||||
sa.Column("fat", sa.Float(), nullable=False, server_default="60")
|
||||
)
|
||||
batch_op.add_column(
|
||||
sa.Column(
|
||||
"calories", sa.Float(), nullable=False, server_default="2000"
|
||||
)
|
||||
)
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table("user", schema=None) as batch_op:
|
||||
batch_op.drop_column("calories")
|
||||
batch_op.drop_column("fat")
|
||||
batch_op.drop_column("carbohydrates")
|
||||
batch_op.drop_column("protein")
|
||||
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user