lots of changes
This commit is contained in:
28
migrations/versions/0fcf1e150ae2_auto.py
Normal file
28
migrations/versions/0fcf1e150ae2_auto.py
Normal file
@ -0,0 +1,28 @@
|
||||
"""auto
|
||||
|
||||
Revision ID: 0fcf1e150ae2
|
||||
Revises: 58516c9892e9
|
||||
Create Date: 2025-06-05 09:31:44.116783
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '0fcf1e150ae2'
|
||||
down_revision = '58516c9892e9'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
70
migrations/versions/373571dfe134_auto.py
Normal file
70
migrations/versions/373571dfe134_auto.py
Normal file
@ -0,0 +1,70 @@
|
||||
"""auto
|
||||
|
||||
Revision ID: 373571dfe134
|
||||
Revises: 0fcf1e150ae2
|
||||
Create Date: 2025-06-05 09:38:55.414193
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import mysql
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '373571dfe134'
|
||||
down_revision = '0fcf1e150ae2'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('submission_images', sa.Column('file_url', sa.String(length=256), nullable=False))
|
||||
op.add_column('submission_images', sa.Column('uploaded_at', sa.DateTime(), nullable=True))
|
||||
op.drop_column('submission_images', 'is_visible')
|
||||
op.drop_column('submission_images', 'file_path')
|
||||
op.add_column('submissions', sa.Column('submitted_at', sa.DateTime(), nullable=True))
|
||||
op.add_column('submissions', sa.Column('plant_name', sa.String(length=100), nullable=False))
|
||||
op.add_column('submissions', sa.Column('approved', sa.Boolean(), nullable=True))
|
||||
op.add_column('submissions', sa.Column('approved_at', sa.DateTime(), nullable=True))
|
||||
op.add_column('submissions', sa.Column('reviewed_by', sa.Integer(), nullable=True))
|
||||
op.drop_constraint(op.f('submissions_ibfk_1'), 'submissions', type_='foreignkey')
|
||||
op.create_foreign_key(None, 'submissions', 'users', ['reviewed_by'], ['id'])
|
||||
op.drop_column('submissions', 'common_name')
|
||||
op.drop_column('submissions', 'height')
|
||||
op.drop_column('submissions', 'container_size')
|
||||
op.drop_column('submissions', 'timestamp')
|
||||
op.drop_column('submissions', 'price')
|
||||
op.drop_column('submissions', 'plant_id')
|
||||
op.drop_column('submissions', 'width')
|
||||
op.drop_column('submissions', 'health_status')
|
||||
op.drop_column('submissions', 'leaf_count')
|
||||
op.drop_column('submissions', 'potting_mix')
|
||||
op.drop_column('submissions', 'source')
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('submissions', sa.Column('source', mysql.VARCHAR(length=120), nullable=True))
|
||||
op.add_column('submissions', sa.Column('potting_mix', mysql.VARCHAR(length=255), nullable=True))
|
||||
op.add_column('submissions', sa.Column('leaf_count', mysql.INTEGER(), autoincrement=False, nullable=True))
|
||||
op.add_column('submissions', sa.Column('health_status', mysql.VARCHAR(length=50), nullable=True))
|
||||
op.add_column('submissions', sa.Column('width', mysql.FLOAT(), nullable=True))
|
||||
op.add_column('submissions', sa.Column('plant_id', mysql.INTEGER(), autoincrement=False, nullable=True))
|
||||
op.add_column('submissions', sa.Column('price', mysql.FLOAT(), nullable=False))
|
||||
op.add_column('submissions', sa.Column('timestamp', mysql.DATETIME(), nullable=True))
|
||||
op.add_column('submissions', sa.Column('container_size', mysql.VARCHAR(length=120), nullable=True))
|
||||
op.add_column('submissions', sa.Column('height', mysql.FLOAT(), nullable=True))
|
||||
op.add_column('submissions', sa.Column('common_name', mysql.VARCHAR(length=120), nullable=False))
|
||||
op.drop_constraint(None, 'submissions', type_='foreignkey')
|
||||
op.create_foreign_key(op.f('submissions_ibfk_1'), 'submissions', 'plant', ['plant_id'], ['id'])
|
||||
op.drop_column('submissions', 'reviewed_by')
|
||||
op.drop_column('submissions', 'approved_at')
|
||||
op.drop_column('submissions', 'approved')
|
||||
op.drop_column('submissions', 'plant_name')
|
||||
op.drop_column('submissions', 'submitted_at')
|
||||
op.add_column('submission_images', sa.Column('file_path', mysql.VARCHAR(length=255), nullable=False))
|
||||
op.add_column('submission_images', sa.Column('is_visible', mysql.TINYINT(display_width=1), autoincrement=False, nullable=True))
|
||||
op.drop_column('submission_images', 'uploaded_at')
|
||||
op.drop_column('submission_images', 'file_url')
|
||||
# ### end Alembic commands ###
|
28
migrations/versions/401f262d79cc_auto.py
Normal file
28
migrations/versions/401f262d79cc_auto.py
Normal file
@ -0,0 +1,28 @@
|
||||
"""auto
|
||||
|
||||
Revision ID: 401f262d79cc
|
||||
Revises: 583fab3f9f80
|
||||
Create Date: 2025-06-05 04:48:49.440383
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '401f262d79cc'
|
||||
down_revision = '583fab3f9f80'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
28
migrations/versions/4bdec754b085_auto.py
Normal file
28
migrations/versions/4bdec754b085_auto.py
Normal file
@ -0,0 +1,28 @@
|
||||
"""auto
|
||||
|
||||
Revision ID: 4bdec754b085
|
||||
Revises: 27a65a4e055c
|
||||
Create Date: 2025-06-05 04:34:19.085549
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '4bdec754b085'
|
||||
down_revision = '27a65a4e055c'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
28
migrations/versions/501b54868875_auto.py
Normal file
28
migrations/versions/501b54868875_auto.py
Normal file
@ -0,0 +1,28 @@
|
||||
"""auto
|
||||
|
||||
Revision ID: 501b54868875
|
||||
Revises: 401f262d79cc
|
||||
Create Date: 2025-06-05 04:51:52.183453
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '501b54868875'
|
||||
down_revision = '401f262d79cc'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
28
migrations/versions/583fab3f9f80_auto.py
Normal file
28
migrations/versions/583fab3f9f80_auto.py
Normal file
@ -0,0 +1,28 @@
|
||||
"""auto
|
||||
|
||||
Revision ID: 583fab3f9f80
|
||||
Revises: 64ec4065d18d
|
||||
Create Date: 2025-06-05 04:47:05.679772
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '583fab3f9f80'
|
||||
down_revision = '64ec4065d18d'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
28
migrations/versions/58516c9892e9_auto.py
Normal file
28
migrations/versions/58516c9892e9_auto.py
Normal file
@ -0,0 +1,28 @@
|
||||
"""auto
|
||||
|
||||
Revision ID: 58516c9892e9
|
||||
Revises: 85da58851d35
|
||||
Create Date: 2025-06-05 05:28:30.947641
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '58516c9892e9'
|
||||
down_revision = '85da58851d35'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
28
migrations/versions/5c85ebc9451b_auto.py
Normal file
28
migrations/versions/5c85ebc9451b_auto.py
Normal file
@ -0,0 +1,28 @@
|
||||
"""auto
|
||||
|
||||
Revision ID: 5c85ebc9451b
|
||||
Revises: d8bfe4d4c083
|
||||
Create Date: 2025-06-05 09:47:14.478039
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '5c85ebc9451b'
|
||||
down_revision = 'd8bfe4d4c083'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
28
migrations/versions/64ec4065d18d_auto.py
Normal file
28
migrations/versions/64ec4065d18d_auto.py
Normal file
@ -0,0 +1,28 @@
|
||||
"""auto
|
||||
|
||||
Revision ID: 64ec4065d18d
|
||||
Revises: 4bdec754b085
|
||||
Create Date: 2025-06-05 04:40:02.186807
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '64ec4065d18d'
|
||||
down_revision = '4bdec754b085'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
46
migrations/versions/72455429fdaf_auto.py
Normal file
46
migrations/versions/72455429fdaf_auto.py
Normal file
@ -0,0 +1,46 @@
|
||||
"""auto
|
||||
|
||||
Revision ID: 72455429fdaf
|
||||
Revises: 501b54868875
|
||||
Create Date: 2025-06-05 05:07:43.605568
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import mysql
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '72455429fdaf'
|
||||
down_revision = '501b54868875'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('transfer_request',
|
||||
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
|
||||
sa.Column('plant_id', sa.Integer(), nullable=False),
|
||||
sa.Column('seller_id', sa.Integer(), nullable=False),
|
||||
sa.Column('buyer_id', sa.Integer(), nullable=False),
|
||||
sa.Column('status', sa.String(length=20), nullable=False),
|
||||
sa.Column('created_at', sa.DateTime(), nullable=True),
|
||||
sa.Column('updated_at', sa.DateTime(), nullable=True),
|
||||
sa.Column('seller_message', sa.String(length=512), nullable=True),
|
||||
sa.Column('buyer_message', sa.String(length=512), nullable=True),
|
||||
sa.ForeignKeyConstraint(['buyer_id'], ['users.id'], ),
|
||||
sa.ForeignKeyConstraint(['plant_id'], ['plant.id'], ),
|
||||
sa.ForeignKeyConstraint(['seller_id'], ['users.id'], ),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.add_column('plant', sa.Column('data_verified', sa.Boolean(), nullable=False))
|
||||
op.drop_column('plant_ownership_log', 'graph_node_id')
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('plant_ownership_log', sa.Column('graph_node_id', mysql.VARCHAR(length=255), nullable=True))
|
||||
op.drop_column('plant', 'data_verified')
|
||||
op.drop_table('transfer_request')
|
||||
# ### end Alembic commands ###
|
28
migrations/versions/7dbb6d550055_auto.py
Normal file
28
migrations/versions/7dbb6d550055_auto.py
Normal file
@ -0,0 +1,28 @@
|
||||
"""auto
|
||||
|
||||
Revision ID: 7dbb6d550055
|
||||
Revises: 72455429fdaf
|
||||
Create Date: 2025-06-05 05:10:43.392181
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '7dbb6d550055'
|
||||
down_revision = '72455429fdaf'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
28
migrations/versions/85da58851d35_auto.py
Normal file
28
migrations/versions/85da58851d35_auto.py
Normal file
@ -0,0 +1,28 @@
|
||||
"""auto
|
||||
|
||||
Revision ID: 85da58851d35
|
||||
Revises: 8cd29b8fb6ec
|
||||
Create Date: 2025-06-05 05:20:46.638884
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '85da58851d35'
|
||||
down_revision = '8cd29b8fb6ec'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
28
migrations/versions/8cd29b8fb6ec_auto.py
Normal file
28
migrations/versions/8cd29b8fb6ec_auto.py
Normal file
@ -0,0 +1,28 @@
|
||||
"""auto
|
||||
|
||||
Revision ID: 8cd29b8fb6ec
|
||||
Revises: 7dbb6d550055
|
||||
Create Date: 2025-06-05 05:12:50.608338
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '8cd29b8fb6ec'
|
||||
down_revision = '7dbb6d550055'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
28
migrations/versions/c9495b058ab0_auto.py
Normal file
28
migrations/versions/c9495b058ab0_auto.py
Normal file
@ -0,0 +1,28 @@
|
||||
"""auto
|
||||
|
||||
Revision ID: c9495b058ab0
|
||||
Revises: 373571dfe134
|
||||
Create Date: 2025-06-05 09:42:35.228096
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'c9495b058ab0'
|
||||
down_revision = '373571dfe134'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
28
migrations/versions/d8bfe4d4c083_auto.py
Normal file
28
migrations/versions/d8bfe4d4c083_auto.py
Normal file
@ -0,0 +1,28 @@
|
||||
"""auto
|
||||
|
||||
Revision ID: d8bfe4d4c083
|
||||
Revises: c9495b058ab0
|
||||
Create Date: 2025-06-05 09:44:47.740029
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'd8bfe4d4c083'
|
||||
down_revision = 'c9495b058ab0'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
Reference in New Issue
Block a user