Compare commits
2 Commits
6edb0b2601
...
2da2956358
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2da2956358 | ||
|
|
4f141d962d |
BIN
migrations/__pycache__/env.cpython-312.pyc
Normal file
BIN
migrations/__pycache__/env.cpython-312.pyc
Normal file
Binary file not shown.
BIN
migrations/versions/__pycache__/ec6bbcd361bd_.cpython-312.pyc
Normal file
BIN
migrations/versions/__pycache__/ec6bbcd361bd_.cpython-312.pyc
Normal file
Binary file not shown.
44
migrations/versions/ec6bbcd361bd_.py
Normal file
44
migrations/versions/ec6bbcd361bd_.py
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
"""empty message
|
||||||
|
|
||||||
|
Revision ID: ec6bbcd361bd
|
||||||
|
Revises:
|
||||||
|
Create Date: 2024-03-13 08:22:23.761783
|
||||||
|
|
||||||
|
"""
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = 'ec6bbcd361bd'
|
||||||
|
down_revision = None
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
with op.batch_alter_table('oboruds', schema=None) as batch_op:
|
||||||
|
batch_op.drop_column('duplicate')
|
||||||
|
|
||||||
|
with op.batch_alter_table('zametki', schema=None) as batch_op:
|
||||||
|
batch_op.alter_column('txtzam',
|
||||||
|
existing_type=sa.TEXT(length=10000),
|
||||||
|
type_=sa.String(length=10000),
|
||||||
|
existing_nullable=True)
|
||||||
|
|
||||||
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
with op.batch_alter_table('zametki', schema=None) as batch_op:
|
||||||
|
batch_op.alter_column('txtzam',
|
||||||
|
existing_type=sa.String(length=10000),
|
||||||
|
type_=sa.TEXT(length=10000),
|
||||||
|
existing_nullable=True)
|
||||||
|
|
||||||
|
with op.batch_alter_table('oboruds', schema=None) as batch_op:
|
||||||
|
batch_op.add_column(sa.Column('duplicate', sa.BOOLEAN(), nullable=True))
|
||||||
|
|
||||||
|
# ### end Alembic commands ###
|
||||||
@@ -16,13 +16,8 @@ class Oboruds(db.Model):
|
|||||||
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
|
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
|
||||||
invNumber=db.Column(db.Integer)
|
invNumber=db.Column(db.Integer)
|
||||||
nazvanie=db.Column(db.String(500))
|
nazvanie=db.Column(db.String(500))
|
||||||
raspologenie = db.Column(db.String(200))
|
|
||||||
|
|
||||||
duplicate=db.Column(db.Boolean, unique=False, default=False)
|
|
||||||
typeBalanse = db.Column(db.String(30))
|
typeBalanse = db.Column(db.String(30))
|
||||||
|
|
||||||
aud_id = db.Column(db.Integer, db.ForeignKey(Auditory.id))
|
aud_id = db.Column(db.Integer, db.ForeignKey(Auditory.id))
|
||||||
duplicate_aud_id = (db.Integer, db.ForeignKey(Auditory.id))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user