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