From c6e5bb1bddbb4f56b0e23f58ff4a12690e62dcd6 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Sat, 21 Mar 2020 19:03:57 +0100 Subject: [PATCH] Support old version of MySQL --- models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models.py b/models.py index 79247f5..7881f9e 100644 --- a/models.py +++ b/models.py @@ -8,13 +8,13 @@ from config import db class AnimeFolder(db.Model): id = db.Column(db.Integer, primary_key=True) - name = db.Column(db.Text(collation='utf8mb4_general_ci'), unique=True, nullable=False) + name = db.Column(db.String(length=100, collation='utf8mb4_general_ci'), unique=True, nullable=False) titles = db.relationship("AnimeTitle", backref="folder") class AnimeTitle(db.Model): id = db.Column(db.Integer, primary_key=True) - name = db.Column(db.Text(collation='utf8mb4_general_ci'), unique=True, nullable=False) + name = db.Column(db.String(length=100, collation='utf8mb4_general_ci'), unique=True, nullable=False) keyword = db.Column(db.Text(collation='utf8mb4_general_ci'), nullable=False) folder_id = db.Column(db.Integer, db.ForeignKey('anime_folder.id')) links = db.relationship('AnimeLink', backref="title")