Skip to content
Snippets Groups Projects
Commit ba070f19 authored by Alper Akgun's avatar Alper Akgun :one:
Browse files

Merge branch 'issue_361987' into 'master'

Remove not null constraints from requirements columns

See merge request !91611
parents 18611515 b9ac860f
No related branches found
No related tags found
1 merge request!91611Remove not null constraints from requirements columns
Pipeline #590059774 passed with warnings
Pipeline: GitLab

#590062613

    # frozen_string_literal: true
    class RemoveNotNullConstraintsFromRequirements < Gitlab::Database::Migration[2.0]
    disable_ddl_transaction!
    def up
    change_column_null :requirements, :created_at, true
    change_column_null :requirements, :updated_at, true
    change_column_null :requirements, :title, true
    change_column_null :requirements, :state, true
    end
    def down
    # No OP
    # The columns could have nil values again at this point. Rolling back
    # would cause an exception, also we cannot insert data and modify the schema within the same migration.
    # More details at https://gitlab.com/gitlab-org/gitlab/-/merge_requests/91611#note_1017066470
    end
    end
    7c9b8b433553e83bb05208e62541e3d51bcc1083ff33d1146e93b92d954f9cb0
    \ No newline at end of file
    ......@@ -20270,14 +20270,14 @@ ALTER SEQUENCE required_code_owners_sections_id_seq OWNED BY required_code_owner
     
    CREATE TABLE requirements (
    id bigint NOT NULL,
    created_at timestamp with time zone NOT NULL,
    updated_at timestamp with time zone NOT NULL,
    created_at timestamp with time zone,
    updated_at timestamp with time zone,
    project_id integer NOT NULL,
    author_id integer,
    iid integer NOT NULL,
    cached_markdown_version integer,
    state smallint DEFAULT 1 NOT NULL,
    title character varying(255) NOT NULL,
    state smallint DEFAULT 1,
    title character varying(255),
    title_html text,
    description text,
    description_html text,
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment