Prathamesh Sable commited on
Commit
e34c80d
·
1 Parent(s): 2e67005

migrations

Browse files
migrations/versions/a193e9cfa8c5_added_product_and_vuforia_realted.py ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """added product and vuforia realted
2
+
3
+ Revision ID: a193e9cfa8c5
4
+ Revises: b640d22a64f5
5
+ Create Date: 2025-04-27 10:47:48.941202
6
+
7
+ """
8
+ from typing import Sequence, Union
9
+
10
+ from alembic import op
11
+ import sqlalchemy as sa
12
+
13
+
14
+ # revision identifiers, used by Alembic.
15
+ revision: str = 'a193e9cfa8c5'
16
+ down_revision: Union[str, None] = 'b640d22a64f5'
17
+ branch_labels: Union[str, Sequence[str], None] = None
18
+ depends_on: Union[str, Sequence[str], None] = None
19
+
20
+
21
+ def upgrade() -> None:
22
+ """Upgrade schema."""
23
+ # ### commands auto generated by Alembic - please adjust! ###
24
+ op.create_table('markers',
25
+ sa.Column('id', sa.Integer(), nullable=False),
26
+ sa.Column('image_name', sa.String(), nullable=False),
27
+ sa.Column('vuforia_id', sa.String(), nullable=False),
28
+ sa.Column('product_id', sa.Integer(), nullable=False),
29
+ sa.ForeignKeyConstraint(['product_id'], ['products.id'], ),
30
+ sa.PrimaryKeyConstraint('id')
31
+ )
32
+ # ### end Alembic commands ###
33
+
34
+
35
+ def downgrade() -> None:
36
+ """Downgrade schema."""
37
+ # ### commands auto generated by Alembic - please adjust! ###
38
+ op.drop_table('markers')
39
+ # ### end Alembic commands ###