mirror of
https://github.com/usememos/memos.git
synced 2025-10-06 12:26:29 +08:00
revert: tweak reaction_type column type for mysql
This commit is contained in:
parent
9f2c1b2556
commit
51c80c37d1
3 changed files with 2 additions and 6 deletions
|
@ -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`)
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
-- 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';
|
||||||
|
|
|
@ -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`)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue