Support old version of MySQL
This commit is contained in:
parent
0d6ca75487
commit
c6e5bb1bdd
@ -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")
|
||||
|
Reference in New Issue
Block a user