Initial Commit
slip slop
This commit is contained in:
commit
064e672ab7
61 changed files with 3504 additions and 0 deletions
32
migrations/versions/abdeb80d003e_add_tunings.py
Normal file
32
migrations/versions/abdeb80d003e_add_tunings.py
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
"""add tunings table and tuning_id fk on tune_by_instrument
|
||||
|
||||
Revision ID: abdeb80d003e
|
||||
Revises: 84db90f5499e
|
||||
Create Date: 2026-06-09
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
revision = "abdeb80d003e"
|
||||
down_revision = "84db90f5499e"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.create_table(
|
||||
"tunings",
|
||||
sa.Column("id", sa.Integer(), primary_key=True, autoincrement=True, nullable=False),
|
||||
sa.Column("name", sa.String(), nullable=False, unique=True),
|
||||
)
|
||||
op.drop_column("tune_by_instrument", "tuning")
|
||||
op.add_column("tune_by_instrument",
|
||||
sa.Column("tuning_id", sa.Integer(),
|
||||
sa.ForeignKey("tunings.id", ondelete="SET NULL"),
|
||||
nullable=True))
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_column("tune_by_instrument", "tuning_id")
|
||||
op.add_column("tune_by_instrument", sa.Column("tuning", sa.String(), nullable=True))
|
||||
op.drop_table("tunings")
|
||||
Loading…
Add table
Add a link
Reference in a new issue