mirror of
https://github.com/StefBuwalda/cal_counter.git
synced 2025-10-30 03:10:00 +00:00
Remove migrations from git
This commit is contained in:
@@ -1,56 +0,0 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 319d293f3017
|
||||
Revises: aab8050e9c73
|
||||
Create Date: 2025-06-26 10:35:18.540813
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '319d293f3017'
|
||||
down_revision = 'aab8050e9c73'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('unit',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('symbol', sa.String(length=10), nullable=False),
|
||||
sa.Column('name', sa.String(length=50), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('name'),
|
||||
sa.UniqueConstraint('symbol')
|
||||
)
|
||||
op.create_table('food_item',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('name', sa.String(length=150), nullable=False),
|
||||
sa.Column('amount', sa.Integer(), nullable=False),
|
||||
sa.Column('unit_id', sa.Integer(), nullable=False),
|
||||
sa.Column('energy', sa.Float(), nullable=True),
|
||||
sa.Column('protein', sa.Float(), nullable=True),
|
||||
sa.Column('carbs', sa.Float(), nullable=True),
|
||||
sa.Column('sugar', sa.Float(), nullable=True),
|
||||
sa.Column('fats', sa.Float(), nullable=True),
|
||||
sa.Column('saturated_fats', sa.Float(), nullable=True),
|
||||
sa.ForeignKeyConstraint(['unit_id'], ['unit.id'], ),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('name')
|
||||
)
|
||||
op.drop_table('units')
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('units',
|
||||
sa.Column('id', sa.INTEGER(), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.drop_table('food_item')
|
||||
op.drop_table('unit')
|
||||
# ### end Alembic commands ###
|
||||
@@ -1,39 +0,0 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: aab8050e9c73
|
||||
Revises:
|
||||
Create Date: 2025-06-26 10:24:25.760737
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'aab8050e9c73'
|
||||
down_revision = None
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('units',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.create_table('user',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('username', sa.String(length=150), nullable=False),
|
||||
sa.Column('password', sa.String(length=150), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('username')
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table('user')
|
||||
op.drop_table('units')
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user