README.md 693 Bytes
Newer Older
1 2
# Procédures d'import

3 4 5
## Import des niveaux des étudiants
fichier CSV : utclogin;level

Stephane Crozat's avatar
Stephane Crozat committed
6
```
Stephane Crozat's avatar
Stephane Crozat committed
7
DELETE FROM student;
Stephane Crozat's avatar
Stephane Crozat committed
8
\copy student FROM '/tmp/students.csv' DELIMITER ';'
9
```
10

Stephane Crozat's avatar
Stephane Crozat committed
11 12 13 14 15 16 17 18 19 20 21 22 23
## Sync de la base de prod avec la base locale (pour tests)
su postgres
psql

```
\c postgres
DROP DATABASE apisub;
CREATE DATABASE apisub WITH OWNER apisub;
\c apisub
BEGIN;
\i /home/stc/Bureau/apisub20181213.sql
SELECT pg_catalog.set_config('search_path', 'public', false);
COMMIT;
24
```
25 26 27 28 29 30 31 32 33 34 35 36 37 38

## Manual INSERT of Api

INSERT INTO api (id,dbegin,code,name,description,duration,size,ects,resplogin) VALUES (
gen_random_uuid(),
TO_DATE('01/01/2020','DD/MM/YYYY'),
'code',
'title,
'longtitle',
duration,
size,
ects,
'login'
);