-- SCHEMA: int

---------------------------------------------
--  TABLES
---------------------------------------------


---------------------------------------------
-- int.AggregatePostDIHistory ------------------
---------------------------------------------
DROP TABLE [int].[AggregatePostDIHistory];
GO

CREATE TABLE [int].[AggregatePostDIHistory] (
    [AggregatePostDIHistoryGuid] uniqueidentifier NOT NULL,
    [CreatedAtUtc] datetime NOT NULL,
    [LastRanUtc] datetime NOT NULL,
    [AggregatePostDIStatus] int NOT NULL,
    PRIMARY KEY ([AggregatePostDIHistoryGuid])
);
GO
ALTER TABLE [int].[AggregatePostDIHistory] ADD CONSTRAINT [DF__Aggregate__Aggre__4EDF0E15] DEFAULT (newid()) FOR [AggregatePostDIHistoryGuid]; GO
ALTER TABLE [int].[AggregatePostDIHistory] ADD CONSTRAINT [DF__Aggregate__Creat__4FD3324E] DEFAULT (getutcdate()) FOR [CreatedAtUtc]; GO
ALTER TABLE [int].[AggregatePostDIHistory] ADD CONSTRAINT [DF__Aggregate__LastR__50C75687] DEFAULT ('1900-01-01 00:00:00.000') FOR [LastRanUtc]; GO
ALTER TABLE [int].[AggregatePostDIHistory] ADD CONSTRAINT [DF__Aggregate__Aggre__51BB7AC0] DEFAULT ((0)) FOR [AggregatePostDIStatus]; GO
