|
1 | 1 | import { spawnSync } from 'child_process' |
2 | 2 |
|
| 3 | +exec('dropdb', ['postgres_js_test']) |
| 4 | + |
3 | 5 | exec('psql', ['-c', 'alter system set ssl=on']) |
| 6 | +exec('psql', ['-c', 'drop user postgres_js_test']) |
4 | 7 | exec('psql', ['-c', 'create user postgres_js_test']) |
5 | 8 | exec('psql', ['-c', 'alter system set password_encryption=md5']) |
6 | 9 | exec('psql', ['-c', 'select pg_reload_conf()']) |
| 10 | +exec('psql', ['-c', 'drop user if exists postgres_js_test_md5']) |
7 | 11 | exec('psql', ['-c', 'create user postgres_js_test_md5 with password \'postgres_js_test_md5\'']) |
8 | 12 | exec('psql', ['-c', 'alter system set password_encryption=\'scram-sha-256\'']) |
9 | 13 | exec('psql', ['-c', 'select pg_reload_conf()']) |
| 14 | +exec('psql', ['-c', 'drop user if exists postgres_js_test_scram']) |
10 | 15 | exec('psql', ['-c', 'create user postgres_js_test_scram with password \'postgres_js_test_scram\'']) |
11 | 16 |
|
12 | | -exec('dropdb', ['postgres_js_test']) |
13 | 17 | exec('createdb', ['postgres_js_test']) |
14 | 18 | exec('psql', ['-c', 'grant all on database postgres_js_test to postgres_js_test']) |
15 | 19 | exec('psql', ['-c', 'alter database postgres_js_test owner to postgres_js_test']) |
|
0 commit comments