Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

tools: Rename postgres to postgresql in tool names.

Alex Vandiver2b0bbbb88265
diff --git a/.github/workflows/zulip-ci.yml b/.github/workflows/zulip-ci.yml
index 1f63c69d258..e23d2291cd9 100644
--- a/.github/workflows/zulip-ci.yml
+++ b/.github/workflows/zulip-ci.yml
@@ -36,7 +36,7 @@ jobs:
env:
# GitHub Actions sets HOME to /github/home which causes
# problem later in provison and frontend test that runs
- # tools/setup/postgres-init-dev-db because of the .pgpass
+ # tools/setup/postgresql-init-dev-db because of the .pgpass
# location. PostgreSQL (psql) expects .pgpass to be at
# /home/github/.pgpass and setting home to `/home/github/`
# ensures it written there because we write it to ~/.pgpass.
diff --git a/docs/development/setup-advanced.md b/docs/development/setup-advanced.md
index 2cb9eb11909..007ac95c9bf 100644
--- a/docs/development/setup-advanced.md
+++ b/docs/development/setup-advanced.md
@@ -242,9 +242,9 @@ else
sudo cp ./puppet/zulip/files/postgresql/zulip_english.stop /usr/share/postgresql/*/tsearch_data/
fi
./scripts/setup/configure-rabbitmq
-./tools/setup/postgres-init-dev-db
+./tools/setup/postgresql-init-dev-db
./tools/rebuild-dev-database
-./tools/setup/postgres-init-test-db
+./tools/setup/postgresql-init-test-db
./tools/rebuild-test-database
./manage.py compilemessages
```
diff --git a/docs/overview/architecture-overview.md b/docs/overview/architecture-overview.md
index 88bba8ea756..a5b8c73de7e 100644
--- a/docs/overview/architecture-overview.md
+++ b/docs/overview/architecture-overview.md
@@ -240,7 +240,7 @@ directory that would contain configuration files
list of stopwords used by a PostgreSQL extension.
In a development environment, configuration of that PostgreSQL
-extension is handled by `tools/postgres-init-dev-db` (invoked by
+extension is handled by `tools/postgresql-init-dev-db` (invoked by
`tools/provision`). That file also manages setting up the
development PostgreSQL user.
diff --git a/docs/production/export-and-import.md b/docs/production/export-and-import.md
index 092a237c49a..ccc1738bded 100644
--- a/docs/production/export-and-import.md
+++ b/docs/production/export-and-import.md
@@ -207,7 +207,7 @@ To restore from a manual backup, the process is basically the reverse of the abo
from your backups.
* If you ran `initialize-database` anyway above, you'll want to run
- `scripts/setup/postgres-init-db` to drop the initial database first.
+ `scripts/setup/postgresql-init-db` to drop the initial database first.
* Restore your database from the backup.
diff --git a/docs/production/postgres.md b/docs/production/postgres.md
index a94ba49d4e8..093e36c38f9 100644
--- a/docs/production/postgres.md
+++ b/docs/production/postgres.md
@@ -8,10 +8,10 @@ Previous versions of Zulip used whatever version of PostgreSQL was
included with the base operating system (E.g. PostgreSQL 12 on Ubuntu
Focal, 10 on Ubuntu Bionic, and 9.6 on Ubuntu Xenial). We recommend
that installations currently using older PostgreSQL releases [upgrade to
-PostgreSQL 12][upgrade-postgres], as may drop support for older PostgreSQL
+PostgreSQL 12][upgrade-postgresql], as may drop support for older PostgreSQL
in a future release.
-[upgrade-postgres]: ../production/upgrade-or-modify.html#upgrading-postgresql
+[upgrade-postgresql]: ../production/upgrade-or-modify.html#upgrading-postgresql
#### Remote PostgreSQL database
diff --git a/docs/production/upgrade-or-modify.md b/docs/production/upgrade-or-modify.md
index 776c5b87bb0..b2d1730ad1a 100644
--- a/docs/production/upgrade-or-modify.md
+++ b/docs/production/upgrade-or-modify.md
@@ -234,7 +234,7 @@ instructions for other supported platforms.
4. As root, upgrade the database to the latest version of PostgreSQL:
```
- /home/zulip/deployments/current/scripts/setup/upgrade-postgres
+ /home/zulip/deployments/current/scripts/setup/upgrade-postgresql
```
5. Finally, we need to reinstall the current version of Zulip, which
@@ -423,10 +423,10 @@ To upgrade the version of PostgreSQL on the Zulip server:
3. As root, run the database upgrade tool:
```
- /home/zulip/deployments/current/scripts/setup/upgrade-postgres
+ /home/zulip/deployments/current/scripts/setup/upgrade-postgresql
```
-`upgrade-postgres` will have finished by restarting your Zulip server;
+`upgrade-postgresql` will have finished by restarting your Zulip server;
you should now be able to navigate to its URL and confirm everything
is working correctly.
diff --git a/scripts/lib/install b/scripts/lib/install
index f3bf15e6e9a..8229893d0b9 100755
--- a/scripts/lib/install
+++ b/scripts/lib/install
@@ -497,7 +497,7 @@ EOF
fi
if has_class "zulip::postgresql_common" && [ -z "$NO_INIT_DB" ]; then
- "$ZULIP_PATH"/scripts/setup/postgres-init-db
+ "$ZULIP_PATH"/scripts/setup/postgresql-init-db
fi
if has_class "zulip::app_frontend_base"; then
diff --git a/scripts/setup/postgres-init-db b/scripts/setup/postgresql-init-db
similarity index 100%
rename from scripts/setup/postgres-init-db
rename to scripts/setup/postgresql-init-db
diff --git a/scripts/setup/upgrade-postgres b/scripts/setup/upgrade-postgresql
similarity index 96%
rename from scripts/setup/upgrade-postgres
rename to scripts/setup/upgrade-postgresql
index 3f15dbdfff5..6f58de8f92f 100755
--- a/scripts/setup/upgrade-postgres
+++ b/scripts/setup/upgrade-postgresql
@@ -39,7 +39,7 @@ fi
)
# Capture the output so we know where the path to the post-upgrade scripts is
-UPGRADE_LOG=$(mktemp "/var/log/zulip/postgres-upgrade-$UPGRADE_FROM-$UPGRADE_TO.XXXXXXXXX.log")
+UPGRADE_LOG=$(mktemp "/var/log/zulip/upgrade-postgresql-$UPGRADE_FROM-$UPGRADE_TO.XXXXXXXXX.log")
pg_upgradecluster -v "$UPGRADE_TO" "$UPGRADE_FROM" main --method=upgrade --link | tee "$UPGRADE_LOG"
SCRIPTS_PATH=$(grep -o "/var/log/postgresql/pg_upgradecluster-$UPGRADE_FROM-$UPGRADE_TO-main.*" "$UPGRADE_LOG" || true)
diff --git a/tools/ci/production-upgrade-pg b/tools/ci/production-upgrade-pg
index d954ffe780b..d5e09fe74bb 100755
--- a/tools/ci/production-upgrade-pg
+++ b/tools/ci/production-upgrade-pg
@@ -9,7 +9,7 @@ if [ "$CIRCLECI" = true ]; then
fi
supervisorctl stop all
-"$ZULIP_PATH"/scripts/setup/upgrade-postgres
+"$ZULIP_PATH"/scripts/setup/upgrade-postgresql
supervisorctl start all
echo "Upgrade of PostgreSQL complete!"
diff --git a/tools/lib/provision_inner.py b/tools/lib/provision_inner.py
index a18f6404f4d..d79ab40b19b 100755
--- a/tools/lib/provision_inner.py
+++ b/tools/lib/provision_inner.py
@@ -252,7 +252,7 @@ def main(options: argparse.Namespace) -> int:
dev_template_db_status = DEV_DATABASE.template_status()
if options.is_force or dev_template_db_status == 'needs_rebuild':
- run(["tools/setup/postgres-init-dev-db"])
+ run(["tools/setup/postgresql-init-dev-db"])
if options.skip_dev_db_build:
# We don't need to build the manual development
# database on CircleCI for running tests, so we can
@@ -271,7 +271,7 @@ def main(options: argparse.Namespace) -> int:
test_template_db_status = TEST_DATABASE.template_status()
if options.is_force or test_template_db_status == 'needs_rebuild':
- run(["tools/setup/postgres-init-test-db"])
+ run(["tools/setup/postgresql-init-test-db"])
run(["tools/rebuild-test-database"])
TEST_DATABASE.write_new_db_digest()
elif test_template_db_status == 'run_migrations':
diff --git a/tools/setup/postgres-init-test-db b/tools/setup/postgres-init-test-db
deleted file mode 100755
index 85476e093b6..00000000000
--- a/tools/setup/postgres-init-test-db
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env bash
-set -x
-set -e
-
-"$(dirname "$0")/postgres-init-dev-db" test
diff --git a/tools/setup/postgres-init-dev-db b/tools/setup/postgresql-init-dev-db
similarity index 100%
rename from tools/setup/postgres-init-dev-db
rename to tools/setup/postgresql-init-dev-db
diff --git a/tools/setup/postgresql-init-test-db b/tools/setup/postgresql-init-test-db
new file mode 100755
index 00000000000..bdf0fc33f3d
--- /dev/null
+++ b/tools/setup/postgresql-init-test-db
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+set -x
+set -e
+
+"$(dirname "$0")/postgresql-init-dev-db" test
diff --git a/zerver/lib/test_fixtures.py b/zerver/lib/test_fixtures.py
index 8550e135f37..70016bb9403 100644
--- a/zerver/lib/test_fixtures.py
+++ b/zerver/lib/test_fixtures.py
@@ -33,8 +33,8 @@ IMPORTANT_FILES = [
'zerver/lib/bulk_create.py',
'zerver/lib/generate_test_data.py',
'zerver/lib/server_initialization.py',
- 'tools/setup/postgres-init-test-db',
- 'tools/setup/postgres-init-dev-db',
+ 'tools/setup/postgresql-init-test-db',
+ 'tools/setup/postgresql-init-dev-db',
'zerver/migrations/0258_enable_online_push_notifications_default.py',
]