Install SQLs: Fix MariaDB compatibility

This commit is contained in:
Vladimir Barinov 2022-09-17 00:25:44 +03:00 committed by GitHub
parent 5b3a1f50e9
commit 283d8c1c2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

View file

@ -1,14 +1,13 @@
CREATE TABLE `links_banned` ( CREATE TABLE `links_banned` (
`id` bigint UNSIGNED NOT NULL, `id` bigint UNSIGNED NOT NULL,
`domain` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, `domain` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_nopad_ci NOT NULL,
`regexp_rule` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, `regexp_rule` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_nopad_ci NOT NULL,
`reason` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci, `reason` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_nopad_ci,
`initiator` bigint UNSIGNED NOT NULL `initiator` bigint UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_nopad_ci;
ALTER TABLE `links_banned` ALTER TABLE `links_banned`
ADD PRIMARY KEY (`id`); ADD PRIMARY KEY (`id`);
ALTER TABLE `links_banned` ALTER TABLE `links_banned`
MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT; MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;
COMMIT;

View file

@ -2,11 +2,10 @@ CREATE TABLE `aliases` (
`id` bigint UNSIGNED NOT NULL, `id` bigint UNSIGNED NOT NULL,
`owner_id` bigint NOT NULL, `owner_id` bigint NOT NULL,
`shortcode` varchar(36) NOT NULL `shortcode` varchar(36) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_nopad_ci;
ALTER TABLE `aliases` ALTER TABLE `aliases`
ADD PRIMARY KEY (`id`); ADD PRIMARY KEY (`id`);
ALTER TABLE `aliases` ALTER TABLE `aliases`
MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT; MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;
COMMIT;