mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-09 00:53:51 +01:00
Add uncommitted migration for more release meta
This commit is contained in:
parent
c06ca52f4c
commit
2d7845209f
29
migrations/versions/daa040b727b2_.py
Normal file
29
migrations/versions/daa040b727b2_.py
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
"""empty message
|
||||||
|
|
||||||
|
Revision ID: daa040b727b2
|
||||||
|
Revises: 097ce5d114d9
|
||||||
|
Create Date: 2024-06-22 13:57:51.857616
|
||||||
|
|
||||||
|
"""
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = "daa040b727b2"
|
||||||
|
down_revision = "097ce5d114d9"
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
with op.batch_alter_table("package_release", schema=None) as batch_op:
|
||||||
|
batch_op.add_column(sa.Column("name", sa.String(length=30), nullable=False, server_default="title"))
|
||||||
|
batch_op.add_column(sa.Column("release_notes", sa.UnicodeText(), nullable=True))
|
||||||
|
batch_op.alter_column("releaseDate", nullable=False, new_column_name="created_at")
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
with op.batch_alter_table("package_release", schema=None) as batch_op:
|
||||||
|
batch_op.alter_column("created_at", nullable=False, new_column_name="releaseDate")
|
||||||
|
batch_op.drop_column("release_notes")
|
||||||
|
batch_op.drop_column("name")
|
Loading…
Reference in New Issue
Block a user