Don't limit length (and fix migration)
This commit is contained in:
parent
da1a708e28
commit
4d9d43b0f0
3 changed files with 7 additions and 7 deletions
|
@ -1,13 +1,13 @@
|
||||||
"""Add user associations
|
"""Add user associations
|
||||||
|
|
||||||
Revision ID: 5c8378aa4dff
|
Revision ID: f6a6004bf4b9
|
||||||
Revises: 55013fe95bea
|
Revises: 55013fe95bea
|
||||||
Create Date: 2022-05-20 21:32:47.786340
|
Create Date: 2022-05-24 21:23:27.770365
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# revision identifiers, used by Alembic.
|
# revision identifiers, used by Alembic.
|
||||||
revision = '5c8378aa4dff'
|
revision = 'f6a6004bf4b9'
|
||||||
down_revision = '55013fe95bea'
|
down_revision = '55013fe95bea'
|
||||||
|
|
||||||
from alembic import op
|
from alembic import op
|
||||||
|
@ -16,8 +16,8 @@ import sqlalchemy as sa
|
||||||
|
|
||||||
def upgrade():
|
def upgrade():
|
||||||
# ### commands auto generated by Alembic - please adjust! ###
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
op.add_column('order', sa.Column('association', sa.String(length=120), nullable=False, default=""))
|
op.add_column('order', sa.Column('association', sa.String(length=120), server_default='', nullable=False))
|
||||||
op.add_column('user', sa.Column('associations', sa.String(length=120), nullable=False, default=""))
|
op.add_column('user', sa.Column('associations', sa.String(), server_default='', nullable=False))
|
||||||
# ### end Alembic commands ###
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ class Order(db.Model):
|
||||||
stoptime = db.Column(db.DateTime)
|
stoptime = db.Column(db.DateTime)
|
||||||
public = db.Column(db.Boolean, default=True)
|
public = db.Column(db.Boolean, default=True)
|
||||||
slug = db.Column(db.String(7), default=generate_slug, unique=True)
|
slug = db.Column(db.String(7), default=generate_slug, unique=True)
|
||||||
association = db.Column(db.String(120), nullable=False)
|
association = db.Column(db.String(120), nullable=False, server_default="")
|
||||||
|
|
||||||
items = db.relationship("OrderItem", backref="order", lazy="dynamic")
|
items = db.relationship("OrderItem", backref="order", lazy="dynamic")
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ class User(db.Model):
|
||||||
admin = db.Column(db.Boolean)
|
admin = db.Column(db.Boolean)
|
||||||
bias = db.Column(db.Integer)
|
bias = db.Column(db.Integer)
|
||||||
# Assocation logic
|
# Assocation logic
|
||||||
associations = db.Column(db.String(120), nullable=False)
|
associations = db.Column(db.String(), nullable=False, server_default="")
|
||||||
|
|
||||||
# Relations
|
# Relations
|
||||||
runs = db.relation(
|
runs = db.relation(
|
||||||
|
|
Loading…
Reference in a new issue