Added missing migration for emoticons table.
This commit is contained in:
parent
46aa7cee81
commit
56ad9c1de6
1 changed files with 29 additions and 0 deletions
29
database/2019_07_04_175010_create_emoticons_table.php
Normal file
29
database/2019_07_04_175010_create_emoticons_table.php
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
namespace Misuzu\DatabaseMigrations\CreateEmoticonsTable;
|
||||
|
||||
use PDO;
|
||||
|
||||
function migrate_up(PDO $conn): void
|
||||
{
|
||||
$conn->exec("
|
||||
CREATE TABLE `msz_emoticons` (
|
||||
`emote_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`emote_order` MEDIUMINT(9) NOT NULL DEFAULT 0,
|
||||
`emote_hierarchy` INT(11) NOT NULL DEFAULT 0,
|
||||
`emote_string` VARCHAR(50) NOT NULL COLLATE 'ascii_general_nopad_ci',
|
||||
`emote_url` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_bin',
|
||||
PRIMARY KEY (`emote_id`),
|
||||
UNIQUE INDEX `emotes_string` (`emote_string`),
|
||||
INDEX `emotes_order` (`emote_order`),
|
||||
INDEX `emotes_hierarchy` (`emote_hierarchy`),
|
||||
INDEX `emotes_url` (`emote_url`)
|
||||
) COLLATE='utf8mb4_bin' ENGINE=InnoDB;
|
||||
");
|
||||
}
|
||||
|
||||
function migrate_down(PDO $conn): void
|
||||
{
|
||||
$conn->exec("
|
||||
DROP TABLE `msz_emoticons`;
|
||||
");
|
||||
}
|
Loading…
Reference in a new issue