From 8674092e131718fe4c17db0ef8c3c4b0c1ffa2d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?X=C3=A9fir=20Destiny?= Date: Sun, 15 Dec 2019 12:55:49 +0100 Subject: [PATCH] Fix default creation of database --- models.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/models.py b/models.py index 594de94..66c17cd 100644 --- a/models.py +++ b/models.py @@ -8,23 +8,23 @@ from config import db class AnimeFolder(db.Model): id = db.Column(db.Integer, primary_key=True) - name = db.Column(db.Text, unique=True, nullable=False) + name = db.Column(db.Text, unique=True, nullable=False, collation='utf8mb4_general_ci') titles = db.relationship("AnimeTitle", backref="folder") class AnimeTitle(db.Model): id = db.Column(db.Integer, primary_key=True) - name = db.Column(db.Text, unique=True, nullable=False) - keyword = db.Column(db.Text, nullable=False) + name = db.Column(db.Text, unique=True, nullable=False, collation='utf8mb4_general_ci') + keyword = db.Column(db.Text, nullable=False, collation='utf8mb4_general_ci') folder_id = db.Column(db.Integer, db.ForeignKey('anime_folder.id')) links = db.relationship('AnimeLink', backref="title") class AnimeLink(db.Model): id = db.Column(db.Integer, primary_key=True) - link = db.Column(db.Text, nullable=False) - season = db.Column(db.Text, nullable=False) - comment = db.Column(db.Text) + link = db.Column(db.Text, nullable=False, collation='utf8mb4_general_ci') + season = db.Column(db.Text, nullable=False, collation='utf8mb4_general_ci') + comment = db.Column(db.Text, collation='utf8mb4_general_ci') vf = db.Column(db.Boolean, nullable=False) title_id = db.Column(db.Integer, db.ForeignKey('anime_title.id'))