From 7769b371c756637a8d2646d331fa2d75a687a07e Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sun, 15 Aug 2021 22:11:47 +0200 Subject: [PATCH] chaines de taille variable (text) pour tags et codes INE et NIP --- app/models/etudiants.py | 4 ++-- app/models/formations.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/etudiants.py b/app/models/etudiants.py index 29852ed9de..41a4cf112a 100644 --- a/app/models/etudiants.py +++ b/app/models/etudiants.py @@ -33,8 +33,8 @@ class Identite(db.Model): statut = db.Column(db.Text()) boursier = db.Column(db.Boolean()) # True si boursier ('O' en ScoDoc7) photo_filename = db.Column(db.Text()) - code_nip = db.Column(db.String(CODE_STR_LEN), unique=True) - code_ine = db.Column(db.String(CODE_STR_LEN), unique=True) + code_nip = db.Column(db.Text(), unique=True) + code_ine = db.Column(db.Text(), unique=True) class Adresse(db.Model): diff --git a/app/models/formations.py b/app/models/formations.py index f40085b6b9..7a2e8b2788 100644 --- a/app/models/formations.py +++ b/app/models/formations.py @@ -113,7 +113,7 @@ class NotesTag(db.Model): dept_id = db.Column(db.Integer, db.ForeignKey("departement.id"), index=True) tag_id = db.synonym("id") - title = db.Column(db.String(SHORT_STR_LEN), nullable=False, unique=True) + title = db.Column(db.Text(), nullable=False, unique=True) # Association tag <-> module