VARCHAR requires a length in mysql

This commit is contained in:
Charlotte Van Petegem 2022-05-30 18:50:46 +02:00
parent bb49fb2795
commit 8f3750060b
No known key found for this signature in database
GPG key ID: 019E764B7184435A
2 changed files with 2 additions and 2 deletions

View file

@ -17,7 +17,7 @@ import sqlalchemy as sa
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('order', sa.Column('association', sa.String(length=120), server_default='', nullable=False))
op.add_column('user', sa.Column('associations', sa.String(), server_default='', nullable=False))
op.add_column('user', sa.Column('associations', sa.String(length=255), server_default='', nullable=False))
# ### end Alembic commands ###

View file

@ -11,7 +11,7 @@ class User(db.Model):
admin = db.Column(db.Boolean)
bias = db.Column(db.Integer)
# Assocation logic
associations = db.Column(db.String(), nullable=False, server_default="")
associations = db.Column(db.String(255), nullable=False, server_default="")
# Relations
runs = db.relation(