 
 CREATE TABLE [dbo].[OrleansMembershipTable]
 (
-	[DeploymentId] NVARCHAR(150) NOT NULL, 
+    [DeploymentId] NVARCHAR(150) NOT NULL, 
     [Address] NVARCHAR(150) NOT NULL, 
     [Port] INT NOT NULL, 
     [Generation] INT NOT NULL, 

    [SuspectingTimes] NTEXT NULL, 
    [StartTime] DATETIME NOT NULL, 
    [IAmAliveTime] DATETIME NOT NULL, 
	[ETag] NVARCHAR(50) NOT NULL,
    PRIMARY KEY ([DeploymentId],[Address],[Port],[Generation])
)

CREATE TABLE [dbo].[OrleansMembershipVersionTable]
(
	[DeploymentId] NVARCHAR(150) NOT NULL, 
    [TimeStamp] DATETIME NOT NULL, 
    [Version] BIGINT NOT NULL, 
	[ETag] NVARCHAR(50) NOT NULL,
    PRIMARY KEY ([DeploymentId])
)

CREATE TABLE [dbo].[OrleansRemindersTable]
(
	[ServiceId] NVARCHAR(150) NOT NULL, 
    [GrainId] NVARCHAR(150) NOT NULL, 
	[ReminderName] NVARCHAR(150) NOT NULL,
    [StartTime] DATETIME NOT NULL, 
    [Period] INT NOT NULL,
	[GrainIdConsistentHash] INT NOT NULL, 
	[ETag] NVARCHAR(50) NOT NULL,
    PRIMARY KEY ([ServiceId],[GrainId],[ReminderName])
)

CREATE TABLE [dbo].[OrleansSiloMetricsTable]
(
	[DeploymentId] NVARCHAR(150) NOT NULL, 
    [SiloId] NVARCHAR(150) NOT NULL, 
    [TimeStamp] DATETIME NOT NULL, 
    [Address] NVARCHAR(50) NOT NULL, 

    [HostName] NVARCHAR(150) NOT NULL, 
    [Name] NVARCHAR(150) NULL, 
    [IsDelta] BIT NULL, 
    [StatValue] NVARCHAR(250) NOT NULL,
    [Statistic] NVARCHAR(250) NOT NULL,
    PRIMARY KEY ([DeploymentId],[Date],[Id],[Counter])
)

