Commit 02f094c7 authored by Stephane Crozat's avatar Stephane Crozat
Browse files

Adding reinit procedure

parent 8c499c0b
...@@ -4,14 +4,15 @@ git clone https://gitlab.utc.fr/crozatst/apisub.git . ...@@ -4,14 +4,15 @@ git clone https://gitlab.utc.fr/crozatst/apisub.git .
# PostgreSQL # PostgreSQL
## Bascics ## Basics
apt-get install postgresql postgresql-contrib apt-get install postgresql postgresql-contrib
### NB : Check postgresql fr_FR locale is avaiblable (if not `dpkg-reconfigure locales`)
## Add external data ## Add external data
add student.csv to data add student.csv to student
## Create user and db ## Create user and db
sudo su postgres su postgres
sh/apisub_init.sh password sh/apisub_init.sh password
## Create apisub user for backup ## Create apisub user for backup
......
# Procédure de mise à jour du site pour une nouvelle session d'Api
## Backup
su postgres
pg_dump apisub -f /home/stc/apidump/apisub20200929.sql
scp stc@pic.crzt.fr:/home/stc/apidump/* .
## Mise à jour des dates
```
UPDATE config SET closed='f', openbegin='2021-01-18', openend='2021-01-29';
```
## Niveau des étudiants
- Vider la table student
- Ré-insérer les données à jour dans la table student
```
DELETE FROM student;
\copy student FROM '/tmp/students.csv' DELIMITER ';'
```
## Api
- Vider la liste des inscriptions et des api
```
DELETE FROM subscribe;
DELETE FROM api;
```
...@@ -17,7 +17,7 @@ class Admin { ...@@ -17,7 +17,7 @@ class Admin {
} }
public function activeYear() { public function activeYear() {
return 2020; return 2021;
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment