mirror of
https://github.com/hanzoai/team.git
synced 2026-09-30 01:57:35 +00:00
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
21 lines
648 B
SQL
21 lines
648 B
SQL
CREATE TABLE IF NOT EXISTS PostReminders (
|
|
PostId varchar(26) NOT NULL,
|
|
UserId varchar(26) NOT NULL,
|
|
TargetTime bigint,
|
|
PRIMARY KEY (PostId, UserId)
|
|
);
|
|
|
|
SET @preparedStatement = (SELECT IF(
|
|
(
|
|
SELECT COUNT(*) FROM INFORMATION_SCHEMA.STATISTICS
|
|
WHERE table_name = 'PostReminders'
|
|
AND table_schema = DATABASE()
|
|
AND index_name = 'idx_postreminders_targettime'
|
|
) > 0,
|
|
'SELECT 1',
|
|
'CREATE INDEX idx_postreminders_targettime ON PostReminders(TargetTime);'
|
|
));
|
|
|
|
PREPARE createIndexIfNotExists FROM @preparedStatement;
|
|
EXECUTE createIndexIfNotExists;
|
|
DEALLOCATE PREPARE createIndexIfNotExists; |