Commit ee8f1882 authored by Adam Hegyi's avatar Adam Hegyi

Merge branch 'custom-emoji-external-column' into 'master'

Add boolean 'external' column to custom emoji table

See merge request gitlab-org/gitlab!37346
parents 964bccda f62d9b94
---
title: Add external column to custom emoji table
merge_request: 37346
author: Rajendra Kadam
type: added
# frozen_string_literal: true
class AddExternalToCustomEmoji < ActiveRecord::Migration[6.0]
DOWNTIME = false
def change
add_column :custom_emoji, :external, :boolean, default: true, null: false
end
end
......@@ -10918,6 +10918,7 @@ CREATE TABLE public.custom_emoji (
updated_at timestamp with time zone NOT NULL,
name text NOT NULL,
file text NOT NULL,
external boolean DEFAULT true NOT NULL,
CONSTRAINT check_8c586dd507 CHECK ((char_length(name) <= 36)),
CONSTRAINT check_dd5d60f1fb CHECK ((char_length(file) <= 255))
);
......@@ -23998,5 +23999,6 @@ COPY "schema_migrations" (version) FROM STDIN;
20200718040100
20200718040200
20200718040300
20200720154123
\.
......@@ -8,6 +8,7 @@ RSpec.describe CustomEmoji do
it { is_expected.to have_db_column(:file) }
it { is_expected.to validate_length_of(:name).is_at_most(36) }
it { is_expected.to validate_presence_of(:name) }
it { is_expected.to have_db_column(:external) }
end
describe 'exclusion of duplicated emoji' do
......
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