@@ -262,21 +262,36 @@ unable to add the `commit_message_regex_change` column.
...
@@ -262,21 +262,36 @@ unable to add the `commit_message_regex_change` column.
This results in the [backport migration of EE tables](https://gitlab.com/gitlab-org/gitlab/-/blob/cf00e431024018ddd82158f8a9210f113d0f4dbc/db/migrate/20190402150158_backport_enterprise_schema.rb#L1619) not working correctly.
This results in the [backport migration of EE tables](https://gitlab.com/gitlab-org/gitlab/-/blob/cf00e431024018ddd82158f8a9210f113d0f4dbc/db/migrate/20190402150158_backport_enterprise_schema.rb#L1619) not working correctly.
The backport migration assumes that certain tables in the database do not exist when running CE.
The backport migration assumes that certain tables in the database do not exist when running CE.
To fix this issue, manually add the missing `commit_message_negative_regex` column and restart GitLab:
To fix this issue:
```shell
1. Start a database console:
# Access psql
sudo gitlab-rails dbconsole
# Add the missing column
In GitLab 14.2 and later:
ALTER TABLE push_rules ADD COLUMN commit_message_negative_regex VARCHAR;
# Exit psql
```shell
\q
sudo gitlab-rails dbconsole --database main
```
# Restart GitLab
In GitLab 14.1 and earlier:
sudo gitlab-ctl restart
```
```shell
sudo gitlab-rails dbconsole
```
1. Manually add the missing `commit_message_negative_regex` column: