forked from kompetenzinventar/ki-backend
extend skill name to 50 chars #58
This commit is contained in:
parent
f0d05bbf22
commit
9dc9761a1a
2
app.py
2
app.py
@ -38,7 +38,7 @@ app.config["KI_LDAP_BASE_DN"] = os.getenv("KI_LDAP_BASE_DN")
|
||||
|
||||
CORS(app)
|
||||
db = SQLAlchemy(app)
|
||||
migrate = Migrate(app, db)
|
||||
migrate = Migrate(app, db, compare_type=True)
|
||||
|
||||
logging.debug("Hello from KI")
|
||||
|
||||
|
@ -149,7 +149,7 @@ class Skill(db.Model):
|
||||
__tablename__ = "skill"
|
||||
|
||||
id = Column(Integer, primary_key=True)
|
||||
name = Column(String(25), unique=True, nullable=False)
|
||||
name = Column(String(50), unique=True, nullable=False)
|
||||
|
||||
profiles = relationship("ProfileSkill", back_populates="skill")
|
||||
searchtopics = relationship("ProfileSearchtopic", back_populates="skill")
|
||||
|
@ -0,0 +1,24 @@
|
||||
"""extend skill length to 50 chars
|
||||
|
||||
Revision ID: b5023977cbda
|
||||
Revises: 459520b01f34
|
||||
Create Date: 2021-11-22 20:07:19.188217
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'b5023977cbda'
|
||||
down_revision = '459520b01f34'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
with op.batch_alter_table("skill") as batch_op:
|
||||
batch_op.alter_column('name',
|
||||
existing_type=sa.VARCHAR(length=25),
|
||||
type_=sa.String(length=50),
|
||||
existing_nullable=False)
|
Loading…
Reference in New Issue
Block a user