Adding Manufacturers and ScopeModels

This commit is contained in:
Ian Roddis committed 2026-06-25 10:46:39 -03:00
1 parent 9111117404
commit b7ad517174
24 files changed
+822 -2

No files matched your search

@@ -0,0 +1,36 @@
"""add_scope_models_table
Revision ID: a52e7ca7a925
Revises: a192abbf4091
Create Date: 2026-06-25 10:35:40.227253
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = 'a52e7ca7a925'
down_revision: Union[str, None] = 'a192abbf4091'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('scope_models',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('name', sa.String(), nullable=False),
sa.Column('manufacturer_id', sa.Integer(), nullable=False),
sa.Column('url', sa.String(), nullable=True),
sa.ForeignKeyConstraint(['manufacturer_id'], ['manufacturers.id'], ondelete='RESTRICT'),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('scope_models')
# ### end Alembic commands ###