Ajout champs confidential sur EtudAnnotation

This commit is contained in:
ilona 2024-08-23 06:30:12 +02:00
parent 6a48d5bbcf
commit 97b3322e51
2 changed files with 6 additions and 0 deletions

View File

@ -1127,6 +1127,7 @@ class EtudAnnotation(models.ScoDocModel):
etudid = db.Column(db.Integer, db.ForeignKey(Identite.id))
author = db.Column(db.Text) # le pseudo (user_name), was zope_authenticated_user
comment = db.Column(db.Text)
confidential = db.Column(db.Boolean, default=False)
_sco_dept_relations = ("Identite",) # accès au dept_id

View File

@ -43,9 +43,14 @@ def upgrade():
)
with op.batch_alter_table("notes_formsemestre", schema=None) as batch_op:
batch_op.add_column(sa.Column("capacite_accueil", sa.Integer(), nullable=True))
# Annotations confidentielles
with op.batch_alter_table("etud_annotations", schema=None) as batch_op:
batch_op.add_column(sa.Column("confidential", sa.Boolean(), nullable=True))
def downgrade():
with op.batch_alter_table("notes_formsemestre", schema=None) as batch_op:
batch_op.drop_column("capacite_accueil")
op.drop_table("notes_formsemestre_description")
with op.batch_alter_table("etud_annotations", schema=None) as batch_op:
batch_op.drop_column("confidential")