rename column to model
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
migrations/versions/__pycache__/be7c94c549e5_.cpython-312.pyc
Normal file
BIN
migrations/versions/__pycache__/be7c94c549e5_.cpython-312.pyc
Normal file
Binary file not shown.
Binary file not shown.
34
migrations/versions/be7c94c549e5_.py
Normal file
34
migrations/versions/be7c94c549e5_.py
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
"""empty message
|
||||||
|
|
||||||
|
Revision ID: be7c94c549e5
|
||||||
|
Revises: 8e838956713f
|
||||||
|
Create Date: 2024-04-01 15:09:52.082987
|
||||||
|
|
||||||
|
"""
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = 'be7c94c549e5'
|
||||||
|
down_revision = '8e838956713f'
|
||||||
|
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.add_column(sa.Column('balancenumber', sa.String(length=30), nullable=True))
|
||||||
|
batch_op.drop_column('typeBalanse')
|
||||||
|
|
||||||
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
with op.batch_alter_table('oboruds', schema=None) as batch_op:
|
||||||
|
batch_op.add_column(sa.Column('typeBalanse', sa.VARCHAR(length=30), nullable=True))
|
||||||
|
batch_op.drop_column('balancenumber')
|
||||||
|
|
||||||
|
# ### end Alembic commands ###
|
||||||
@@ -16,7 +16,7 @@ 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))
|
||||||
typeBalanse = db.Column(db.String(30))
|
balancenumber = db.Column(db.String(30))
|
||||||
raspologenie = db.Column(db.String(200))
|
raspologenie = db.Column(db.String(200))
|
||||||
numberved = db.Column(db.String(100))
|
numberved = db.Column(db.String(100))
|
||||||
aud_id = db.Column(db.Integer, db.ForeignKey(Auditory.id))
|
aud_id = db.Column(db.Integer, db.ForeignKey(Auditory.id))
|
||||||
|
|||||||
Reference in New Issue
Block a user