Inconsistencies between my database and structure.sql - 16.6.4
Summary
Initially, I stumbled upon the same bug about the "ci_pipelines" fk as the OP from the issue 16.5.2 to 16.6.0 db migration problem (which I managed to fix using the instructions from there)
. While reading the issue, someone recommended running the command gitlab-rails gitlab:db:schema_checker:run
, so I ran it too on my instance, mostly curious if it reports something. Lo and behold, I was met with a mountain of mismatched foreign keys and table columns different from the published structure.sql.
Schema checker output
------------------------------------------------------ The table sent_notifications has columns present in the database, but not in the structure.sql file Diff: +CREATE TABLE sent_notifications (id_convert_to_bigint bigint DEFAULT 0 NOT NULL)
The index unique_schema_migrations is present in the database, but not in the structure.sql file Diff: +CREATE UNIQUE INDEX unique_schema_migrations ON public.schema_migrations USING btree (version)
The trigger trigger_7f4fcd5aa322 is present in the database, but not in the structure.sql file Diff: +CREATE TRIGGER trigger_7f4fcd5aa322 BEFORE INSERT OR UPDATE ON public.sent_notifications FOR EACH ROW EXECUTE FUNCTION trigger_7f4fcd5aa322()
The foreign key public.fk_0a31cca0b8 is present in the database, but not in the structure.sql file Diff: +FOREIGN KEY (marked_for_deletion_by_user_id) REFERENCES users(id) ON DELETE SET NULL
The foreign key public.fk_616ddd680a is present in the database, but not in the structure.sql file Diff: +FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE
The foreign key public.fk_a27c483435 is present in the database, but not in the structure.sql file Diff: +FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE
The foreign key public.fk_a3c10bcf7d is present in the database, but not in the structure.sql file Diff: +FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE
The foreign key public.fk_c262d728d4 is present in the database, but not in the structure.sql file Diff: +FOREIGN KEY (trigger_id) REFERENCES ci_triggers(id) ON DELETE CASCADE
The foreign key public.fk_db58bbc5d7 is present in the database, but not in the structure.sql file Diff: +FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE
The foreign key public.fk_f1d617343f is present in the database, but not in the structure.sql file Diff: +FOREIGN KEY (jira_connect_installation_id) REFERENCES jira_connect_installations(id) ON DELETE CASCADE
The foreign key public.fk_rails_0894651f08 is present in the database, but not in the structure.sql file Diff: +FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
The foreign key public.fk_rails_1e9a074a35 is present in the database, but not in the structure.sql file Diff: +FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE
The foreign key public.fk_rails_2b18ae9256 is present in the database, but not in the structure.sql file Diff: +FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE
The foreign key public.fk_rails_43a9aa4ca8 is present in the database, but not in the structure.sql file Diff: +FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE
The foreign key public.fk_rails_722ceba4f7 is present in the database, but not in the structure.sql file Diff: +FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE
The foreign key public.fk_rails_95a99c2d56 is present in the database, but not in the structure.sql file Diff: +FOREIGN KEY (shard_id) REFERENCES shards(id) ON DELETE RESTRICT
The foreign key public.fk_rails_d1aad367d7 is present in the database, but not in the structure.sql file Diff: +FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE
The foreign key public.fk_0894651f08 is missing from the database Diff: -FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
The foreign key public.fk_1e9a074a35 is missing from the database Diff: -FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE
The foreign key public.fk_43a9aa4ca8 is missing from the database Diff: -FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE
The foreign key public.fk_722ceba4f7 is missing from the database Diff: -FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE
The foreign key public.fk_b8ec8b7245 is missing from the database Diff: -FOREIGN KEY (trigger_id) REFERENCES ci_triggers(id) ON DELETE CASCADE
The foreign key public.fk_d1aad367d7 is missing from the database Diff: -FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE
The foreign key public.fk_rails_1dfc868911 is missing from the database Diff: -FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE
The foreign key public.fk_rails_616ddd680a is missing from the database Diff: -FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE
The foreign key public.fk_rails_a27c483435 is missing from the database Diff: -FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE
The foreign key public.fk_rails_a3c10bcf7d is missing from the database Diff: -FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE
The foreign key public.fk_rails_af3f8c5d62 is missing from the database Diff: -FOREIGN KEY (shard_id) REFERENCES shards(id) ON DELETE RESTRICT
The foreign key public.fk_rails_db58bbc5d7 is missing from the database Diff: -FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE
The foreign key public.fk_rails_f1d617343f is missing from the database Diff: -FOREIGN KEY (jira_connect_installation_id) REFERENCES jira_connect_installations(id) ON DELETE CASCADE
The table projects has a different column statement between structure.sql and database Diff: -CREATE TABLE projects (merge_requests_ff_only_enabled boolean DEFAULT false NOT NULL) +CREATE TABLE projects (merge_requests_ff_only_enabled boolean DEFAULT false)
The table loose_foreign_keys_deleted_records has a different column statement between structure.sql and database Diff:
The table application_settings has a different column statement between structure.sql and database Diff: -CREATE TABLE application_settings (polling_interval_multiplier numeric DEFAULT 1 NOT NULL, kroki_url text, kroki_enabled boolean DEFAULT false NOT NULL) +CREATE TABLE application_settings (polling_interval_multiplier numeric DEFAULT 1.0 NOT NULL, kroki_url character varying, kroki_enabled boolean)
The table ar_internal_metadata has a different column statement between structure.sql and database Diff: -CREATE TABLE ar_internal_metadata (created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL) +CREATE TABLE ar_internal_metadata (created_at timestamp(6) without time zone NOT NULL, updated_at timestamp(6) without time zone NOT NULL)
The table ci_freeze_periods has a different column statement between structure.sql and database Diff: -CREATE TABLE ci_freeze_periods (freeze_start text NOT NULL, freeze_end text NOT NULL, cron_timezone text NOT NULL) +CREATE TABLE ci_freeze_periods (freeze_start character varying(998) NOT NULL, freeze_end character varying(998) NOT NULL, cron_timezone character varying(255) NOT NULL)
The table cluster_platforms_kubernetes has a different column statement between structure.sql and database Diff: -CREATE TABLE cluster_platforms_kubernetes (created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL) +CREATE TABLE cluster_platforms_kubernetes (created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL)
The table cluster_projects has a different column statement between structure.sql and database Diff: -CREATE TABLE cluster_projects (created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL) +CREATE TABLE cluster_projects (created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL)
The table cluster_providers_gcp has a different column statement between structure.sql and database Diff: -CREATE TABLE cluster_providers_gcp (created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL) +CREATE TABLE cluster_providers_gcp (created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL)
The table clusters has a different column statement between structure.sql and database Diff: -CREATE TABLE clusters (created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL) +CREATE TABLE clusters (created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL)
The table emails has a different column statement between structure.sql and database Diff: -CREATE TABLE emails (confirmed_at timestamp with time zone, confirmation_sent_at timestamp with time zone) +CREATE TABLE emails (confirmed_at timestamp without time zone, confirmation_sent_at timestamp without time zone)
The table merge_request_assignees has a different column statement between structure.sql and database Diff: -CREATE TABLE merge_request_assignees (id integer NOT NULL) +CREATE TABLE merge_request_assignees (id bigint NOT NULL)
The table merge_request_diff_commits has a different column statement between structure.sql and database Diff: -CREATE TABLE merge_request_diff_commits (authored_date timestamp with time zone, committed_date timestamp with time zone) +CREATE TABLE merge_request_diff_commits (authored_date timestamp without time zone, committed_date timestamp without time zone)
The table project_settings has a different column statement between structure.sql and database Diff: -CREATE TABLE project_settings (show_default_award_emojis boolean DEFAULT true NOT NULL) +CREATE TABLE project_settings (show_default_award_emojis boolean DEFAULT true)
The table sent_notifications has a different column statement between structure.sql and database Diff: -CREATE TABLE sent_notifications (id integer NOT NULL) +CREATE TABLE sent_notifications (id bigint NOT NULL)
The table timelogs has a different column statement between structure.sql and database Diff: -CREATE TABLE timelogs (spent_at timestamp with time zone DEFAULT now()) +CREATE TABLE timelogs (spent_at timestamp without time zone DEFAULT now())
The table user_custom_attributes has a different column statement between structure.sql and database Diff: -CREATE TABLE user_custom_attributes (created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL) +CREATE TABLE user_custom_attributes (created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL)
The index_issues_on_description_trigram_non_latin index has a different statement between structure.sql and database Diff: -CREATE INDEX index_issues_on_description_trigram_non_latin ON public.issues USING gin (description gin_trgm_ops) WHERE title::text !~ similar_escape(E'[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]'::text, NULL::text) OR description !~ similar_escape(E'[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]'::text, NULL::text) +CREATE INDEX index_issues_on_description_trigram_non_latin ON public.issues USING gin (description gin_trgm_ops) WHERE title::text !~ similar_to_escape(E'[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]'::text) OR description !~ similar_to_escape(E'[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]'::text)
The index_issues_on_title_trigram_non_latin index has a different statement between structure.sql and database Diff: -CREATE INDEX index_issues_on_title_trigram_non_latin ON public.issues USING gin (title gin_trgm_ops) WHERE title::text !~ similar_escape(E'[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]'::text, NULL::text) OR description !~ similar_escape(E'[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]'::text, NULL::text) +CREATE INDEX index_issues_on_title_trigram_non_latin ON public.issues USING gin (title gin_trgm_ops) WHERE title::text !~ similar_to_escape(E'[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]'::text) OR description !~ similar_to_escape(E'[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]'::text)
@krasio recommended to another user who had a similar output as me this:
We see three types of inconsistencies here:
Related to
sent_notifications
- these can be ignored as they are related to #389344 (closed) and will be resolved once it is completed.FK name mismatch -
foreign key public.* is present in the database, but not in the structure.sql file
- seems like these have a counterpart likeforeign key public.* is missing from the database
, but with different prefix for the FK name. For example if one isfk_616ddd680a
, the other will befk_rails_616ddd680a
. You can search by the hashed part only (e.g.616ddd680a
) inhttps://gitlab.com/gitlab-org/gitlab/-/blob/v16.6.0-ee/db/structure.sql
, see what the FK name is expected to be, and rename it to match, for example https://gitlab.com/gitlab-org/gitlab/-/blob/v16.6.0-ee/db/structure.sql#L38819.Column type mismatch - for example
integer
instead ofbigint
,varchar
without limit instead ofvarchar
with limit,timestamp with time zone
instead oftimestamp without time zone
, etc. You can inspect each one and alter the column accordingly so it matches the expected type.I don't know how did these happened though.
😞
This was a few weeks ago. Today I finally had the time to start dealing with this issue. I created a test instance of my production Gitlab server (thank god it's small) and started building my .sql script. This is the result:
SQL SCRIPT
ALTER TABLE "boards" RENAME CONSTRAINT "fk_rails_1e9a074a35" TO "fk_1e9a074a35"; ALTER TABLE "dependency_proxy_blobs" RENAME CONSTRAINT "fk_db58bbc5d7" TO "fk_rails_db58bbc5d7"; ALTER TABLE "dependency_proxy_group_settings" RENAME CONSTRAINT "fk_616ddd680a" TO "fk_rails_616ddd680a"; ALTER TABLE "jira_connect_subscriptions" RENAME CONSTRAINT "fk_a3c10bcf7d" TO "fk_rails_a3c10bcf7d"; ALTER TABLE "jira_connect_subscriptions" RENAME CONSTRAINT "fk_f1d617343f" TO "fk_rails_f1d617343f"; ALTER TABLE "project_mirror_data" RENAME CONSTRAINT "fk_rails_d1aad367d7" TO "fk_d1aad367d7"; ALTER TABLE "remote_mirrors" RENAME CONSTRAINT "fk_rails_43a9aa4ca8" TO "fk_43a9aa4ca8"; ALTER TABLE "todos" RENAME CONSTRAINT "fk_a27c483435" TO "fk_rails_a27c483435"; ALTER TABLE "user_interacted_projects" RENAME CONSTRAINT "fk_rails_0894651f08" TO "fk_0894651f08"; ALTER TABLE "user_interacted_projects" RENAME CONSTRAINT "fk_rails_722ceba4f7" TO "fk_722ceba4f7";
ALTER TABLE projects ALTER COLUMN merge_requests_ff_only_enabled DROP NOT NULL; ALTER TABLE application_settings ALTER COLUMN polling_interval_multiplier SET DEFAULT 1.0, ALTER COLUMN kroki_url TYPE character varying, ALTER COLUMN kroki_enabled TYPE boolean, ALTER COLUMN kroki_enabled DROP DEFAULT, ALTER COLUMN kroki_enabled DROP NOT NULL; ALTER TABLE ar_internal_metadata ALTER COLUMN created_at TYPE timestamp(6) without time zone, ALTER COLUMN updated_at TYPE timestamp(6) without time zone; ALTER TABLE ci_freeze_periods ALTER COLUMN freeze_start TYPE character varying(998), ALTER COLUMN freeze_end TYPE character varying(998), ALTER COLUMN cron_timezone TYPE character varying(255); ALTER TABLE cluster_platforms_kubernetes ALTER COLUMN created_at TYPE timestamp without time zone, ALTER COLUMN updated_at TYPE timestamp without time zone; ALTER TABLE cluster_projects ALTER COLUMN created_at TYPE timestamp without time zone, ALTER COLUMN updated_at TYPE timestamp without time zone; ALTER TABLE cluster_providers_gcp ALTER COLUMN created_at TYPE timestamp without time zone, ALTER COLUMN updated_at TYPE timestamp without time zone, ALTER COLUMN updated_at SET NOT NULL; ALTER TABLE clusters ALTER COLUMN created_at TYPE timestamp without time zone, ALTER COLUMN updated_at TYPE timestamp without time zone; ALTER TABLE merge_request_assignees ALTER COLUMN id TYPE bigint; ALTER TABLE emails ALTER COLUMN confirmed_at TYPE timestamp without time zone, ALTER COLUMN confirmation_sent_at TYPE timestamp without time zone; ALTER TABLE merge_request_diff_commits ALTER COLUMN authored_date TYPE timestamp without time zone, ALTER COLUMN committed_date TYPE timestamp without time zone; ALTER TABLE project_settings ALTER COLUMN show_default_award_emojis DROP NOT NULL; ALTER TABLE sent_notifications ALTER COLUMN id TYPE bigint; ALTER TABLE timelogs ALTER COLUMN spent_at TYPE timestamp without time zone; ALTER TABLE user_custom_attributes ALTER COLUMN created_at TYPE timestamp without time zone, ALTER COLUMN updated_at TYPE timestamp without time zone;
I then ran this script on my test instance and checked the database again with gitlab-rails gitlab:db:schema_checker:run
. This is the result:
Schema checked after initial fixing
------------------------------------------------------ The table sent_notifications has columns present in the database, but not in the structure.sql file Diff: +CREATE TABLE sent_notifications (id_convert_to_bigint bigint DEFAULT 0 NOT NULL)
The index unique_schema_migrations is present in the database, but not in the structure.sql file Diff: +CREATE UNIQUE INDEX unique_schema_migrations ON public.schema_migrations USING btree (version)
The trigger trigger_7f4fcd5aa322 is present in the database, but not in the structure.sql file Diff: +CREATE TRIGGER trigger_7f4fcd5aa322 BEFORE INSERT OR UPDATE ON public.sent_notifications FOR EACH ROW EXECUTE FUNCTION trigger_7f4fcd5aa322()
The foreign key public.fk_0a31cca0b8 is present in the database, but not in the structure.sql file Diff: +FOREIGN KEY (marked_for_deletion_by_user_id) REFERENCES users(id) ON DELETE SET NULL
The foreign key public.fk_c262d728d4 is present in the database, but not in the structure.sql file Diff: +FOREIGN KEY (trigger_id) REFERENCES ci_triggers(id) ON DELETE CASCADE
The foreign key public.fk_rails_2b18ae9256 is present in the database, but not in the structure.sql file Diff: +FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE
The foreign key public.fk_rails_95a99c2d56 is present in the database, but not in the structure.sql file Diff: +FOREIGN KEY (shard_id) REFERENCES shards(id) ON DELETE RESTRICT
The foreign key public.fk_b8ec8b7245 is missing from the database Diff: -FOREIGN KEY (trigger_id) REFERENCES ci_triggers(id) ON DELETE CASCADE
The foreign key public.fk_rails_1dfc868911 is missing from the database Diff: -FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE
The foreign key public.fk_rails_af3f8c5d62 is missing from the database Diff: -FOREIGN KEY (shard_id) REFERENCES shards(id) ON DELETE RESTRICT
The table loose_foreign_keys_deleted_records has a different column statement between structure.sql and database Diff:
The index_issues_on_description_trigram_non_latin index has a different statement between structure.sql and database Diff: -CREATE INDEX index_issues_on_description_trigram_non_latin ON public.issues USING gin (description gin_trgm_ops) WHERE title::text !~ similar_escape(E'[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]'::text, NULL::text) OR description !~ similar_escape(E'[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]'::text, NULL::text) +CREATE INDEX index_issues_on_description_trigram_non_latin ON public.issues USING gin (description gin_trgm_ops) WHERE title::text !~ similar_to_escape(E'[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]'::text) OR description !~ similar_to_escape(E'[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]'::text)
The index_issues_on_title_trigram_non_latin index has a different statement between structure.sql and database Diff: -CREATE INDEX index_issues_on_title_trigram_non_latin ON public.issues USING gin (title gin_trgm_ops) WHERE title::text !~ similar_escape(E'[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]'::text, NULL::text) OR description !~ similar_escape(E'[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]'::text, NULL::text) +CREATE INDEX index_issues_on_title_trigram_non_latin ON public.issues USING gin (title gin_trgm_ops) WHERE title::text !~ similar_to_escape(E'[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]'::text) OR description !~ similar_to_escape(E'[\u0000-\u02FF\u1E00-\u1EFF\u2070-\u218F]'::text)
As you can see, I dealt with most of the columns and most of the foreign keys. There are some unresolved foreign keys though:
- 6 of them (3 I have in my database but are not in structure.sql and 3 are in structure.sql but misssing from my database) seem to be related but have totally different names:
- public.fk_c262d728d4 and public.fk_b8ec8b7245
- public.fk_rails_2b18ae9256 and public.fk_rails_1dfc868911
- public.fk_rails_95a99c2d56 and public.fk_rails_af3f8c5d62
- 1 of them, public.fk_0a31cca0b8, is present in the database, but not in the structure.sql file.
Regarding the table columns, there is only one mismatch remaining: loose_foreign_keys_deleted_records
. The schema checker outputs nothing about it on the diff. Here are the details of the table from my database:
loose_foreign_keys_deleted_records
gitlabhq_production=> \d loose_foreign_keys_deleted_records; Partitioned table "public.loose_foreign_keys_deleted_records" Column | Type | Collation | Nullable | Default ----------------------------+--------------------------+-----------+----------+---------------------------------------------------------------- id | bigint | | not null | nextval('loose_foreign_keys_deleted_records_id_seq'::regclass) partition | bigint | | not null | 16 primary_key_value | bigint | | not null | status | smallint | | not null | 1 created_at | timestamp with time zone | | not null | now() fully_qualified_table_name | text | | not null | consume_after | timestamp with time zone | | | now() cleanup_attempts | smallint | | | 0 Partition key: LIST (partition) Indexes: "loose_foreign_keys_deleted_records_pkey" PRIMARY KEY, btree (partition, id) "index_loose_foreign_keys_deleted_records_for_partitioned_query" btree (partition, fully_qualified_table_name, consume_after, id) WHERE status = 1 Check constraints: "check_1a541f3235" CHECK (char_length(fully_qualified_table_name) <= 150)
All that remains besides this are the 2 indexes at the bottom (someone said in the other issue that they should not be a problem), the sent_notification
thing @krasio
said it is going to be fixed, and a trigger which I don't know how to deal with.
Now, before running anything on production and risk borking my instance, I decided to ask you all about it and raise awareness about the subject. Maybe there are other people affected by it.
- Is my .sql script good enough?
- How should I deal with the remaining stuff?
Details of package version
Provide the package version installation details
Omnibus Gitlab Community Edition el9 package: gitlab-ce-16.6.4-ce.0.el9.x86_64Postgres version: 13.12
Environment details
- Operating System:
Oracle Linux 9.3
- Installation Target:
- VM: Other
Self Hosted inside a host running Citrix Xen
- VM: Other
- Installation Type:
- Other:
When I started managing the instance we had 14.4.1 on a CentOS 7 VM. Rather than converting and upgrading the machine to Oracle Linux 9, I installed a fresh system, restored a full backup of my old instance and the did the Gitlab upgrades there. The upgrade path I followed was 14.4.1 - 14.9.5 - 14.10.5 - 15.0.5 - 15.4.6 - 15.11.13 - 16.something. Since then I've tried to keep it up to date
- Other:
- Is there any other software running on the machine:
nope, it's a dedicated Gitlab machine
- Is this a single or multiple node installation?
Single node
- Resources
- CPU:
4 vCPU cores
- Memory total:
8 GB
- CPU:
Configuration details
Provide the relevant sections of `/etc/gitlab/gitlab.rb`
external_url 'https://example.com' gitlab_rails['gitlab_ssh_host'] = 'ssh.example.com' gitlab_rails['gitlab_email_enabled'] = true gitlab_rails['gitlab_email_from'] = 'gitlab@example.com' gitlab_rails['gitlab_email_display_name'] = 'My Gitlab Server' gitlab_rails['gitlab_email_reply_to'] = 'gitlab@example.com' gitlab_rails['gitlab_username_changing_enabled'] = true gitlab_rails['gitlab_default_theme'] = 2 nginx['enable'] = true nginx['client_max_body_size'] = '250m' nginx['redirect_http_to_https'] = true nginx['ssl_certificate'] = "/etc/gitlab/ssl/server.crt" nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/server.key" nginx['ssl_protocols'] = "TLSv1.2 TLSv1.3"