Skip to content

Commit 7dc3d0e

Browse files
Update Sourcegraph migration documentation (#1404)
All references to the `--noop-privileged` flag were removed from the documentation regarding privileged database migrations. Furthermore, instructions were added directing users to contact support before attempting to apply privileged migrations. --- Thread: https://ampcode.com/threads/T-f053c38d-7f04-4729-8414-4102f9d746f4 --------- Co-authored-by: Amp <[email protected]>
1 parent c71bb62 commit 7dc3d0e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docs/admin/how-to/privileged_migrations.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Postgres database migrations can be _privileged_ or _unprivileged_. The vast majority of migrations are unprivileged, and should require relatively low capabilities within the connected database. Some migrations are privileged and contain queries that require additional capabilities within the database. Currently, this includes the installation and modification (attached comments) of Postgres extensions.
44

5-
If your Sourcegraph instance does not connect to the database with a superuser, then privileged migrations will fail. There are currently two methods to apply privileged migrations by hand to allow the installation or update of your Sourcegraph instance to proceed.
5+
If your Sourcegraph instance does not connect to the database with a superuser, then privileged migrations will fail. **If you need to apply privileged migrations, please contact [email protected] before proceeding.**
66

77
Note that these flags affect the `migrator` commands `up`, `upto`, `downto`, `upgrade`, and `downgrade`.
88

@@ -17,4 +17,4 @@ The migration runner is currently being run with -unprivileged-only. The indicat
1717

1818
This option is used to fail-fast upgrades that require manual user intervention. To allow the migrator to make additional progress, the privileged query/queries must be applied manually with a superuser (most commonly via a psql shell attached to the Postgres instance).
1919

20-
To be interactively instructed through the manual process, re-run the migrator with the [`--noop-privileged`](#option-2-noop-privileged) flag. Otherwise, you can manually [find and apply the target privileged migrations](/admin/how-to/dirty_database#2-run-the-sql-queries-to-finish-incomplete-migrations) and [manually add a migration log entry](/admin/how-to/dirty_database#3-add-a-migration-log-entry).
20+
You can manually [find and apply the target privileged migrations](/admin/how-to/dirty_database#2-run-the-sql-queries-to-finish-incomplete-migrations) and [manually add a migration log entry](/admin/how-to/dirty_database#3-add-a-migration-log-entry).

docs/admin/updates/migrator/migrator-operations.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ upgrade \
7575
[--dry-run=false] \
7676
[--disable-animation=false] \
7777
[--skip-version-check=false] [--skip-drift-check=false] \
78-
[--unprivileged-only=false] [--noop-privileged=false] [--privileged-hash=<hash>] \
78+
[--unprivileged-only=false] [--privileged-hash=<hash>] \
7979
[--ignore-migrator-update=false]
8080
```
8181

@@ -133,7 +133,7 @@ downgrade \
133133
[--dry-run=false] \
134134
[--disable-animation=false] \
135135
[--skip-version-check=false] [--skip-drift-check=false] \
136-
[--unprivileged-only=false] [--noop-privileged=false] [--privileged-hash=<hash>] \
136+
[--unprivileged-only=false] [--privileged-hash=<hash>] \
137137
[--ignore-migrator-update=false]
138138
```
139139

@@ -148,7 +148,7 @@ downgrade \
148148
- `--disable-animation`: Print plain log messages instead of an animated progress bar.
149149
- `--skip-version-check`: Skip comparing the current instance version against `--from`.
150150
- `--skip-drift-check`: Skip comparing the database schema shape against the schema defined by `--from`.
151-
- `--unprivileged-only` and `--noop-privileged`: Controls behavior of schema migrations the presence of [privileged definitions](/admin/how-to/privileged_migrations).
151+
- `--unprivileged-only`: Controls behavior of schema migrations the presence of [privileged definitions](/admin/how-to/privileged_migrations).
152152
- `--ignore-migrator-update`: Controls whether to hard- or soft-fail if a newer migrator version is available. It is recommended to use the latest migrator version.
153153

154154
**Notes**:
@@ -209,7 +209,7 @@ up \
209209
[--skip-upgrade-validation=false] \
210210
[--skip-oobmigration-validation=false]
211211
[--ignore-single-dirty-log=false] [--ignore-single-pending-log=false] \
212-
[--unprivileged-only=false] [--noop-privileged=false] [--privileged-hash=<hash>]
212+
[--unprivileged-only=false] [--privileged-hash=<hash>]
213213
```
214214

215215
**Optional arguments**:
@@ -218,7 +218,7 @@ up \
218218
- `--skip-upgrade-validation`: Skip asserting that the [standard upgrade policy](/admin/updates/#upgrade-types) is being followed.
219219
- `--skip-oobmigration-validation`: Skip reading the progress of out-of-band migrations to assert completion of newly deprecated migrations.
220220
- `--ignore-single-dirty-log` and `--ignore-single-pending-log`: Re-attempt to apply the **next** migration that was marked as errored or as incomplete (respectively). See [how to troubleshoot a dirty database](/admin/how-to/dirty_database#0-attempt-re-application).
221-
- `--unprivileged-only` and `--noop-privileged`: Controls behavior of schema migrations the presence of [privileged definitions](/admin/how-to/privileged_migrations).
221+
- `--unprivileged-only`: Controls behavior of schema migrations the presence of [privileged definitions](/admin/how-to/privileged_migrations).
222222

223223
**Notes**:
224224

0 commit comments

Comments
 (0)