Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
51c80c37
Commit
51c80c37
authored
Nov 20, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert: tweak reaction_type column type for mysql
parent
9f2c1b25
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
6 deletions
+2
-6
LATEST.sql
store/migration/mysql/dev/LATEST.sql
+1
-1
00__reactions.sql
store/migration/mysql/prod/0.23/00__reactions.sql
+0
-4
LATEST.sql
store/migration/mysql/prod/LATEST.sql
+1
-1
No files found.
store/migration/mysql/dev/LATEST.sql
View file @
51c80c37
...
@@ -127,6 +127,6 @@ CREATE TABLE `reaction` (
...
@@ -127,6 +127,6 @@ CREATE TABLE `reaction` (
`created_ts`
TIMESTAMP
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
`created_ts`
TIMESTAMP
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
`creator_id`
INT
NOT
NULL
,
`creator_id`
INT
NOT
NULL
,
`content_id`
VARCHAR
(
256
)
NOT
NULL
,
`content_id`
VARCHAR
(
256
)
NOT
NULL
,
`reaction_type`
TINYTEXT
NOT
NULL
,
`reaction_type`
VARCHAR
(
256
)
NOT
NULL
,
UNIQUE
(
`creator_id`
,
`content_id`
,
`reaction_type`
)
UNIQUE
(
`creator_id`
,
`content_id`
,
`reaction_type`
)
);
);
store/migration/mysql/prod/0.23/00__reactions.sql
View file @
51c80c37
-- modify reaction_type to be a TINYTEXT instead of varchar(256).
ALTER
TABLE
`reaction`
MODIFY
`reaction_type`
TINYTEXT
NOT
NULL
;
-- update reaction_type to emoji.
UPDATE
`reaction`
SET
`reaction_type`
=
'👍'
WHERE
`reaction_type`
=
'THUMBS_UP'
;
UPDATE
`reaction`
SET
`reaction_type`
=
'👍'
WHERE
`reaction_type`
=
'THUMBS_UP'
;
UPDATE
`reaction`
SET
`reaction_type`
=
'👎'
WHERE
`reaction_type`
=
'THUMBS_DOWN'
;
UPDATE
`reaction`
SET
`reaction_type`
=
'👎'
WHERE
`reaction_type`
=
'THUMBS_DOWN'
;
UPDATE
`reaction`
SET
`reaction_type`
=
'💛'
WHERE
`reaction_type`
=
'HEART'
;
UPDATE
`reaction`
SET
`reaction_type`
=
'💛'
WHERE
`reaction_type`
=
'HEART'
;
...
...
store/migration/mysql/prod/LATEST.sql
View file @
51c80c37
...
@@ -127,6 +127,6 @@ CREATE TABLE `reaction` (
...
@@ -127,6 +127,6 @@ CREATE TABLE `reaction` (
`created_ts`
TIMESTAMP
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
`created_ts`
TIMESTAMP
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
`creator_id`
INT
NOT
NULL
,
`creator_id`
INT
NOT
NULL
,
`content_id`
VARCHAR
(
256
)
NOT
NULL
,
`content_id`
VARCHAR
(
256
)
NOT
NULL
,
`reaction_type`
TINYTEXT
NOT
NULL
,
`reaction_type`
VARCHAR
(
256
)
NOT
NULL
,
UNIQUE
(
`creator_id`
,
`content_id`
,
`reaction_type`
)
UNIQUE
(
`creator_id`
,
`content_id`
,
`reaction_type`
)
);
);
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