mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-22 06:38:12 +02:00
feat: Add initial database migration and UI label component, alongside frontend dependency installation.
This commit is contained in:
1 parent
5884aa2378
commit
8d124bf0f8
17 files changed
+859
-40
No files matched your search
@@ -0,0 +1,26 @@
|
||||
"""add_category_to_items
|
||||
|
||||
Revision ID: add_category_field
|
||||
Revises: add_is_available
|
||||
Create Date: 2025-11-23
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'add_category_field'
|
||||
down_revision = 'add_is_available'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# Add category column to items table
|
||||
op.add_column('items', sa.Column('category', sa.String(255), nullable=True))
|
||||
|
||||
|
||||
def downgrade():
|
||||
# Remove category column from items table
|
||||
op.drop_column('items', 'category')
|
||||
@@ -0,0 +1,26 @@
|
||||
"""add_is_available_to_items
|
||||
|
||||
Revision ID: add_is_available
|
||||
Revises:
|
||||
Create Date: 2025-11-23
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'add_is_available'
|
||||
down_revision = None # Update this if there are previous migrations
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# Add is_available column to items table
|
||||
op.add_column('items', sa.Column('is_available', sa.Boolean(), nullable=True, server_default='true'))
|
||||
|
||||
|
||||
def downgrade():
|
||||
# Remove is_available column from items table
|
||||
op.drop_column('items', 'is_available')
|
||||
Reference in new issue
Block a user