From c73d5b91ba26e3d8cf964df5e2c82ea07f480836 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Fri, 4 Mar 2022 10:00:41 +0100 Subject: [PATCH] No cake for you postgres --- pynyaata/models.py | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/pynyaata/models.py b/pynyaata/models.py index 4e19641..fbaa87f 100644 --- a/pynyaata/models.py +++ b/pynyaata/models.py @@ -3,11 +3,8 @@ from .config import db class AnimeFolder(db.Model): id = db.Column(db.Integer, primary_key=True) - name = db.Column(db.String( - length=100, - collation='utf8mb4_general_ci' - ), unique=True, nullable=False) - path = db.Column(db.String(length=100, collation='utf8mb4_general_ci')) + name = db.Column(db.String(length=100), unique=True, nullable=False) + path = db.Column(db.String(length=100)) titles = db.relationship( "AnimeTitle", backref="folder", @@ -17,13 +14,8 @@ class AnimeFolder(db.Model): class AnimeTitle(db.Model): id = db.Column(db.Integer, primary_key=True) - 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) + name = db.Column(db.String(length=100), unique=True, nullable=False) + keyword = db.Column(db.Text(), nullable=False) folder_id = db.Column(db.Integer, db.ForeignKey('anime_folder.id')) links = db.relationship( 'AnimeLink', @@ -34,9 +26,9 @@ class AnimeTitle(db.Model): class AnimeLink(db.Model): id = db.Column(db.Integer, primary_key=True) - link = db.Column(db.Text(collation='utf8mb4_general_ci'), nullable=False) - season = db.Column(db.Text(collation='utf8mb4_general_ci'), nullable=False) - comment = db.Column(db.Text(collation='utf8mb4_general_ci')) + link = db.Column(db.Text(), nullable=False) + season = db.Column(db.Text(), nullable=False) + comment = db.Column(db.Text()) vf = db.Column(db.Boolean, nullable=False) title_id = db.Column(db.Integer, db.ForeignKey('anime_title.id'))