 
 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, 

    [HostName] NVARCHAR(150) NOT NULL, 
    [GatewayAddress] NVARCHAR(50) NULL, 
    [GatewayPort] INT NULL, 
	[CPU] FLOAT NOT NULL,
	[Memory] BIGINT NOT NULL,
    [Activations] INT NOT NULL, 
    [SendQueue] INT NOT NULL, 
    [ReceiveQueue] INT NOT NULL, 
	[RequestQueue] BIGINT NOT NULL,
	[SentMessages] BIGINT NOT NULL,
	[ReceivedMessages] BIGINT NOT NULL,
	[LoadShedding] BIT NOT NULL,
	[ClientCount] BIGINT NOT NULL,
    PRIMARY KEY ([DeploymentId],[SiloId])
)

CREATE TABLE [dbo].[OrleansClientMetricsTable]
(
	[DeploymentId] NVARCHAR(150) NOT NULL, 
    [ClientId] NVARCHAR(150) NOT NULL, 
    [TimeStamp] DATETIME NOT NULL, 
    [Address] NVARCHAR(50) NOT NULL, 
    [HostName] NVARCHAR(150) NOT NULL, 
	[CPU] FLOAT NOT NULL,
	[Memory] BIGINT NOT NULL,
    [SendQueue] INT NOT NULL, 
    [ReceiveQueue] INT NOT NULL, 
	[SentMessages] BIGINT NOT NULL,
	[ReceivedMessages] BIGINT NOT NULL,
	[ConnectedGWCount] BIGINT NOT NULL,
    PRIMARY KEY ([DeploymentId],[ClientId])
)

CREATE TABLE [dbo].[OrleansStatisticsTable]
(
	[DeploymentId] NVARCHAR(150) NOT NULL, 
    [Date] DATE NOT NULL, 
    [TimeStamp] DATETIME NOT NULL, 
    [Id] NVARCHAR(250) 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])
)

