mirror of
https://github.com/suitenumerique/drive.git
synced 2026-04-26 01:24:55 +02:00
Preserve django_site table during e2e db clearing to avoid breaking site configuration. Add video recording on first retry and screenshot capture on failure for easier debugging of flaky tests.
10 lines
337 B
SQL
10 lines
337 B
SQL
DO $$
|
|
DECLARE r RECORD;
|
|
BEGIN
|
|
FOR r IN (SELECT tablename FROM pg_tables WHERE schemaname = 'public' AND tablename != 'django_migrations' AND tablename != 'django_site')
|
|
LOOP
|
|
RAISE NOTICE 'Truncating table %', r.tablename;
|
|
EXECUTE 'TRUNCATE TABLE ' || quote_ident(r.tablename) || ' CASCADE';
|
|
END LOOP;
|
|
END $$;
|