{% extends "admin_base.jinja.html" %} {% block content %} {% for error in form.file.errors %}
The import file has to be a text file (with .txt
at the end) encoded in UTF-8. It has to strictly follow the required format.
You can take a look at the file example_database_import.txt for an example.
The following tables can not be imported from a file and have to be manipulated using the web interface.
If an attribute is optional/nullable and has no value, then NULL
(uppercase) has to be written.
None of the mentioned ids in the import file is meant as a database id. The ids here only refer to the imported instances. The id in the database is assigned automatically.
Here is the format of a table in the "Tables" section:
The type of attributes can be seen in the drawio file DB.drawio which can be opened using diagrams.net. Some attributes have constraints marked also in the drawio file.
student_number
first_name
last_name
uni_email
contact_email
(optional)
bachelor_thesis
(optional)
bachelor_thesis_work_group
(optional)
note
(optional)
student_number
is found in the database but first_name
, last_name
or uni_email
do not match, a warning is given during the import. Pay attention to warnings!
bachelor_thesis
and bachelor_thesis_work_group
are only updated in the database if they are not NULL
. This prevents overriding values written using the web interface.
note
is not NULL
then it is appended to the note in the database if the student already exists in the database. It will not overwrite existing notes.
id
number
→ 1 / 2 / ...
program_label
student_number
part_id
group_id
id
number
→ 1 / 2 / ...
program_label
id
experiment_id
group_id
date
→ 12.09.2022
special
→ 1 / 0
group_experiment_id
assistant_email