Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f62d9b94
Commit
f62d9b94
authored
Jul 21, 2020
by
Rajendra Kadam
Committed by
Adam Hegyi
Jul 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add boolean 'external' column to custom emoji table
parent
00b75ff4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
0 deletions
+17
-0
changelogs/unreleased/custom-emoji-external-column.yml
changelogs/unreleased/custom-emoji-external-column.yml
+5
-0
db/migrate/20200720154123_add_external_to_custom_emoji.rb
db/migrate/20200720154123_add_external_to_custom_emoji.rb
+9
-0
db/structure.sql
db/structure.sql
+2
-0
spec/models/custom_emoji_spec.rb
spec/models/custom_emoji_spec.rb
+1
-0
No files found.
changelogs/unreleased/custom-emoji-external-column.yml
0 → 100644
View file @
f62d9b94
---
title
:
Add external column to custom emoji table
merge_request
:
37346
author
:
Rajendra Kadam
type
:
added
db/migrate/20200720154123_add_external_to_custom_emoji.rb
0 → 100644
View file @
f62d9b94
# 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
db/structure.sql
View file @
f62d9b94
...
...
@@ -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
\
.
spec/models/custom_emoji_spec.rb
View file @
f62d9b94
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment