瀏覽代碼

add index to ExpiresAt (#426)

master
cuibty 5 年之前
committed by Savorboard
父節點
當前提交
5f690e723b
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. +4
    -2
      src/DotNetCore.CAP.MySql/IStorage.MySql.cs

+ 4
- 2
src/DotNetCore.CAP.MySql/IStorage.MySql.cs 查看文件

@@ -70,7 +70,8 @@ CREATE TABLE IF NOT EXISTS `{prefix}.received` (
`Added` datetime NOT NULL,
`ExpiresAt` datetime DEFAULT NULL,
`StatusName` varchar(50) NOT NULL,
PRIMARY KEY (`Id`)
PRIMARY KEY (`Id`),
INDEX `IX_ExpiresAt`(`ExpiresAt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE IF NOT EXISTS `{prefix}.published` (
@@ -82,7 +83,8 @@ CREATE TABLE IF NOT EXISTS `{prefix}.published` (
`Added` datetime NOT NULL,
`ExpiresAt` datetime DEFAULT NULL,
`StatusName` varchar(40) NOT NULL,
PRIMARY KEY (`Id`)
PRIMARY KEY (`Id`),
INDEX `IX_ExpiresAt`(`ExpiresAt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
";
return batchSql;


Loading…
取消
儲存