diff --git a/app/models/raw_sql_init.py b/app/models/raw_sql_init.py index 6cfde9d9..58094687 100644 --- a/app/models/raw_sql_init.py +++ b/app/models/raw_sql_init.py @@ -32,7 +32,8 @@ DECLARE SELECT tablename FROM pg_tables WHERE tableowner = username AND schemaname = 'public' AND tablename <> 'notes_semestres' - AND tablename <> 'notes_form_modalites'; + AND tablename <> 'notes_form_modalites' + AND tablename <> 'alembic_version'; BEGIN FOR stmt IN statements LOOP EXECUTE 'TRUNCATE TABLE ' || quote_ident(stmt.tablename) || ' CASCADE;'; diff --git a/migrations/versions/993ce4a01d57_scodoc_9_0_3.py b/migrations/versions/993ce4a01d57_scodoc_9_0_3.py index c1e87c93..9cc85984 100644 --- a/migrations/versions/993ce4a01d57_scodoc_9_0_3.py +++ b/migrations/versions/993ce4a01d57_scodoc_9_0_3.py @@ -34,7 +34,8 @@ DECLARE SELECT tablename FROM pg_tables WHERE tableowner = username AND schemaname = 'public' AND tablename <> 'notes_semestres' - AND tablename <> 'notes_form_modalites'; + AND tablename <> 'notes_form_modalites' + AND tablename <> 'alembic_version'; BEGIN FOR stmt IN statements LOOP EXECUTE 'TRUNCATE TABLE ' || quote_ident(stmt.tablename) || ' CASCADE;';