No cake for you postgres
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Michel Roux 2022-03-04 10:00:41 +01:00
parent ff8dd87bc9
commit c73d5b91ba

View File

@ -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'))