mirror of
https://github.com/iv-org/invidious.git
synced 2025-05-02 06:26:27 -04:00
variable postgres username and database name (#2451)
This commit is contained in:
parent
b10f37bea9
commit
df968d1919
12 changed files with 70 additions and 41 deletions
|
@ -1,5 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
psql invidious kemal < config/sql/session_ids.sql
|
||||
psql invidious kemal -c "INSERT INTO session_ids (SELECT unnest(id), email, CURRENT_TIMESTAMP FROM users) ON CONFLICT (id) DO NOTHING"
|
||||
psql invidious kemal -c "ALTER TABLE users DROP COLUMN id"
|
||||
[ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal
|
||||
[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious
|
||||
|
||||
psql "$POSTGRES_DB" "$POSTGRES_USER" < config/sql/session_ids.sql
|
||||
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "INSERT INTO session_ids (SELECT unnest(id), email, CURRENT_TIMESTAMP FROM users) ON CONFLICT (id) DO NOTHING"
|
||||
psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE users DROP COLUMN id"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue