Adding scope import
This commit is contained in:
1 parent
cda15df2ed
commit
69cbfa2d3f
18 files changed
+1165
-3
No files matched your search
@@ -0,0 +1,38 @@
|
||||
"""add_scope_infos_table
|
||||
|
||||
Revision ID: d1e2f3a4b5c6
|
||||
Revises: c9f1a2b3d4e5
|
||||
Create Date: 2026-07-16 20:00:00.000000
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "d1e2f3a4b5c6"
|
||||
down_revision: Union[str, None] = "c9f1a2b3d4e5"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.create_table(
|
||||
"scope_infos",
|
||||
sa.Column("id", sa.Integer(), nullable=False),
|
||||
sa.Column("augmented_part_id", sa.Integer(), nullable=False),
|
||||
sa.Column("magnification_min", sa.Float(), nullable=True),
|
||||
sa.Column("magnification_max", sa.Float(), nullable=True),
|
||||
sa.Column("model_suffix", sa.String(), nullable=True),
|
||||
sa.Column("objective_thread_pitch", sa.String(), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
["augmented_part_id"], ["augmented_parts.id"], ondelete="CASCADE"
|
||||
),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
sa.UniqueConstraint("augmented_part_id"),
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_table("scope_infos")
|
||||
Reference in new issue
Block a user