From 3bc413916c63dde20ffef626f44837b2b9ae3b26 Mon Sep 17 00:00:00 2001 From: ydb5755 Date: Sun, 29 Sep 2024 14:41:42 +0300 Subject: [PATCH] old migration --- migrations/versions/9821817d735b_.py | 50 ++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 migrations/versions/9821817d735b_.py diff --git a/migrations/versions/9821817d735b_.py b/migrations/versions/9821817d735b_.py new file mode 100644 index 0000000..e4ccf8c --- /dev/null +++ b/migrations/versions/9821817d735b_.py @@ -0,0 +1,50 @@ +"""empty message + +Revision ID: 9821817d735b +Revises: +Create Date: 2024-09-27 12:04:56.137545 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '9821817d735b' +down_revision = None +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.create_table('budget_category', + sa.Column('id', sa.INTEGER(), nullable=False), + sa.Column('name', sa.String(), nullable=False), + sa.PrimaryKeyConstraint('id') + ) + op.create_table('line_item', + sa.Column('id', sa.INTEGER(), nullable=False), + sa.Column('parent_line_item_id', sa.INTEGER(), nullable=True), + sa.Column('amount', sa.INTEGER(), nullable=False), + sa.Column('currency_type', sa.String(), nullable=True), + sa.Column('vendor_id', sa.INTEGER(), nullable=True), + sa.Column('date', sa.INTEGER(), nullable=False), + sa.Column('confirmation_code', sa.INTEGER(), nullable=True), + sa.PrimaryKeyConstraint('id') + ) + op.create_table('vendor', + sa.Column('id', sa.INTEGER(), nullable=False), + sa.Column('name', sa.String(), nullable=False), + sa.Column('bc_id', sa.INTEGER(), nullable=True), + sa.PrimaryKeyConstraint('id') + ) + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_table('vendor') + op.drop_table('line_item') + op.drop_table('budget_category') + # ### end Alembic commands ###