forked from ScoDoc/ScoDoc
modif contraintes pour codes NIP et INE si même étudiant dans plusieurs dept
This commit is contained in:
parent
a022a80632
commit
c6fc46e0e2
@ -14,6 +14,10 @@ class Identite(db.Model):
|
|||||||
"""étudiant"""
|
"""étudiant"""
|
||||||
|
|
||||||
__tablename__ = "identite"
|
__tablename__ = "identite"
|
||||||
|
__table_args__ = (
|
||||||
|
db.UniqueConstraint("dept_id", "code_nip"),
|
||||||
|
db.UniqueConstraint("dept_id", "code_ine"),
|
||||||
|
)
|
||||||
|
|
||||||
id = db.Column(db.Integer, primary_key=True)
|
id = db.Column(db.Integer, primary_key=True)
|
||||||
etudid = db.synonym("id")
|
etudid = db.synonym("id")
|
||||||
@ -33,8 +37,9 @@ class Identite(db.Model):
|
|||||||
statut = db.Column(db.Text())
|
statut = db.Column(db.Text())
|
||||||
boursier = db.Column(db.Boolean()) # True si boursier ('O' en ScoDoc7)
|
boursier = db.Column(db.Boolean()) # True si boursier ('O' en ScoDoc7)
|
||||||
photo_filename = db.Column(db.Text())
|
photo_filename = db.Column(db.Text())
|
||||||
code_nip = db.Column(db.Text(), unique=True)
|
# Codes INE et NIP pas unique car le meme etud peut etre ds plusieurs dept
|
||||||
code_ine = db.Column(db.Text(), unique=True)
|
code_nip = db.Column(db.Text())
|
||||||
|
code_ine = db.Column(db.Text())
|
||||||
|
|
||||||
|
|
||||||
class Adresse(db.Model):
|
class Adresse(db.Model):
|
||||||
|
Loading…
Reference in New Issue
Block a user