diff options
| author | JuniorJPDJ <github.com@juniorjpdj.pl> | 2021-10-11 21:16:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-11 19:16:56 +0000 |
| commit | df968d1919227949bcbeedb253d66ed0720b3d2a (patch) | |
| tree | c4192c127e45c039fbc8478033bd0cb715a41326 /config/migrate-scripts/migrate-db-52cb239.sh | |
| parent | b10f37bea972fde6586639511bf8eaab490581fd (diff) | |
| download | invidious-df968d1919227949bcbeedb253d66ed0720b3d2a.tar.gz invidious-df968d1919227949bcbeedb253d66ed0720b3d2a.tar.bz2 invidious-df968d1919227949bcbeedb253d66ed0720b3d2a.zip | |
variable postgres username and database name (#2451)
Diffstat (limited to 'config/migrate-scripts/migrate-db-52cb239.sh')
| -rwxr-xr-x | config/migrate-scripts/migrate-db-52cb239.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/config/migrate-scripts/migrate-db-52cb239.sh b/config/migrate-scripts/migrate-db-52cb239.sh index db8efeab..da977d97 100755 --- a/config/migrate-scripts/migrate-db-52cb239.sh +++ b/config/migrate-scripts/migrate-db-52cb239.sh @@ -1,3 +1,6 @@ #!/bin/sh -psql invidious kemal -c "ALTER TABLE channel_videos ADD COLUMN views bigint;" +[ -z "$POSTGRES_USER" ] && POSTGRES_USER=kemal +[ -z "$POSTGRES_DB" ] && POSTGRES_DB=invidious + +psql "$POSTGRES_DB" "$POSTGRES_USER" -c "ALTER TABLE channel_videos ADD COLUMN views bigint;" |
