Skip to content

Commit

Permalink
Trim grant and stable timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
benjie committed Dec 11, 2024
1 parent 209dbf6 commit 0103634
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
38 changes: 19 additions & 19 deletions __tests__/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -376,23 +376,23 @@ ALTER TABLE graphile_worker._private_known_crontabs ENABLE ROW LEVEL SECURITY;
ALTER TABLE graphile_worker._private_tasks ENABLE ROW LEVEL SECURITY;
SELECT pg_catalog.set_config('search_path', '', false);
COPY graphile_worker.migrations (id, ts, breaking) FROM stdin;
1 2024-12-11 16:33:34.832099+00 t
2 2024-12-11 16:33:34.869094+00 f
3 2024-12-11 16:33:34.879306+00 t
4 2024-12-11 16:33:34.881577+00 f
5 2024-12-11 16:33:34.885313+00 f
6 2024-12-11 16:33:34.888433+00 f
7 2024-12-11 16:33:34.903467+00 f
8 2024-12-11 16:33:34.906565+00 f
9 2024-12-11 16:33:34.922042+00 f
10 2024-12-11 16:33:34.924261+00 f
11 2024-12-11 16:33:34.926218+00 t
12 2024-12-11 16:33:35.036279+00 f
13 2024-12-11 16:33:35.039057+00 t
14 2024-12-11 16:33:35.042399+00 t
15 2024-12-11 16:33:35.044275+00 f
16 2024-12-11 16:33:35.045737+00 t
17 2024-12-11 16:33:35.048717+00 f
18 2024-12-11 16:33:35.051647+00 f
19 2024-12-11 16:33:35.054562+00 t
1 1970-01-01 00:00:00.000000+00 t
2 1970-01-01 00:00:00.000000+00 f
3 1970-01-01 00:00:00.000000+00 t
4 1970-01-01 00:00:00.000000+00 f
5 1970-01-01 00:00:00.000000+00 f
6 1970-01-01 00:00:00.000000+00 f
7 1970-01-01 00:00:00.000000+00 f
8 1970-01-01 00:00:00.000000+00 f
9 1970-01-01 00:00:00.000000+00 f
10 1970-01-01 00:00:00.000000+00 f
11 1970-01-01 00:00:00.000000+00 t
12 1970-01-01 00:00:00.000000+00 f
13 1970-01-01 00:00:00.000000+00 t
14 1970-01-01 00:00:00.000000+00 t
15 1970-01-01 00:00:00.000000+00 f
16 1970-01-01 00:00:00.000000+00 t
17 1970-01-01 00:00:00.000000+00 f
18 1970-01-01 00:00:00.000000+00 f
19 1970-01-01 00:00:00.000000+00 t
\.
4 changes: 2 additions & 2 deletions scripts/dump_db
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dropuser graphile_worker_role || true
psql template1 -c "CREATE USER graphile_worker_role WITH SUPERUSER PASSWORD 'password';"
createdb graphile_worker_dump -O graphile_worker_role
PGUSER=graphile_worker_role PGPASSWORD=password PGHOST=127.0.0.1 ts-node src/cli.ts -c postgres:///graphile_worker_dump --schema-only
pg_dump --schema-only --no-owner graphile_worker_dump | sed -e '/^--/d' -e '/^\s*$/d' -e '/^SET /d' -e 's/EXECUTE FUNCTION/EXECUTE PROCEDURE/g' > __tests__/schema.sql
pg_dump --data-only --no-owner --table graphile_worker.migrations graphile_worker_dump | sed -e '/^--/d' -e '/^\s*$/d' -e '/^SET /d' -e 's/EXECUTE FUNCTION/EXECUTE PROCEDURE/g' >> __tests__/schema.sql
pg_dump --schema-only --no-owner graphile_worker_dump | sed -E -e '/^--/d' -e '/^\s*$/d' -e '/^SET /d' -e 's/EXECUTE FUNCTION/EXECUTE PROCEDURE/g' -e '/^(REVOKE|GRANT) .* ON SCHEMA public (FROM|TO) PUBLIC;$/d' > __tests__/schema.sql
pg_dump --data-only --no-owner graphile_worker_dump --table=graphile_worker.migrations --table=graphile_worker._private_pro_migrations | sed -E -e '/^--/d' -e '/^\s*$/d' -e 's/\b2[0-9]{3}-[0-9]{2}-[0-9]{2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{1,6}\+00/1970-01-01 00:00:00.000000+00/g' -e '/^SET /d' >> __tests__/schema.sql
dropdb graphile_worker_dump
dropuser graphile_worker_role

0 comments on commit 0103634

Please sign in to comment.