Fix indexed column length and quotes in comments.

parent 00aa9abb
...@@ -10,6 +10,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c ...@@ -10,6 +10,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
### Deprecated ### Deprecated
### Removed ### Removed
### Fixed ### Fixed
- Indexed table columns now have a fitting length.
### Security ### Security
## [0.44.1] - 2017-04-25 ## [0.44.1] - 2017-04-25
......
CREATE TABLE IF NOT EXISTS `user` ( CREATE TABLE IF NOT EXISTS `user` (
`id` bigint COMMENT 'Unique user identifier', `id` bigint COMMENT 'Unique user identifier',
`first_name` CHAR(255) NOT NULL DEFAULT '' COMMENT 'User\'s first name', `first_name` CHAR(255) NOT NULL DEFAULT '' COMMENT 'User''s first name',
`last_name` CHAR(255) DEFAULT NULL COMMENT 'User\'s last name', `last_name` CHAR(255) DEFAULT NULL COMMENT 'User''s last name',
`username` CHAR(255) DEFAULT NULL COMMENT 'User\'s username', `username` CHAR(191) DEFAULT NULL COMMENT 'User''s username',
`created_at` timestamp NULL DEFAULT NULL COMMENT 'Entry date creation', `created_at` timestamp NULL DEFAULT NULL COMMENT 'Entry date creation',
`updated_at` timestamp NULL DEFAULT NULL COMMENT 'Entry date update', `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Entry date update',
...@@ -30,10 +30,8 @@ CREATE TABLE IF NOT EXISTS `user_chat` ( ...@@ -30,10 +30,8 @@ CREATE TABLE IF NOT EXISTS `user_chat` (
PRIMARY KEY (`user_id`, `chat_id`), PRIMARY KEY (`user_id`, `chat_id`),
FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ON DELETE CASCADE ON UPDATE CASCADE, FOREIGN KEY (`chat_id`) REFERENCES `chat` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
FOREIGN KEY (`chat_id`) REFERENCES `chat` (`id`)
ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
CREATE TABLE IF NOT EXISTS `inline_query` ( CREATE TABLE IF NOT EXISTS `inline_query` (
...@@ -54,7 +52,7 @@ CREATE TABLE IF NOT EXISTS `chosen_inline_result` ( ...@@ -54,7 +52,7 @@ CREATE TABLE IF NOT EXISTS `chosen_inline_result` (
`id` bigint UNSIGNED AUTO_INCREMENT COMMENT 'Unique identifier for this entry', `id` bigint UNSIGNED AUTO_INCREMENT COMMENT 'Unique identifier for this entry',
`result_id` CHAR(255) NOT NULL DEFAULT '' COMMENT 'Identifier for this result', `result_id` CHAR(255) NOT NULL DEFAULT '' COMMENT 'Identifier for this result',
`user_id` bigint NULL COMMENT 'Unique user identifier', `user_id` bigint NULL COMMENT 'Unique user identifier',
`location` CHAR(255) NULL DEFAULT NULL COMMENT 'Location object, user\'s location', `location` CHAR(255) NULL DEFAULT NULL COMMENT 'Location object, user''s location',
`inline_message_id` CHAR(255) NULL DEFAULT NULL COMMENT 'Identifier of the sent inline message', `inline_message_id` CHAR(255) NULL DEFAULT NULL COMMENT 'Identifier of the sent inline message',
`query` TEXT NOT NULL COMMENT 'The query that was used to obtain the result', `query` TEXT NOT NULL COMMENT 'The query that was used to obtain the result',
`created_at` timestamp NULL DEFAULT NULL COMMENT 'Entry date creation', `created_at` timestamp NULL DEFAULT NULL COMMENT 'Entry date creation',
...@@ -160,7 +158,7 @@ CREATE TABLE IF NOT EXISTS `edited_message` ( ...@@ -160,7 +158,7 @@ CREATE TABLE IF NOT EXISTS `edited_message` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
CREATE TABLE IF NOT EXISTS `telegram_update` ( CREATE TABLE IF NOT EXISTS `telegram_update` (
`id` bigint UNSIGNED COMMENT 'Update\'s unique identifier', `id` bigint UNSIGNED COMMENT 'Update''s unique identifier',
`chat_id` bigint NULL DEFAULT NULL COMMENT 'Unique chat identifier', `chat_id` bigint NULL DEFAULT NULL COMMENT 'Unique chat identifier',
`message_id` bigint UNSIGNED DEFAULT NULL COMMENT 'Unique message identifier', `message_id` bigint UNSIGNED DEFAULT NULL COMMENT 'Unique message identifier',
`inline_query_id` bigint UNSIGNED DEFAULT NULL COMMENT 'Unique inline query identifier', `inline_query_id` bigint UNSIGNED DEFAULT NULL COMMENT 'Unique inline query identifier',
...@@ -221,4 +219,4 @@ CREATE TABLE IF NOT EXISTS `request_limiter` ( ...@@ -221,4 +219,4 @@ CREATE TABLE IF NOT EXISTS `request_limiter` (
`created_at` timestamp NULL DEFAULT NULL COMMENT 'Entry date creation', `created_at` timestamp NULL DEFAULT NULL COMMENT 'Entry date creation',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT charSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment