forked from ScoDoc/DocScoDoc
migrate_scodoc7_dept_archives (ajout du s au nom de la fonction)
This commit is contained in:
parent
4fc31d8b47
commit
d8e1c428b0
@ -41,7 +41,7 @@ class Identite(db.Model):
|
||||
code_nip = db.Column(db.Text())
|
||||
code_ine = db.Column(db.Text())
|
||||
# Ancien id ScoDoc7 pour les migrations de bases anciennes
|
||||
# ne pas utiliser après migrate_scodoc7_dept_archive
|
||||
# ne pas utiliser après migrate_scodoc7_dept_archives
|
||||
scodoc7_id = db.Column(db.Text(), nullable=True)
|
||||
#
|
||||
billets = db.relationship("BilletAbsence", backref="etudiant", lazy="dynamic")
|
||||
|
@ -79,7 +79,7 @@ class FormSemestre(db.Model):
|
||||
)
|
||||
|
||||
# Ancien id ScoDoc7 pour les migrations de bases anciennes
|
||||
# ne pas utiliser après migrate_scodoc7_dept_archive
|
||||
# ne pas utiliser après migrate_scodoc7_dept_archives
|
||||
scodoc7_id = db.Column(db.Text(), nullable=True)
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
|
@ -319,9 +319,9 @@ def import_scodoc7_dept(dept: str, dept_db_name: str = ""): # import-scodoc7-de
|
||||
@app.cli.command()
|
||||
@click.argument("dept", default="")
|
||||
@with_appcontext
|
||||
def migrate_scodoc7_dept_archive(dept: str): # migrate-scodoc7-dept-archive
|
||||
def migrate_scodoc7_dept_archives(dept: str): # migrate-scodoc7-dept-archives
|
||||
"""Post-migration: renomme les archives en fonction des id de ScoDoc 9"""
|
||||
tools.migrate_scodoc7_dept_archive(dept)
|
||||
tools.migrate_scodoc7_dept_archives(dept)
|
||||
|
||||
|
||||
@app.cli.command()
|
||||
|
@ -6,4 +6,4 @@
|
||||
|
||||
from tools.import_scodoc7_user_db import import_scodoc7_user_db
|
||||
from tools.import_scodoc7_dept import import_scodoc7_dept
|
||||
from tools.migrate_scodoc7_archives import migrate_scodoc7_dept_archive
|
||||
from tools.migrate_scodoc7_archives import migrate_scodoc7_dept_archives
|
||||
|
@ -11,7 +11,7 @@ from app.models.formsemestre import FormSemestre
|
||||
from app.models.etudiants import Identite
|
||||
|
||||
|
||||
def migrate_scodoc7_dept_archive(dept_name=""):
|
||||
def migrate_scodoc7_dept_archives(dept_name=""):
|
||||
if dept_name:
|
||||
depts = Departement.query.filter_by(acronym=dept_name)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user