Skip to content
This repository was archived by the owner on Nov 8, 2020. It is now read-only.

Commit cddd4e4

Browse files
committed
The length of 'TypeCode' increased to 300
1 parent 1515970 commit cddd4e4

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/Ray.Storage.MySQL/Core/MySQLBuildService.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public async Task<bool> CreateEventSubTable()
3737
CREATE TABLE if not exists `SubTable_Records` (
3838
`TableName` varchar(255) NOT NULL,
3939
`SubTable` varchar(255) NOT NULL,
40-
`StartTime` bigint(20) NULL DEFAULT NULL,
41-
`EndTime` bigint(20) NULL DEFAULT NULL,
40+
`StartTime` int8 NULL DEFAULT NULL,
41+
`EndTime` int8 NULL DEFAULT NULL,
4242
`Index` int(255) NULL DEFAULT NULL,
4343
UNIQUE INDEX `SubTable_Records`(`TableName`, `Index`) USING BTREE
4444
);";
@@ -47,12 +47,12 @@ public async Task<bool> CreateEventSubTable()
4747
}
4848
public async Task CreateEventTable(EventSubTable subTable)
4949
{
50-
var stateIdSql = stateIdIsString ? $"`StateId` varchar({stringStorageOptions.StateIdLength}) NOT NULL" : "`StateId` int8 NOT NULL";
50+
var stateIdSql = stateIdIsString ? $"`StateId` varchar({stringStorageOptions.StateIdLength}) NOT NULL" : "`StateId` bigint(20) NOT NULL";
5151
var sql = $@"
5252
create table if not exists `{subTable.SubTable}` (
5353
{stateIdSql},
5454
`UniqueId` varchar(250) NULL DEFAULT NULL,
55-
`TypeCode` varchar(100) NOT NULL,
55+
`TypeCode` varchar(300) NOT NULL,
5656
`Data` json NOT NULL,
5757
`Version` int8 NOT NULL,
5858
`Timestamp` int8 NOT NULL,
@@ -82,7 +82,7 @@ public async Task CreateEventArchiveTable()
8282
create table if not exists `{storageOptions.EventArchiveTable}` (
8383
{stateIdSql},
8484
`UniqueId` varchar(250) null,
85-
`TypeCode` varchar(100) NOT NULL,
85+
`TypeCode` varchar(300) NOT NULL,
8686
`Data` json NOT NULL,
8787
`Version` int8 NOT NULL,
8888
`Timestamp` int8 NOT NULL,

src/Ray.Storage.PostgreSQL/Core/PSQLBuildService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public async Task CreateEventTable(EventSubTable subTable)
5252
create table {subTable.SubTable} (
5353
{stateIdSql},
5454
UniqueId varchar(250) null,
55-
TypeCode varchar(100) not null,
55+
TypeCode varchar(300) not null,
5656
Data json not null,
5757
Version int8 not null,
5858
Timestamp int8 not null,
@@ -82,7 +82,7 @@ public async Task CreateEventArchiveTable()
8282
create table if not exists {storageOptions.EventArchiveTable} (
8383
{stateIdSql},
8484
UniqueId varchar(250) null,
85-
TypeCode varchar(100) not null,
85+
TypeCode varchar(300) not null,
8686
Data json not null,
8787
Version int8 not null,
8888
Timestamp int8 not null,

src/Ray.Storage.SQLServer/Core/SQLServerBuildService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public async Task CreateEventTable(EventSubTable subTable)
5454
create table {subTable.SubTable} (
5555
{stateIdSql},
5656
UniqueId varchar(250) null,
57-
TypeCode varchar(100) not null,
57+
TypeCode varchar(300) not null,
5858
Data nvarchar(max) not null,
5959
Version bigint not null,
6060
Timestamp bigint not null,
@@ -85,7 +85,7 @@ public async Task CreateEventArchiveTable()
8585
create table {storageOptions.EventArchiveTable} (
8686
{stateIdSql},
8787
UniqueId varchar(250) null,
88-
TypeCode varchar(100) not null,
88+
TypeCode varchar(300) not null,
8989
Data nvarchar(max) not null,
9090
Version bigint not null,
9191
Timestamp bigint not null,

0 commit comments

Comments
 (0)