Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/admin/how-to/privileged_migrations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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.

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.
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 support@sourcegraph.com before proceeding.**

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

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

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).

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).
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).
10 changes: 5 additions & 5 deletions docs/admin/updates/migrator/migrator-operations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ upgrade \
[--dry-run=false] \
[--disable-animation=false] \
[--skip-version-check=false] [--skip-drift-check=false] \
[--unprivileged-only=false] [--noop-privileged=false] [--privileged-hash=<hash>] \
[--unprivileged-only=false] [--privileged-hash=<hash>] \
[--ignore-migrator-update=false]
```

Expand Down Expand Up @@ -133,7 +133,7 @@ downgrade \
[--dry-run=false] \
[--disable-animation=false] \
[--skip-version-check=false] [--skip-drift-check=false] \
[--unprivileged-only=false] [--noop-privileged=false] [--privileged-hash=<hash>] \
[--unprivileged-only=false] [--privileged-hash=<hash>] \
[--ignore-migrator-update=false]
```

Expand All @@ -148,7 +148,7 @@ downgrade \
- `--disable-animation`: Print plain log messages instead of an animated progress bar.
- `--skip-version-check`: Skip comparing the current instance version against `--from`.
- `--skip-drift-check`: Skip comparing the database schema shape against the schema defined by `--from`.
- `--unprivileged-only` and `--noop-privileged`: Controls behavior of schema migrations the presence of [privileged definitions](/admin/how-to/privileged_migrations).
- `--unprivileged-only`: Controls behavior of schema migrations the presence of [privileged definitions](/admin/how-to/privileged_migrations).
- `--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.

**Notes**:
Expand Down Expand Up @@ -209,7 +209,7 @@ up \
[--skip-upgrade-validation=false] \
[--skip-oobmigration-validation=false]
[--ignore-single-dirty-log=false] [--ignore-single-pending-log=false] \
[--unprivileged-only=false] [--noop-privileged=false] [--privileged-hash=<hash>]
[--unprivileged-only=false] [--privileged-hash=<hash>]
```

**Optional arguments**:
Expand All @@ -218,7 +218,7 @@ up \
- `--skip-upgrade-validation`: Skip asserting that the [standard upgrade policy](/admin/updates/#upgrade-types) is being followed.
- `--skip-oobmigration-validation`: Skip reading the progress of out-of-band migrations to assert completion of newly deprecated migrations.
- `--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).
- `--unprivileged-only` and `--noop-privileged`: Controls behavior of schema migrations the presence of [privileged definitions](/admin/how-to/privileged_migrations).
- `--unprivileged-only`: Controls behavior of schema migrations the presence of [privileged definitions](/admin/how-to/privileged_migrations).

**Notes**:

Expand Down