Skip to content

Instantly share code, notes, and snippets.

@goyalmohit
Created March 4, 2019 12:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goyalmohit/e36b7fe72272692d82499a08dc0c6b43 to your computer and use it in GitHub Desktop.
Save goyalmohit/e36b7fe72272692d82499a08dc0c6b43 to your computer and use it in GitHub Desktop.
Liquibase formatted Sql changelog to create table named ErrorLog
--liquibase formatted sql
--changeset mohitgoyal:20190304153300 context:development
CREATE TABLE [dbo].[ErrorLog](
[ErrorLogID] [int] IDENTITY(1,1) NOT NULL,
[ErrorTime] [datetime] NOT NULL,
[UserName] [sysname] NOT NULL,
[ErrorNumber] [int] NOT NULL,
[ErrorSeverity] [int] NULL,
[ErrorState] [int] NULL,
[ErrorProcedure] [nvarchar](126) NULL,
[ErrorLine] [int] NULL,
[ErrorMessage] [nvarchar](4000) NOT NULL,
CONSTRAINT [PK_ErrorLog_ErrorLogID] PRIMARY KEY CLUSTERED
(
[ErrorLogID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
--changeset mohitgoyal:20190304153400 context:development
ALTER TABLE [dbo].[ErrorLog] ADD CONSTRAINT [DF_ErrorLog_ErrorTime] DEFAULT (getdate()) FOR [ErrorTime]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment