WIP: claude works hard
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
"""prs_stages and drop competition fields
|
||||
|
||||
Revision ID: bf96ceb7f076
|
||||
Revises: edf627601b3d
|
||||
Create Date: 2026-03-18 15:41:28.882592
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'bf96ceb7f076'
|
||||
down_revision = 'edf627601b3d'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('shooting_sessions', schema=None) as batch_op:
|
||||
batch_op.add_column(sa.Column('prs_stages', sa.JSON(), nullable=True))
|
||||
batch_op.drop_column('competition_stage')
|
||||
batch_op.drop_column('competition_division')
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('shooting_sessions', schema=None) as batch_op:
|
||||
batch_op.add_column(sa.Column('competition_division', sa.VARCHAR(length=100), autoincrement=False, nullable=True))
|
||||
batch_op.add_column(sa.Column('competition_stage', sa.VARCHAR(length=255), autoincrement=False, nullable=True))
|
||||
batch_op.drop_column('prs_stages')
|
||||
|
||||
# ### end Alembic commands ###
|
||||
@@ -0,0 +1,49 @@
|
||||
"""session_type and analysis_grouping_fields
|
||||
|
||||
Revision ID: edf627601b3d
|
||||
Revises: d46dc696b3c3
|
||||
Create Date: 2026-03-18 14:12:25.811674
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'edf627601b3d'
|
||||
down_revision = 'd46dc696b3c3'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('analyses', schema=None) as batch_op:
|
||||
batch_op.add_column(sa.Column('grouping_outlier_factor', sa.Double(), nullable=True))
|
||||
batch_op.add_column(sa.Column('grouping_manual_splits', sa.JSON(), nullable=True))
|
||||
|
||||
with op.batch_alter_table('shooting_sessions', schema=None) as batch_op:
|
||||
batch_op.add_column(sa.Column('session_type', sa.String(length=50), nullable=True))
|
||||
batch_op.add_column(sa.Column('competition_stage', sa.String(length=255), nullable=True))
|
||||
batch_op.add_column(sa.Column('competition_division', sa.String(length=100), nullable=True))
|
||||
batch_op.add_column(sa.Column('shooting_position', sa.String(length=100), nullable=True))
|
||||
|
||||
# Backfill existing sessions as long_range precision
|
||||
op.execute("UPDATE shooting_sessions SET session_type = 'long_range' WHERE session_type IS NULL")
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('shooting_sessions', schema=None) as batch_op:
|
||||
batch_op.drop_column('shooting_position')
|
||||
batch_op.drop_column('competition_division')
|
||||
batch_op.drop_column('competition_stage')
|
||||
batch_op.drop_column('session_type')
|
||||
|
||||
with op.batch_alter_table('analyses', schema=None) as batch_op:
|
||||
batch_op.drop_column('grouping_manual_splits')
|
||||
batch_op.drop_column('grouping_outlier_factor')
|
||||
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user