ERROR: relation "group_group_links" does not exist at character 454
I have upgraded to 13.4.2 and I now get the error "ERROR: relation "group_group_links" does not exist at character 454" whenever I try to access groups.
I saw solutions about adding the file 20180902070406_create_group_group_links.rb to migrate dir and then I did docker exec -it stage_gitlab bundle exec rake db:migrate RAILS_ENV=production but that is also not working for me.
I don't know if this is an issue specific to this image. Any help would be welcome in resolving this.
Getting the error : "NameError: uninitialized constant RSpec" when i run it.
I've got this issue too on 13.4.1 if I try to access a group. Any work arounds or is upgrading the best path?
Same issue here with 13.4.5 with postgres database. Apply these queries with gitlab user in postgres seems to fix the issue
CREATE TABLE group_group_links (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
shared_group_id bigint NOT NULL,
shared_with_group_id bigint NOT NULL,
expires_at date,
group_access smallint DEFAULT 30 NOT NULL
);
CREATE SEQUENCE group_group_links_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE group_group_links_id_seq OWNED BY group_group_links.id;
ALTER TABLE ONLY group_group_links ALTER COLUMN id SET DEFAULT nextval('group_group_links_id_seq'::regclass);
CREATE UNIQUE INDEX index_group_group_links_on_shared_group_and_shared_with_group ON group_group_links USING btree (shared_group_id, shared_with_group_id);
CREATE INDEX index_group_group_links_on_shared_with_group_id ON group_group_links USING btree (shared_with_group_id);
ALTER TABLE ONLY group_group_links
ADD CONSTRAINT fk_rails_2b2353ca49 FOREIGN KEY (shared_with_group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
ALTER TABLE ONLY group_group_links
ADD CONSTRAINT fk_rails_d3a0488427 FOREIGN KEY (shared_group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
To solve the problem :
-
download this file 20180902070406_create_group_group_links.rb and place it to the /home/git/gitlab/db/migrate folder
-
cd into the root floder of gitlab
cd /home/git/gitlab
- Launch the command below
bundle exec rake db:migrate
You should see after few time these messages :
== 20180902070406 CreateGroupGroupLinks: migrating ============================
-- create_table(:group_group_links, {})
-> 0.0247s
== 20180902070406 CreateGroupGroupLinks: migrated (0.0249s) ===================
@lucpolak pay attention to the fact that the file is not directly downloadable. one must use https://gitlab.com/gitlab-org/gitlab/-/raw/b86a9b14b6d43923decec049cf18d915c81d3e7c/db/migrate/20180902070406_create_group_group_links.rb?inline=false