Commit 7f0febfc authored by Adam Hegyi's avatar Adam Hegyi

Merge branch 'fix_deleting_user_psql_error_on_events_table_v2' into 'master'

Fix error in resource_events tables while deleting user

See merge request gitlab-org/gitlab!34190
parents df980634 a7710eb2
---
title: Remove not null constraint from events tables
merge_request: 34190
author:
type: fixed
# frozen_string_literal: true
class RemoveNotNullConstraintFromWeightEventsTable < ActiveRecord::Migration[6.0]
DOWNTIME = false
def change
change_column_null :resource_weight_events, :user_id, true
end
end
# frozen_string_literal: true
class RemoveNotNullConstraintFromMilestoneEventsTable < ActiveRecord::Migration[6.0]
DOWNTIME = false
def change
change_column_null :resource_milestone_events, :user_id, true
end
end
# frozen_string_literal: true
class RemoveNotNullConstraintFromStateEventsTable < ActiveRecord::Migration[6.0]
DOWNTIME = false
def change
change_column_null :resource_state_events, :user_id, true
end
end
......@@ -5955,7 +5955,7 @@ ALTER SEQUENCE public.resource_label_events_id_seq OWNED BY public.resource_labe
CREATE TABLE public.resource_milestone_events (
id bigint NOT NULL,
user_id bigint NOT NULL,
user_id bigint,
issue_id bigint,
merge_request_id bigint,
milestone_id bigint,
......@@ -5975,7 +5975,7 @@ ALTER SEQUENCE public.resource_milestone_events_id_seq OWNED BY public.resource_
CREATE TABLE public.resource_state_events (
id bigint NOT NULL,
user_id bigint NOT NULL,
user_id bigint,
issue_id bigint,
merge_request_id bigint,
created_at timestamp with time zone NOT NULL,
......@@ -5995,7 +5995,7 @@ ALTER SEQUENCE public.resource_state_events_id_seq OWNED BY public.resource_stat
CREATE TABLE public.resource_weight_events (
id bigint NOT NULL,
user_id bigint NOT NULL,
user_id bigint,
issue_id bigint NOT NULL,
weight integer,
created_at timestamp with time zone NOT NULL
......@@ -13967,6 +13967,9 @@ COPY "schema_migrations" (version) FROM STDIN;
20200608075553
20200608214008
20200609002841
20200609142506
20200609142507
20200609142508
20200609212701
\.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment