Mono repo -> Master (#22553)
Combines the following repositories into one: https://github.com/mattermost/mattermost-server https://github.com/mattermost/mattermost-webapp https://github.com/mattermost/focalboard https://github.com/mattermost/mattermost-plugin-playbooks
Этот коммит содержится в:
23
server/channels/db/migrations/mysql/000028_create_tokens.up.sql
Обычный файл
23
server/channels/db/migrations/mysql/000028_create_tokens.up.sql
Обычный файл
@@ -0,0 +1,23 @@
|
||||
CREATE TABLE IF NOT EXISTS Tokens (
|
||||
Token varchar(64) NOT NULL,
|
||||
CreateAt bigint(20),
|
||||
Type varchar(64) DEFAULT NULL,
|
||||
Extra text,
|
||||
PRIMARY KEY (Token)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
SET @preparedStatement = (SELECT IF(
|
||||
(
|
||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE table_name = 'Tokens'
|
||||
AND table_schema = DATABASE()
|
||||
AND column_name = 'Extra'
|
||||
AND data_type != 'text'
|
||||
) > 0,
|
||||
'ALTER TABLE Tokens MODIFY Extra text;',
|
||||
'SELECT 1'
|
||||
));
|
||||
|
||||
PREPARE alterIfExists FROM @preparedStatement;
|
||||
EXECUTE alterIfExists;
|
||||
DEALLOCATE PREPARE alterIfExists;
|
||||
Ссылка в новой задаче
Block a user