Last active
August 29, 2015 13:58
-
-
Save mivano/10429656 to your computer and use it in GitHub Desktop.
Serilog Log table create SQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
CREATE TABLE [Logs]( | |
[Id] [int] IDENTITY(1,1) NOT NULL, | |
[Message] [nvarchar](max) NULL, | |
[MessageTemplate] [nvarchar](max) NULL, | |
[Level] [nvarchar](128) NULL, | |
[TimeStamp] [datetime] NOT NULL, | |
[Exception] [nvarchar](max) NULL, | |
[Properties] [xml] NULL, | |
CONSTRAINT [PK_Logs] PRIMARY KEY CLUSTERED | |
( | |
[Id] ASC | |
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | |
) ON [PRIMARY] | |
GO | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Setting TimeStamp to datetime2 would enable a more accurate time and is more future proof than datetime. Depending on the accuracy, you could save 1-2 bytes per row.