mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-03 03:37:28 +01:00
Increase task_id column length
This commit is contained in:
parent
73a7ebc352
commit
a0814f4792
@ -392,7 +392,7 @@ class PackageRelease(db.Model):
|
|||||||
releaseDate = db.Column(db.DateTime, nullable=False)
|
releaseDate = db.Column(db.DateTime, nullable=False)
|
||||||
url = db.Column(db.String(100), nullable=False)
|
url = db.Column(db.String(100), nullable=False)
|
||||||
approved = db.Column(db.Boolean, nullable=False, default=False)
|
approved = db.Column(db.Boolean, nullable=False, default=False)
|
||||||
task_id = db.Column(db.String(32), nullable=True)
|
task_id = db.Column(db.String(37), nullable=True)
|
||||||
|
|
||||||
|
|
||||||
def getEditURL(self):
|
def getEditURL(self):
|
||||||
|
@ -41,7 +41,7 @@ def run_migrations_offline():
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
url = config.get_main_option("sqlalchemy.url")
|
url = config.get_main_option("sqlalchemy.url")
|
||||||
context.configure(url=url)
|
context.configure(url=url, compare_type=True)
|
||||||
|
|
||||||
with context.begin_transaction():
|
with context.begin_transaction():
|
||||||
context.run_migrations()
|
context.run_migrations()
|
||||||
@ -73,6 +73,7 @@ def run_migrations_online():
|
|||||||
context.configure(connection=connection,
|
context.configure(connection=connection,
|
||||||
target_metadata=target_metadata,
|
target_metadata=target_metadata,
|
||||||
process_revision_directives=process_revision_directives,
|
process_revision_directives=process_revision_directives,
|
||||||
|
compare_type=True,
|
||||||
**current_app.extensions['migrate'].configure_args)
|
**current_app.extensions['migrate'].configure_args)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
34
migrations/versions/f30031f0b928_.py
Normal file
34
migrations/versions/f30031f0b928_.py
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
"""empty message
|
||||||
|
|
||||||
|
Revision ID: f30031f0b928
|
||||||
|
Revises: 83622276d439
|
||||||
|
Create Date: 2018-05-23 18:19:07.428378
|
||||||
|
|
||||||
|
"""
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = 'f30031f0b928'
|
||||||
|
down_revision = '83622276d439'
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.alter_column('package_release', 'task_id',
|
||||||
|
existing_type=sa.VARCHAR(length=32),
|
||||||
|
type_=sa.String(length=37),
|
||||||
|
existing_nullable=True)
|
||||||
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.alter_column('package_release', 'task_id',
|
||||||
|
existing_type=sa.String(length=37),
|
||||||
|
type_=sa.VARCHAR(length=32),
|
||||||
|
existing_nullable=True)
|
||||||
|
# ### end Alembic commands ###
|
Loading…
Reference in New Issue
Block a user