/****** Object:  Table [dbo].[WorkFlows]    Script Date: 06/06/2021 10:17:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[WorkFlows]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[WorkFlows](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Flow] [nvarchar](max) COLLATE Chinese_PRC_CI_AS NULL,
	[Subject] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[TempletID] [int] NOT NULL,
	[FormID] [int] NOT NULL,
	[State] [tinyint] NULL,
	[Builder] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[BuildTime] [datetime] NOT NULL,
	[Starter] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[StartTime] [datetime] NULL,
	[EndTime] [datetime] NOT NULL,
	[FinishTime] [datetime] NULL,
 CONSTRAINT [PK_WorkFlows] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[WorkFlows]') AND name = N'SX_ObjIndex')
CREATE NONCLUSTERED INDEX [SX_ObjIndex] ON [dbo].[WorkFlows] 
(
	[TempletID] ASC,
	[FormID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
/****** Object:  Table [dbo].[WorkFlow]    Script Date: 06/06/2021 10:17:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[WorkFlow]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[WorkFlow](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[TempletID] [int] NULL,
	[Nodes] [nvarchar](max) COLLATE Chinese_PRC_CI_AS NULL,
	[DataOpera] [tinyint] NULL,
	[Options] [nvarchar](4000) COLLATE Chinese_PRC_CI_AS NULL,
	[Builder] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[LastMender] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[LastModified] [datetime] NOT NULL,
 CONSTRAINT [PK_WorkFlow] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[WorkFlow]') AND name = N'SX_TempletID')
CREATE NONCLUSTERED INDEX [SX_TempletID] ON [dbo].[WorkFlow] 
(
	[TempletID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
/****** Object:  Table [dbo].[Vars]    Script Date: 06/06/2021 10:17:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Vars]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Vars](
	[Key] [varchar](32) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[BinValue] [varbinary](max) NULL,
	[Remark] [varchar](255) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [aaaaaVars_PK] PRIMARY KEY NONCLUSTERED 
(
	[Key] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Vars]') AND name = N'key')
CREATE NONCLUSTERED INDEX [key] ON [dbo].[Vars] 
(
	[Key] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Key'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Key'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Key'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Key'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Key'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Key'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Key'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Key'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Key'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Key'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Key'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'1095' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Key'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Key'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Key'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Key'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Key'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Key'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Key'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Key'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Key'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Key'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Key' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Key'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Key'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Key'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Key'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Key'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Key'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'25' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Key'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Key'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Key' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Key'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Key'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Vars' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Key'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Key'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Key'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Key'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Key'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'BinValue'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'BinValue'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'BinValue'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'BinValue'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'BinValue'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'BinValue'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'BinValue'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'BinValue'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'BinValue'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'BinValue'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'BinValue'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'BinValue'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'BinValue'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'BinValue'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'BinValue'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'BinValue' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'BinValue'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'BinValue'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'BinValue'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'BinValue'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'BinValue'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'BinValue'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'BinValue'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'BinValue'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'BinValue' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'BinValue'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'BinValue'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Vars' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'BinValue'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'BinValue'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'11' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'BinValue'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Remark'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Remark'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Remark'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Remark'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Remark'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Remark'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Remark'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Remark'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Remark'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Remark'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Remark'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'1785' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Remark'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Remark'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Remark'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Remark'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Remark'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Remark'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Remark'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Remark'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Remark' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Remark'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Remark'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Remark'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Remark'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Remark'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Remark'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Remark'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Remark'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Remark' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Remark'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Remark'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Vars' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Remark'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Remark'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'12' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Remark'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', N'COLUMN',N'Remark'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars', @level2type=N'COLUMN',@level2name=N'Remark'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DateCreated' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'DateCreated', @value=N'2006-1-12 10:47:31' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'LastUpdated' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'LastUpdated', @value=N'2007-8-23 11:47:02' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DefaultView' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DefaultView', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_OrderByOn' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_OrderByOn', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Orientation' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_Orientation', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Vars' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'RecordCount' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'RecordCount', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Updatable' , N'SCHEMA',N'dbo', N'TABLE',N'Vars', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Updatable', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Vars'
GO
INSERT [dbo].[Vars] ([Key], [BinValue], [Remark]) VALUES (N'Vars',  , N'系统选项')
INSERT [dbo].[Vars] ([Key], [BinValue], [Remark]) VALUES (N'OptimizeDB', NULL, N'0')
/****** Object:  Table [dbo].[UserExInfo]    Script Date: 06/06/2021 10:17:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[UserExInfo]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[UserExInfo](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[UserName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[RealName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[UnitID] [int] NOT NULL,
	[IsRector] [bit] NULL,
	[ManagedUnits] [varchar](1024) COLLATE Chinese_PRC_CI_AS NULL,
	[RectedUnits] [varchar](1024) COLLATE Chinese_PRC_CI_AS NULL,
	[Sex] [bit] NOT NULL,
	[Address] [nvarchar](512) COLLATE Chinese_PRC_CI_AS NULL,
	[Zip] [varchar](18) COLLATE Chinese_PRC_CI_AS NULL,
	[Phone] [varchar](64) COLLATE Chinese_PRC_CI_AS NULL,
	[Weixin] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[More] [nvarchar](2048) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_UserName] PRIMARY KEY CLUSTERED 
(
	[UserName] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'UserName'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'UserName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'UserName'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'UserName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'UserName'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'UserName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'UserName'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'UserName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'UserName'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'UserName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'UserName'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'UserName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'UserName'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'UserName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'UserName'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'UserName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'UserName'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'UserName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'UserName'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'UserName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'UserName'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'UserName' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'UserName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'UserName'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'UserName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'UserName'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'UserName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'UserName'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'UserName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'UserName'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'UserName' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'UserName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'UserName'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'UserExInfo' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'UserName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'UserName'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'UserName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'UserName'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'UserName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Sex'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Sex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Sex'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Sex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Sex'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Sex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Sex'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Sex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Sex'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Sex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Sex'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Sex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Sex'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Sex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Sex'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Sex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Sex'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'106' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Sex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Format' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Sex'))
EXEC sys.sp_addextendedproperty @name=N'MS_Format', @value=N'Yes/No' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Sex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Sex'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Sex' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Sex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Sex'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Sex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Sex'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Sex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Sex'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Sex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Sex'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Sex' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Sex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Sex'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'UserExInfo' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Sex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Sex'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Sex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Address' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Address' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'UserExInfo' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'12' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Zip' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'12' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Zip' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'UserExInfo' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Phone' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Phone' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'UserExInfo' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DateCreated' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'DateCreated', @value=N'2006-12-20 14:29:57' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'LastUpdated' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'LastUpdated', @value=N'2007-8-10 11:53:28' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DefaultView' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DefaultView', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_OrderByOn' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_OrderByOn', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Orientation' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_Orientation', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'UserExInfo' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'RecordCount' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'RecordCount', @value=N'7' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Updatable' , N'SCHEMA',N'dbo', N'TABLE',N'UserExInfo', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Updatable', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserExInfo'
GO
SET IDENTITY_INSERT [dbo].[UserExInfo] ON
INSERT [dbo].[UserExInfo] ([ID], [UserName], [RealName], [UnitID], [IsRector], [ManagedUnits], [RectedUnits], [Sex], [Address], [Zip], [Phone], [Weixin], [More]) VALUES (1, N'admin', N'', 0, 0, NULL, NULL, 1, N'', N'', N'', N'', NULL)
SET IDENTITY_INSERT [dbo].[UserExInfo] OFF
/****** Object:  Table [dbo].[Units]    Script Date: 06/06/2021 10:17:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Units]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Units](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[UnitName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[ParentID] [int] NOT NULL,
	[SortNum] [int] NULL,
	[Deep] [int] NOT NULL,
 CONSTRAINT [PK_Units] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Units]') AND name = N'SX_ParentID')
CREATE NONCLUSTERED INDEX [SX_ParentID] ON [dbo].[Units] 
(
	[ParentID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Units]') AND name = N'SX_SortNum')
CREATE NONCLUSTERED INDEX [SX_SortNum] ON [dbo].[Units] 
(
	[SortNum] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
/****** Object:  Table [dbo].[Tokens]    Script Date: 06/06/2021 10:17:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Tokens]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Tokens](
	[ID] [varchar](10) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[User] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Valid] [bit] NOT NULL,
	[From] [datetime] NOT NULL,
	[To] [datetime] NOT NULL,
 CONSTRAINT [PK_Tokens] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Tokens]') AND name = N'SX_From')
CREATE NONCLUSTERED INDEX [SX_From] ON [dbo].[Tokens] 
(
	[From] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Tokens]') AND name = N'SX_To')
CREATE NONCLUSTERED INDEX [SX_To] ON [dbo].[Tokens] 
(
	[To] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
/****** Object:  Table [dbo].[Templets]    Script Date: 06/06/2021 10:17:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Templets]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Templets](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Name] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[TableName] [varchar](18) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[FirstIdenField] [varchar](18) COLLATE Chinese_PRC_CI_AS NULL,
	[Filters] [varbinary](max) NULL,
	[LastMender] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[DefaultDir] [int] NULL,
	[DefaultSecLevel] [tinyint] NULL,
	[ViewSetting] [nvarchar](max) COLLATE Chinese_PRC_CI_AS NULL,
	[SecOptions] [nvarchar](4000) COLLATE Chinese_PRC_CI_AS NULL,
	[FolderID] [int] NOT NULL,
	[Relations] [varchar](8000) COLLATE Chinese_PRC_CI_AS NULL,
	[UnionKeys] [varchar](90) COLLATE Chinese_PRC_CI_AS NULL,
	[PowerAs] [int] NULL,
	[Generators] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
	[Operations] [nvarchar](max) COLLATE Chinese_PRC_CI_AS NULL,
	[Search] [nvarchar](max) COLLATE Chinese_PRC_CI_AS NULL,
	[ExtSetting] [nvarchar](max) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [aaaaaTemplets_PK] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'17' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Templets' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Templets' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'TableName'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'TableName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'TableName'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'TableName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'TableName'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'TableName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'TableName'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'TableName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'TableName'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'TableName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'TableName'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'TableName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'TableName'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'TableName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'TableName'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'TableName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'TableName'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'TableName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'TableName'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'TableName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'TableName'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'TableName' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'TableName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'TableName'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'TableName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'TableName'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'TableName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'TableName'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'TableName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'TableName'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'TableName' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'TableName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'TableName'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Templets' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'TableName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'TableName'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'TableName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'TableName'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'TableName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'FirstIdenField'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'FirstIdenField'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'FirstIdenField'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'FirstIdenField'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'FirstIdenField'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'FirstIdenField'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'FirstIdenField'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'FirstIdenField'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'FirstIdenField'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'FirstIdenField'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'FirstIdenField'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'FirstIdenField'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'FirstIdenField'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'FirstIdenField'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'FirstIdenField'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'FirstIdenField'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'FirstIdenField'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'FirstIdenField'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'FirstIdenField'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'FirstIdenField'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'FirstIdenField'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'IdenFieldID_m' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'FirstIdenField'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'FirstIdenField'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'FirstIdenField'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'FirstIdenField'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'FirstIdenField'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'FirstIdenField'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'FirstIdenField'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'FirstIdenField'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'IdenFieldID_m' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'FirstIdenField'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'FirstIdenField'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Templets' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'FirstIdenField'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'FirstIdenField'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'FirstIdenField'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Filters'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Filters'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Filters'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Filters'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Filters'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Filters'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Filters'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Filters'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Filters'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Filters'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Filters'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Filters'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Filters'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Filters'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Filters'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Filters' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Filters'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Filters'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'9' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Filters'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Filters'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Filters'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Filters'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Filters'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Filters'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Filters' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Filters'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Filters'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Templets' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Filters'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'Filters'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'11' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'Filters'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'""' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'LastMender' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'11' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'LastMender' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Templets' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DateCreated' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'DateCreated', @value=N'2006-12-5 9:06:26' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'LastUpdated' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'LastUpdated', @value=N'2007-10-1 15:53:43' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DefaultView' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DefaultView', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_OrderByOn' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_OrderByOn', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Orientation' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_Orientation', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Templets' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'RecordCount' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'RecordCount', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Updatable' , N'SCHEMA',N'dbo', N'TABLE',N'Templets', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Updatable', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Templets'
GO
/****** Object:  Table [dbo].[TempletPower]    Script Date: 06/06/2021 10:17:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[TempletPower]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[TempletPower](
	[TempletID] [int] NOT NULL,
	[Role] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Power] [tinyint] NULL,
	[ReadPower] [int] NULL,
	[WritableFields] [varchar](4000) COLLATE Chinese_PRC_CI_AS NULL,
	[AdminMadeByOther] [bit] NULL,
	[WritableAllFields] [bit] NULL,
	[ReadCondition] [nvarchar](2048) COLLATE Chinese_PRC_CI_AS NULL,
	[EditCondition] [nvarchar](2048) COLLATE Chinese_PRC_CI_AS NULL,
	[AllowAdd] [bit] NOT NULL,
	[ReadComment] [bit] NOT NULL,
	[WriteComment] [bit] NOT NULL,
	[AdminComment] [bit] NOT NULL,
	[Visible] [bit] NOT NULL,
 CONSTRAINT [aaaaaTempletPower_PK] PRIMARY KEY NONCLUSTERED 
(
	[TempletID] ASC,
	[Role] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'TempletID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'TempletID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'TempletPower' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Role' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Role' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'TempletPower' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Power' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Power' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'TempletPower' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'ReadPower'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'ReadPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'ReadPower'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'ReadPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'ReadPower'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'ReadPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'ReadPower'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'ReadPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'ReadPower'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'ReadPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'ReadPower'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'ReadPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'ReadPower'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'ReadPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'ReadPower'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'ReadPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'ReadPower'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'ReadPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'ReadPower'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'ReadPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'ReadPower'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'ReadPower' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'ReadPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'ReadPower'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'ReadPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'ReadPower'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'ReadPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'ReadPower'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'ReadPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'ReadPower'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'ReadPower' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'ReadPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'ReadPower'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'TempletPower' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'ReadPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', N'COLUMN',N'ReadPower'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower', @level2type=N'COLUMN',@level2name=N'ReadPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DateCreated' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'DateCreated', @value=N'2007-6-29 15:07:30' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'LastUpdated' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'LastUpdated', @value=N'2007-6-29 17:12:50' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DefaultView' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DefaultView', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_OrderByOn' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_OrderByOn', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Orientation' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_Orientation', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'TempletPower' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'RecordCount' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'RecordCount', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Updatable' , N'SCHEMA',N'dbo', N'TABLE',N'TempletPower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Updatable', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'TempletPower'
GO
/****** Object:  Table [dbo].[TempletFolders]    Script Date: 06/06/2021 10:17:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[TempletFolders]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[TempletFolders](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[FolderName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[ParentID] [int] NOT NULL,
	[BuildTime] [datetime] NULL,
	[Builder] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[LastMender] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_TempletFolders] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[TempletFolders]') AND name = N'SX_ParentID')
CREATE NONCLUSTERED INDEX [SX_ParentID] ON [dbo].[TempletFolders] 
(
	[ParentID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
/****** Object:  Table [dbo].[Tem_Init]    Script Date: 06/06/2021 10:17:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Tem_Init]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Tem_Init](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[DirID] [int] NOT NULL,
	[SecLevel] [tinyint] NULL,
	[Builder] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[LastModified] [datetime] NULL,
	[LastMender] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [aaaaaTem_Init_PK] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Tem_Init]') AND name = N'DirID')
CREATE NONCLUSTERED INDEX [DirID] ON [dbo].[Tem_Init] 
(
	[DirID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Tem_Init]') AND name = N'ID')
CREATE NONCLUSTERED INDEX [ID] ON [dbo].[Tem_Init] 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'17' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Tem_Init' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'DirID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'DirID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Tem_Init' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'SecLevel' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'SecLevel' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Tem_Init' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Builder' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Builder' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Tem_Init' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastModified'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastModified'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastModified'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastModified'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastModified'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastModified'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastModified'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastModified'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastModified'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastModified'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastModified'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastModified'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastModified'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastModified'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastModified'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'Now()' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastModified'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastModified'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastModified'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastModified'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastModified'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastModified'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'LastModified' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastModified'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastModified'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastModified'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastModified'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastModified'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastModified'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'8' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastModified'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastModified'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'LastModified' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastModified'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastModified'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Tem_Init' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastModified'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastModified'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'8' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastModified'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'LastMender' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'5' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'LastMender' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Tem_Init' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DateCreated' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'DateCreated', @value=N'2006-12-5 8:22:19' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'LastUpdated' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'LastUpdated', @value=N'2007-4-17 13:59:54' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DefaultView' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DefaultView', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_OrderByOn' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_OrderByOn', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Orientation' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_Orientation', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Tem_Init' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'RecordCount' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'RecordCount', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Updatable' , N'SCHEMA',N'dbo', N'TABLE',N'Tem_Init', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Updatable', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tem_Init'
GO
/****** Object:  Table [dbo].[Tasks]    Script Date: 06/06/2021 10:17:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Tasks]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Tasks](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[FlowID] [int] NOT NULL,
	[NodeID] [varchar](18) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[NodeName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[PrevNodeID] [varchar](18) COLLATE Chinese_PRC_CI_AS NULL,
	[State] [tinyint] NOT NULL,
	[Executor] [nvarchar](max) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[ExersCount] [int] NULL,
	[Exers] [varchar](max) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[StartTime] [datetime] NOT NULL,
	[EndTime] [datetime] NOT NULL,
	[FinishTime] [datetime] NULL,
	[Handover] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
 CONSTRAINT [PK_Tasks] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Tasks]') AND name = N'SX_FlowID')
CREATE NONCLUSTERED INDEX [SX_FlowID] ON [dbo].[Tasks] 
(
	[FlowID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Tasks]') AND name = N'SX_State')
CREATE NONCLUSTERED INDEX [SX_State] ON [dbo].[Tasks] 
(
	[State] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
/****** Object:  Table [dbo].[Tags]    Script Date: 06/06/2021 10:17:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Tags]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Tags](
	[Tag] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[InfoID] [int] NOT NULL,
 CONSTRAINT [PK_Tags] PRIMARY KEY CLUSTERED 
(
	[Tag] ASC,
	[InfoID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
/****** Object:  Table [dbo].[Snapshot]    Script Date: 06/06/2021 10:17:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Snapshot]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Snapshot](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[FlowID] [int] NOT NULL,
	[TaskID] [int] NULL,
	[NodeID] [varchar](18) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[NodeName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[FormData] [varbinary](max) NULL,
	[FormHash] [int] NULL,
	[LastProcessor] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Time] [datetime] NULL,
 CONSTRAINT [PK_Snapshot] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Snapshot]') AND name = N'SX_FlowID')
CREATE NONCLUSTERED INDEX [SX_FlowID] ON [dbo].[Snapshot] 
(
	[FlowID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
/****** Object:  Table [dbo].[RolePower]    Script Date: 06/06/2021 10:17:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[RolePower]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[RolePower](
	[Role] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[SysAdmin] [bit] NULL,
	[UserAdmin] [bit] NULL,
	[EnCreatTemplet] [bit] NULL,
	[OrderAdmin] [bit] NULL,
	[Info_AllowPublish] [bit] NULL,
	[Info_AllowRead] [bit] NULL,
	[Info_ReadLevel] [int] NULL,
	[Info_AllowComment] [bit] NULL,
	[Info_AllowAdmin] [bit] NULL,
	[Sms_AllowSend] [bit] NULL,
	[Sms_AllowBatchSend] [bit] NULL,
	[Sms_AllowReceive] [bit] NULL,
	[Msg_AllowSend] [bit] NULL,
	[Msg_AllowBatchSend] [bit] NULL,
	[Mail_AllowSend] [bit] NULL,
	[Mail_AllowBatchSend] [bit] NULL,
	[Wx_AllowSend] [bit] NULL,
	[Wx_AllowBatchSend] [bit] NULL,
 CONSTRAINT [PK_RoleName] PRIMARY KEY CLUSTERED 
(
	[Role] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Role' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Role' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'RolePower' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'SysAdmin'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'SysAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'SysAdmin'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'SysAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'SysAdmin'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'SysAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'SysAdmin'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'SysAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'SysAdmin'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'SysAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'SysAdmin'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'810' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'SysAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'SysAdmin'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'SysAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'SysAdmin'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'SysAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'SysAdmin'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'106' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'SysAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Format' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'SysAdmin'))
EXEC sys.sp_addextendedproperty @name=N'MS_Format', @value=N'Yes/No' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'SysAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'SysAdmin'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'SysAdmin' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'SysAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'SysAdmin'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'SysAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'SysAdmin'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'SysAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'SysAdmin'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'SysAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'SysAdmin'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'SysAdmin' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'SysAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'SysAdmin'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'RolePower' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'SysAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'SysAdmin'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'SysAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'EnCreatTemplet'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'EnCreatTemplet'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'EnCreatTemplet'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'EnCreatTemplet'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'EnCreatTemplet'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'EnCreatTemplet'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'EnCreatTemplet'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'EnCreatTemplet'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'EnCreatTemplet'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'EnCreatTemplet'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'EnCreatTemplet'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'EnCreatTemplet'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'EnCreatTemplet'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'EnCreatTemplet'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'EnCreatTemplet'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'EnCreatTemplet'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'EnCreatTemplet'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'106' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'EnCreatTemplet'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Format' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'EnCreatTemplet'))
EXEC sys.sp_addextendedproperty @name=N'MS_Format', @value=N'Yes/No' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'EnCreatTemplet'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'EnCreatTemplet'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'TempletAdmin' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'EnCreatTemplet'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'EnCreatTemplet'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'EnCreatTemplet'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'EnCreatTemplet'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'EnCreatTemplet'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'EnCreatTemplet'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'EnCreatTemplet'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'EnCreatTemplet'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'TempletAdmin' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'EnCreatTemplet'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'EnCreatTemplet'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'RolePower' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'EnCreatTemplet'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'EnCreatTemplet'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'EnCreatTemplet'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'OrderAdmin'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'OrderAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'OrderAdmin'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'OrderAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'OrderAdmin'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'OrderAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'OrderAdmin'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'OrderAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'OrderAdmin'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'OrderAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'OrderAdmin'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'OrderAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'OrderAdmin'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'OrderAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'OrderAdmin'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'106' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'OrderAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Format' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'OrderAdmin'))
EXEC sys.sp_addextendedproperty @name=N'MS_Format', @value=N'Yes/No' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'OrderAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'OrderAdmin'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'OrderAdmin' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'OrderAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'OrderAdmin'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'OrderAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'OrderAdmin'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'OrderAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'OrderAdmin'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'OrderAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'OrderAdmin'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'OrderAdmin' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'OrderAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'OrderAdmin'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'RolePower' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'OrderAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', N'COLUMN',N'OrderAdmin'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower', @level2type=N'COLUMN',@level2name=N'OrderAdmin'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DateCreated' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'DateCreated', @value=N'2007-1-19 10:54:57' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'LastUpdated' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'LastUpdated', @value=N'2007-8-30 10:28:26' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DefaultView' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DefaultView', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_OrderByOn' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_OrderByOn', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Orientation' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_Orientation', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'RolePower' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'RecordCount' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'RecordCount', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Updatable' , N'SCHEMA',N'dbo', N'TABLE',N'RolePower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Updatable', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RolePower'
GO
INSERT [dbo].[RolePower] ([Role], [SysAdmin], [UserAdmin], [EnCreatTemplet], [OrderAdmin], [Info_AllowPublish], [Info_AllowRead], [Info_ReadLevel], [Info_AllowComment], [Info_AllowAdmin], [Sms_AllowSend], [Sms_AllowBatchSend], [Sms_AllowReceive], [Msg_AllowSend], [Msg_AllowBatchSend], [Mail_AllowSend], [Mail_AllowBatchSend], [Wx_AllowSend], [Wx_AllowBatchSend]) VALUES (N'系统管理员', 1, 0, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
/****** Object:  Table [dbo].[Remind]    Script Date: 06/06/2021 10:17:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Remind]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Remind](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Name] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[TempletID] [int] NULL,
	[Condition] [nvarchar](max) COLLATE Chinese_PRC_CI_AS NULL,
	[CheckMoment] [tinyint] NOT NULL,
	[StartTime] [datetime] NULL,
	[LoopCycle] [varchar](400) COLLATE Chinese_PRC_CI_AS NULL,
	[Receiver] [nvarchar](max) COLLATE Chinese_PRC_CI_AS NULL,
	[Way] [tinyint] NOT NULL,
	[NextTime] [datetime] NULL,
	[RemindTimes] [int] NULL,
	[Enabled] [bit] NOT NULL,
	[LastCheck] [datetime] NULL,
	[Options] [nvarchar](max) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_Remind] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Remind]') AND name = N'SX_NextTime')
CREATE NONCLUSTERED INDEX [SX_NextTime] ON [dbo].[Remind] 
(
	[NextTime] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Remind]') AND name = N'SX_TempletID')
CREATE NONCLUSTERED INDEX [SX_TempletID] ON [dbo].[Remind] 
(
	[TempletID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
/****** Object:  Table [dbo].[ReadLog]    Script Date: 06/06/2021 10:17:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ReadLog]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ReadLog](
	[tid] [int] NOT NULL,
	[rid] [int] NOT NULL,
	[uid] [int] NOT NULL,
	[time] [datetime] NOT NULL,
 CONSTRAINT [PK_ReadLog] PRIMARY KEY CLUSTERED 
(
	[tid] ASC,
	[rid] ASC,
	[uid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
/****** Object:  Table [dbo].[Plans]    Script Date: 06/06/2021 10:17:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Plans]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Plans](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[FlowID] [int] NOT NULL,
	[Builder] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Period] [nvarchar](2000) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[MaxTimes] [int] NOT NULL,
	[Times] [int] NOT NULL,
	[NextTime] [datetime] NOT NULL,
	[LastTime] [datetime] NULL,
	[Enabled] [bit] NOT NULL,
	[CreatTime] [datetime] NOT NULL,
	[Options] [nvarchar](4000) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_Plans] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Plans]') AND name = N'SX_Builder')
CREATE NONCLUSTERED INDEX [SX_Builder] ON [dbo].[Plans] 
(
	[Builder] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Plans]') AND name = N'SX_FlowID')
CREATE NONCLUSTERED INDEX [SX_FlowID] ON [dbo].[Plans] 
(
	[FlowID] DESC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Plans]') AND name = N'SX_NextTime')
CREATE NONCLUSTERED INDEX [SX_NextTime] ON [dbo].[Plans] 
(
	[NextTime] DESC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
/****** Object:  Table [dbo].[Pay_Send_Ways]    Script Date: 06/06/2021 10:17:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Pay_Send_Ways]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Pay_Send_Ways](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Item] [varchar](7) COLLATE Chinese_PRC_CI_AS NULL,
	[ItemName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Comment] [nvarchar](max) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [aaaaaPay_Send_Ways_PK] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Pay_Send_Ways]') AND name = N'ID')
CREATE NONCLUSTERED INDEX [ID] ON [dbo].[Pay_Send_Ways] 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'17' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Pay_Send_Ways' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Item'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Item'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Item'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Item'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Item'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Item'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Item'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Item'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Item'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Item'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Item'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Item'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Item'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Item'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Item'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Item'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Item'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Item'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Item'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Item'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Item'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Item' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Item'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Item'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Item'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Item'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Item'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Item'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'50' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Item'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Item'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Item' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Item'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Item'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Pay_Send_Ways' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Item'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Item'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Item'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Item'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Item'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ItemName'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ItemName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ItemName'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ItemName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ItemName'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ItemName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ItemName'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ItemName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ItemName'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ItemName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ItemName'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ItemName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ItemName'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ItemName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ItemName'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ItemName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ItemName'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ItemName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ItemName'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ItemName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ItemName'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'ItemName' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ItemName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ItemName'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ItemName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ItemName'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ItemName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ItemName'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ItemName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ItemName'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'ItemName' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ItemName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ItemName'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Pay_Send_Ways' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ItemName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ItemName'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ItemName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'ItemName'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'ItemName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Comment'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Comment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Comment'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Comment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Comment'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Comment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Comment'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Comment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Comment'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Comment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Comment'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Comment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Comment'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Comment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Comment'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Comment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Comment'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Comment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Comment'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Comment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Comment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Comment'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Comment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Comment'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Comment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Comment'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Comment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Comment'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Comment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Comment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Comment'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Pay_Send_Ways' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Comment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Comment'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'12' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Comment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', N'COLUMN',N'Comment'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways', @level2type=N'COLUMN',@level2name=N'Comment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DateCreated' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'DateCreated', @value=N'2007-8-13 9:54:09' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'LastUpdated' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'LastUpdated', @value=N'2007-8-17 10:25:23' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DefaultView' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DefaultView', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_OrderByOn' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_OrderByOn', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Orientation' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_Orientation', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Pay_Send_Ways' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'RecordCount' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'RecordCount', @value=N'5' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Updatable' , N'SCHEMA',N'dbo', N'TABLE',N'Pay_Send_Ways', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Updatable', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Pay_Send_Ways'
GO
/****** Object:  Table [dbo].[Orders]    Script Date: 06/06/2021 10:17:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Orders]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Orders](
	[ID] [varchar](18) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[SumPrice] [float] NULL,
	[TotalPrice] [float] NULL,
	[BusinessMent] [varbinary](8000) NULL,
	[PriceUnit] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[SendWay] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[PayWay] [nvarchar](4000) COLLATE Chinese_PRC_CI_AS NULL,
	[NeedInvoice] [bit] NOT NULL,
	[InvoiceTitle] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Address] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Zip] [varchar](18) COLLATE Chinese_PRC_CI_AS NULL,
	[Contact] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Phone] [nvarchar](128) COLLATE Chinese_PRC_CI_AS NULL,
	[Email] [nvarchar](128) COLLATE Chinese_PRC_CI_AS NULL,
	[CustomComment] [nvarchar](2000) COLLATE Chinese_PRC_CI_AS NULL,
	[AdminComment] [nvarchar](2000) COLLATE Chinese_PRC_CI_AS NULL,
	[OrderStatus] [tinyint] NULL,
	[SubmitTime] [datetime] NULL,
	[Submiter] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[OperaLog] [varbinary](8000) NULL,
 CONSTRAINT [PK_OrderID] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Orders]') AND name = N'SX_Submiter')
CREATE NONCLUSTERED INDEX [SX_Submiter] ON [dbo].[Orders] 
(
	[Submiter] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Orders]') AND name = N'SX_SubmitTime')
CREATE NONCLUSTERED INDEX [SX_SubmitTime] ON [dbo].[Orders] 
(
	[SubmitTime] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'20' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Orders' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SumPrice'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SumPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SumPrice'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SumPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SumPrice'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SumPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SumPrice'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SumPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SumPrice'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SumPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SumPrice'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SumPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SumPrice'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SumPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SumPrice'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SumPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SumPrice'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SumPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SumPrice'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SumPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SumPrice'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'SumPrice' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SumPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SumPrice'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SumPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SumPrice'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SumPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SumPrice'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'8' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SumPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SumPrice'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'SumPrice' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SumPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SumPrice'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Orders' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SumPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SumPrice'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'7' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SumPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'TotalPrice'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'TotalPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'TotalPrice'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'TotalPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'TotalPrice'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'TotalPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'TotalPrice'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'TotalPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'TotalPrice'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'TotalPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'TotalPrice'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'TotalPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'TotalPrice'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'TotalPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'TotalPrice'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'TotalPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'TotalPrice'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'TotalPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'TotalPrice'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'TotalPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'TotalPrice'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'TotalPrice' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'TotalPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'TotalPrice'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'TotalPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'TotalPrice'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'TotalPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'TotalPrice'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'8' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'TotalPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'TotalPrice'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'TotalPrice' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'TotalPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'TotalPrice'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Orders' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'TotalPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'TotalPrice'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'7' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'TotalPrice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'BusinessMent'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'BusinessMent'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'BusinessMent'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'BusinessMent'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'BusinessMent'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'BusinessMent'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'BusinessMent'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'BusinessMent'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'BusinessMent'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'BusinessMent'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'BusinessMent'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'BusinessMent'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'BusinessMent'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'BusinessMent'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'BusinessMent'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'BusinessMent' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'BusinessMent'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'BusinessMent'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'BusinessMent'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'BusinessMent'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'BusinessMent'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'BusinessMent'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'BusinessMent'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'BusinessMent'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'BusinessMent' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'BusinessMent'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'BusinessMent'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Orders' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'BusinessMent'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'BusinessMent'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'11' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'BusinessMent'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PriceUnit'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PriceUnit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PriceUnit'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PriceUnit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PriceUnit'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PriceUnit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PriceUnit'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PriceUnit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PriceUnit'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PriceUnit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PriceUnit'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PriceUnit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PriceUnit'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PriceUnit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PriceUnit'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'""' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PriceUnit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PriceUnit'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PriceUnit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PriceUnit'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PriceUnit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PriceUnit'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PriceUnit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PriceUnit'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'PriceUnit' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PriceUnit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PriceUnit'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PriceUnit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PriceUnit'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PriceUnit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PriceUnit'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'50' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PriceUnit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PriceUnit'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'PriceUnit' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PriceUnit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PriceUnit'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Orders' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PriceUnit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PriceUnit'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PriceUnit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PriceUnit'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PriceUnit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SendWay'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SendWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SendWay'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SendWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SendWay'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SendWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SendWay'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SendWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SendWay'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SendWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SendWay'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SendWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SendWay'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SendWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SendWay'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'""' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SendWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SendWay'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SendWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SendWay'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SendWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SendWay'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SendWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SendWay'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'SendWay' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SendWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SendWay'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'5' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SendWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SendWay'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SendWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SendWay'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SendWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SendWay'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'SendWay' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SendWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SendWay'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Orders' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SendWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SendWay'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SendWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SendWay'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SendWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PayWay'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PayWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PayWay'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PayWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PayWay'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PayWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PayWay'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PayWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PayWay'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PayWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PayWay'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PayWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PayWay'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PayWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PayWay'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'""' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PayWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PayWay'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PayWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PayWay'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PayWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PayWay'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'PayWay' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PayWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PayWay'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'6' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PayWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PayWay'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PayWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PayWay'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PayWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PayWay'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'PayWay' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PayWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PayWay'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Orders' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PayWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PayWay'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'12' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PayWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'PayWay'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'PayWay'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'NeedInvoice'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'NeedInvoice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'NeedInvoice'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'NeedInvoice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'NeedInvoice'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'NeedInvoice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'NeedInvoice'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'NeedInvoice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'NeedInvoice'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'NeedInvoice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'NeedInvoice'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'NeedInvoice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'NeedInvoice'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'NeedInvoice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'NeedInvoice'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'106' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'NeedInvoice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Format' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'NeedInvoice'))
EXEC sys.sp_addextendedproperty @name=N'MS_Format', @value=N'Yes/No' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'NeedInvoice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'NeedInvoice'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'NeedInvoice' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'NeedInvoice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'NeedInvoice'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'7' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'NeedInvoice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'NeedInvoice'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'NeedInvoice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'NeedInvoice'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'NeedInvoice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'NeedInvoice'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'NeedInvoice' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'NeedInvoice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'NeedInvoice'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Orders' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'NeedInvoice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'NeedInvoice'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'NeedInvoice'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'InvoiceTitle'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'InvoiceTitle'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'InvoiceTitle'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'InvoiceTitle'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'InvoiceTitle'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'InvoiceTitle'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'InvoiceTitle'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'InvoiceTitle'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'InvoiceTitle'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'InvoiceTitle'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'InvoiceTitle'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'InvoiceTitle'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'InvoiceTitle'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'InvoiceTitle'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'InvoiceTitle'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'""' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'InvoiceTitle'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'InvoiceTitle'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'InvoiceTitle'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'InvoiceTitle'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'InvoiceTitle'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'InvoiceTitle'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'InvoiceTitle'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'InvoiceTitle'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'InvoiceTitle' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'InvoiceTitle'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'InvoiceTitle'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'8' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'InvoiceTitle'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'InvoiceTitle'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'InvoiceTitle'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'InvoiceTitle'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'InvoiceTitle'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'InvoiceTitle'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'InvoiceTitle' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'InvoiceTitle'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'InvoiceTitle'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Orders' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'InvoiceTitle'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'InvoiceTitle'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'InvoiceTitle'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'InvoiceTitle'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'InvoiceTitle'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'""' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Address' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'9' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Address' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Orders' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'12' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Address'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'""' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Zip' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'20' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Zip' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Orders' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Zip'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Contact'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Contact'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Contact'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Contact'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Contact'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Contact'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Contact'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Contact'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Contact'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Contact'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Contact'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Contact'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Contact'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Contact'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Contact'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'""' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Contact'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Contact'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Contact'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Contact'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Contact'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Contact'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Contact'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Contact'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Contact' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Contact'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Contact'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'11' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Contact'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Contact'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Contact'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Contact'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Contact'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Contact'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Contact' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Contact'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Contact'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Orders' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Contact'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Contact'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Contact'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Contact'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Contact'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'""' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Phone' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'12' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Phone' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Orders' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Phone'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Email'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Email'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Email'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Email'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Email'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Email'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Email'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Email'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Email'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Email'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Email'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Email'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Email'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Email'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Email'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'""' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Email'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Email'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Email'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Email'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Email'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Email'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Email'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Email'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Email' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Email'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Email'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'13' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Email'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Email'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Email'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Email'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Email'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Email'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Email' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Email'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Email'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Orders' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Email'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Email'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Email'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Email'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Email'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'CustomComment'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'CustomComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'CustomComment'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'CustomComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'CustomComment'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'CustomComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'CustomComment'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'CustomComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'CustomComment'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'CustomComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'CustomComment'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'CustomComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'CustomComment'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'CustomComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'CustomComment'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'""' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'CustomComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'CustomComment'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'CustomComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'CustomComment'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'CustomComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'CustomComment'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'CustomComment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'CustomComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'CustomComment'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'14' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'CustomComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'CustomComment'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'CustomComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'CustomComment'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'CustomComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'CustomComment'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'CustomComment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'CustomComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'CustomComment'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Orders' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'CustomComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'CustomComment'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'12' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'CustomComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'CustomComment'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'CustomComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'AdminComment'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'AdminComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'AdminComment'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'AdminComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'AdminComment'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'AdminComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'AdminComment'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'AdminComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'AdminComment'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'AdminComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'AdminComment'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'AdminComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'AdminComment'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'AdminComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'AdminComment'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'""' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'AdminComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'AdminComment'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'AdminComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'AdminComment'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'AdminComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'AdminComment'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'AdminComment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'AdminComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'AdminComment'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'15' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'AdminComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'AdminComment'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'AdminComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'AdminComment'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'AdminComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'AdminComment'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'AdminComment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'AdminComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'AdminComment'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Orders' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'AdminComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'AdminComment'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'12' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'AdminComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'AdminComment'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'AdminComment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OrderStatus'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OrderStatus'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OrderStatus'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OrderStatus'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OrderStatus'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OrderStatus'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OrderStatus'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OrderStatus'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OrderStatus'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OrderStatus'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OrderStatus'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OrderStatus'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OrderStatus'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OrderStatus'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OrderStatus'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OrderStatus'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OrderStatus'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OrderStatus'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OrderStatus'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OrderStatus'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OrderStatus'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'OrderStatus' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OrderStatus'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OrderStatus'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'16' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OrderStatus'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OrderStatus'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OrderStatus'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OrderStatus'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OrderStatus'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OrderStatus'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'OrderStatus' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OrderStatus'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OrderStatus'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Orders' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OrderStatus'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OrderStatus'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OrderStatus'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SubmitTime'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SubmitTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SubmitTime'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SubmitTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SubmitTime'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SubmitTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SubmitTime'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SubmitTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SubmitTime'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SubmitTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SubmitTime'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SubmitTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SubmitTime'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SubmitTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SubmitTime'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'Now()' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SubmitTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SubmitTime'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SubmitTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SubmitTime'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SubmitTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SubmitTime'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'SubmitTime' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SubmitTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SubmitTime'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'17' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SubmitTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SubmitTime'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SubmitTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SubmitTime'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'8' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SubmitTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SubmitTime'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'SubmitTime' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SubmitTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SubmitTime'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Orders' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SubmitTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'SubmitTime'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'8' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'SubmitTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Submiter'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Submiter'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Submiter'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Submiter'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Submiter'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Submiter'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Submiter'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Submiter'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Submiter'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Submiter'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Submiter'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Submiter'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Submiter'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Submiter'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Submiter'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'""' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Submiter'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Submiter'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Submiter'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Submiter'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Submiter'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Submiter'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Submiter'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Submiter'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Submiter' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Submiter'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Submiter'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'18' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Submiter'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Submiter'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Submiter'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Submiter'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Submiter'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Submiter'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Submiter' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Submiter'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Submiter'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Orders' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Submiter'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Submiter'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Submiter'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'Submiter'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'Submiter'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OperaLog'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OperaLog'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OperaLog'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OperaLog'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OperaLog'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OperaLog'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OperaLog'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OperaLog'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OperaLog'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OperaLog'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OperaLog'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OperaLog'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OperaLog'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OperaLog'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OperaLog'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'OperaLog' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OperaLog'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OperaLog'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'19' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OperaLog'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OperaLog'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OperaLog'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OperaLog'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OperaLog'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OperaLog'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'OperaLog' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OperaLog'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OperaLog'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Orders' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OperaLog'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', N'COLUMN',N'OperaLog'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'11' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders', @level2type=N'COLUMN',@level2name=N'OperaLog'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DateCreated' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'DateCreated', @value=N'2007-8-13 16:52:15' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'LastUpdated' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'LastUpdated', @value=N'2007-9-10 9:19:19' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DefaultView' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DefaultView', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_OrderByOn' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_OrderByOn', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Orientation' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_Orientation', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Orders' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'RecordCount' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'RecordCount', @value=N'26' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Updatable' , N'SCHEMA',N'dbo', N'TABLE',N'Orders', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Updatable', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Orders'
GO
/****** Object:  Table [dbo].[OrderDetail]    Script Date: 06/06/2021 10:17:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[OrderDetail]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[OrderDetail](
	[OrderID] [varchar](18) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Tid] [int] NOT NULL,
	[Rid] [int] NOT NULL,
	[GoodsName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Amount] [int] NULL,
	[Price] [float] NULL,
	[Remark] [nvarchar](1024) COLLATE Chinese_PRC_CI_AS NULL
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[OrderDetail]') AND name = N'OrderID')
CREATE NONCLUSTERED INDEX [OrderID] ON [dbo].[OrderDetail] 
(
	[OrderID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'OrderID'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'OrderID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'OrderID'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'OrderID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'OrderID'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'OrderID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'OrderID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'OrderID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'OrderID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'OrderID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'OrderID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'OrderID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'OrderID'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'OrderID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'OrderID'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'OrderID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'OrderID'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'OrderID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'OrderID'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'OrderID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'OrderID'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'OrderID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'OrderID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'OrderID'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'OrderID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'OrderID'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'OrderID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'OrderID'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'20' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'OrderID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'OrderID'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'OrderID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'OrderID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'OrderID'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'OrderDetail' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'OrderID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'OrderID'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'OrderID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'OrderID'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'OrderID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Tid'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Tid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Tid'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Tid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Tid'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Tid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Tid'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Tid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Tid'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Tid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Tid'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Tid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Tid'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Tid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Tid'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Tid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Tid'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Tid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Tid'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Tid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Tid'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Tid' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Tid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Tid'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Tid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Tid'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Tid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Tid'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Tid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Tid'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Tid' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Tid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Tid'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'OrderDetail' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Tid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Tid'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Tid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Rid'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Rid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Rid'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Rid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Rid'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Rid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Rid'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Rid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Rid'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Rid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Rid'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Rid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Rid'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Rid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Rid'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Rid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Rid'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Rid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Rid'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Rid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Rid'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Rid' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Rid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Rid'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Rid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Rid'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Rid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Rid'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Rid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Rid'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Rid' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Rid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Rid'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'OrderDetail' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Rid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Rid'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Rid'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'GoodsName'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'GoodsName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'GoodsName'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'GoodsName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'GoodsName'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'GoodsName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'GoodsName'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'GoodsName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'GoodsName'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'GoodsName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'GoodsName'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'GoodsName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'GoodsName'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'GoodsName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'GoodsName'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'GoodsName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'GoodsName'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'GoodsName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'GoodsName'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'GoodsName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'GoodsName'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'GoodsName' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'GoodsName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'GoodsName'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'GoodsName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'GoodsName'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'GoodsName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'GoodsName'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'GoodsName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'GoodsName'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'GoodsName' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'GoodsName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'GoodsName'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'OrderDetail' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'GoodsName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'GoodsName'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'GoodsName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'GoodsName'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'GoodsName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Amount'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Amount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Amount'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Amount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Amount'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Amount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Amount'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Amount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Amount'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Amount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Amount'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Amount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Amount'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Amount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Amount'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Amount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Amount'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Amount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Amount'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Amount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Amount'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Amount' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Amount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Amount'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Amount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Amount'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Amount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Amount'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Amount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Amount'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Amount' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Amount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Amount'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'OrderDetail' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Amount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Amount'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Amount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Price'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Price'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Price'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Price'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Price'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Price'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Price'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Price'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Price'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Price'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Price'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Price'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Price'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Price'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Price'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Price'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Price'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Price'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Price'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Price'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Price'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Price' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Price'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Price'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'5' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Price'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Price'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Price'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Price'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'8' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Price'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Price'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Price' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Price'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Price'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'OrderDetail' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Price'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', N'COLUMN',N'Price'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'7' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail', @level2type=N'COLUMN',@level2name=N'Price'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DateCreated' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'DateCreated', @value=N'2007-8-13 17:49:54' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'LastUpdated' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'LastUpdated', @value=N'2007-9-5 8:13:47' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DefaultView' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DefaultView', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_OrderByOn' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_OrderByOn', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Orientation' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_Orientation', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'OrderDetail' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'RecordCount' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'RecordCount', @value=N'79' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Updatable' , N'SCHEMA',N'dbo', N'TABLE',N'OrderDetail', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Updatable', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'OrderDetail'
GO
/****** Object:  Table [dbo].[Notify]    Script Date: 06/06/2021 10:17:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Notify]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Notify](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Name] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[TaskID] [int] NULL,
	[Exer] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
	[NotExer] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
	[Way] [tinyint] NOT NULL,
	[NotifyTime] [datetime] NOT NULL,
	[CreateTime] [datetime] NOT NULL,
 CONSTRAINT [PK_Notify] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Notify]') AND name = N'SX_NotifyTime')
CREATE NONCLUSTERED INDEX [SX_NotifyTime] ON [dbo].[Notify] 
(
	[NotifyTime] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
/****** Object:  Table [dbo].[Message]    Script Date: 06/06/2021 10:17:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Message]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Message](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Sender] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Sendee] [varchar](max) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Reader] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
	[Subject] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Content] [nvarchar](max) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Files] [nvarchar](max) COLLATE Chinese_PRC_CI_AS NULL,
	[SendTime] [datetime] NULL,
	[Read] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
	[DeletedBySender] [bit] NOT NULL,
 CONSTRAINT [PK_Message] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Message]') AND name = N'SX_SendTime')
CREATE NONCLUSTERED INDEX [SX_SendTime] ON [dbo].[Message] 
(
	[SendTime] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
/****** Object:  Table [dbo].[InfoComment]    Script Date: 06/06/2021 10:17:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[InfoComment]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[InfoComment](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[InfoID] [int] NOT NULL,
	[UserName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Content] [nvarchar](max) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Time] [datetime] NOT NULL,
	[EditTime] [datetime] NULL,
	[Audited] [bit] NOT NULL,
 CONSTRAINT [PK_InfoComment] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[InfoComment]') AND name = N'SX_InfoID')
CREATE NONCLUSTERED INDEX [SX_InfoID] ON [dbo].[InfoComment] 
(
	[InfoID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
/****** Object:  Table [dbo].[Info]    Script Date: 06/06/2021 10:17:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Info]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Info](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Title] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Category] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Content] [nvarchar](max) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Attach] [nvarchar](max) COLLATE Chinese_PRC_CI_AS NULL,
	[Time] [datetime] NOT NULL,
	[EditTime] [datetime] NULL,
	[Author] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Tags] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Summary] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL,
	[SecLevel] [int] NOT NULL,
	[AllowComment] [bit] NULL,
	[AtTop] [bit] NULL,
	[ClickTimes] [int] NULL,
	[Readers] [nvarchar](4000) COLLATE Chinese_PRC_CI_AS NULL,
	[Audited] [bit] NOT NULL,
	[Ext] [nvarchar](max) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_Info] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Info]') AND name = N'SX_Time')
CREATE NONCLUSTERED INDEX [SX_Time] ON [dbo].[Info] 
(
	[Time] DESC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
/****** Object:  Table [dbo].[History]    Script Date: 06/06/2021 10:17:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[History]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[History](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[FlowID] [int] NOT NULL,
	[TaskID] [int] NOT NULL,
	[State] [tinyint] NULL,
	[Percent] [int] NULL,
	[Exer] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Uid] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Time] [datetime] NOT NULL,
	[Ment] [nvarchar](4000) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_History] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[History]') AND name = N'SX_TaskID')
CREATE NONCLUSTERED INDEX [SX_TaskID] ON [dbo].[History] 
(
	[TaskID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
/****** Object:  Table [dbo].[Files]    Script Date: 06/06/2021 10:17:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Files]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Files](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Name] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[FileName] [varchar](30) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[FileType] [varchar](15) COLLATE Chinese_PRC_CI_AS NULL,
	[Size] [int] NOT NULL,
	[Creator] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[CreateTime] [datetime] NOT NULL,
	[Dir] [int] NOT NULL,
 CONSTRAINT [PK_Files] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Files]') AND name = N'SX_Dir')
CREATE NONCLUSTERED INDEX [SX_Dir] ON [dbo].[Files] 
(
	[Dir] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
/****** Object:  Table [dbo].[Fields]    Script Date: 06/06/2021 10:17:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Fields]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Fields](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Name] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[FieldName] [varchar](18) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[DataType] [tinyint] NOT NULL,
	[ContentLen] [int] NULL,
	[EnEditor] [bit] NOT NULL,
	[AllowNull] [bit] NOT NULL,
	[AllowRepeat] [bit] NOT NULL,
	[DefaultVal] [nvarchar](1000) COLLATE Chinese_PRC_CI_AS NULL,
	[Options] [nvarchar](2048) COLLATE Chinese_PRC_CI_AS NULL,
	[SecLevel] [tinyint] NULL,
	[TempletID] [int] NULL,
	[Unit] [nvarchar](64) COLLATE Chinese_PRC_CI_AS NULL,
	[Formula] [nvarchar](2048) COLLATE Chinese_PRC_CI_AS NULL,
	[Query] [varbinary](8000) NULL,
	[InnerLink] [varbinary](8000) NULL,
	[AutoComplete] [varbinary](8000) NULL,
	[ColIndex_Display] [int] NULL,
	[RowIndex_Display] [int] NULL,
	[ColIndex_MultiRowEdit] [int] NULL,
	[ColWidth_MultiRowEdit] [int] NULL,
	[RowIndex_Design] [int] NULL,
	[RowIndex_SingleColEdit] [int] NULL,
	[AllowInput] [bit] NULL,
	[Visible] [bit] NULL,
	[Regex] [nvarchar](1024) COLLATE Chinese_PRC_CI_AS NULL,
	[Note] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [aaaaaFields_PK] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Fields]') AND name = N'SX_TempletID')
CREATE NONCLUSTERED INDEX [SX_TempletID] ON [dbo].[Fields] 
(
	[TempletID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'17' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'720' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Fields' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Fields' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'12' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Name'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'FieldName'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'FieldName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'FieldName'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'FieldName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'FieldName'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'FieldName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'FieldName'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'FieldName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'FieldName'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'FieldName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'FieldName'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'1500' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'FieldName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'FieldName'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'FieldName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'FieldName'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'FieldName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'FieldName'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'FieldName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'FieldName'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'FieldName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'FieldName'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'FieldName' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'FieldName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'FieldName'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'FieldName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'FieldName'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'FieldName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'FieldName'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'18' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'FieldName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'FieldName'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'FieldName' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'FieldName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'FieldName'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Fields' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'FieldName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'FieldName'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'FieldName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'FieldName'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'FieldName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DataType'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DataType'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DataType'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DataType'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DataType'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DataType'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DataType'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DataType'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DataType'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DataType'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DataType'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'945' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DataType'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DataType'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DataType'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DataType'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DataType'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DataType'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DataType'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DataType'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DataType'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DataType'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'DataType' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DataType'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DataType'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DataType'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DataType'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DataType'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DataType'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DataType'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DataType'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'DataType' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DataType'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DataType'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Fields' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DataType'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DataType'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DataType'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ContentLen'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ContentLen'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ContentLen'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ContentLen'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ContentLen'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ContentLen'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ContentLen'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ContentLen'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ContentLen'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ContentLen'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ContentLen'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'1050' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ContentLen'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ContentLen'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ContentLen'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ContentLen'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ContentLen'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ContentLen'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ContentLen'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ContentLen'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ContentLen'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ContentLen'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'ContentLen' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ContentLen'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ContentLen'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ContentLen'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ContentLen'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ContentLen'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ContentLen'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ContentLen'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ContentLen'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'ContentLen' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ContentLen'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ContentLen'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Fields' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ContentLen'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ContentLen'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ContentLen'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'EnEditor'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'EnEditor'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'EnEditor'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'EnEditor'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'EnEditor'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'EnEditor'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'EnEditor'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'EnEditor'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'EnEditor'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'EnEditor'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'EnEditor'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'EnEditor'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'EnEditor'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'EnEditor'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'EnEditor'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'EnEditor'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'EnEditor'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'106' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'EnEditor'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Format' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'EnEditor'))
EXEC sys.sp_addextendedproperty @name=N'MS_Format', @value=N'Yes/No' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'EnEditor'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'EnEditor'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'EnEditor' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'EnEditor'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'EnEditor'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'5' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'EnEditor'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'EnEditor'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'EnEditor'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'EnEditor'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'EnEditor'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'EnEditor'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'EnEditor' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'EnEditor'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'EnEditor'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Fields' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'EnEditor'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'EnEditor'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'EnEditor'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowNull'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowNull'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowNull'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowNull'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowNull'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowNull'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowNull'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowNull'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowNull'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowNull'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowNull'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'990' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowNull'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowNull'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowNull'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowNull'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowNull'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowNull'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'106' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowNull'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Format' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowNull'))
EXEC sys.sp_addextendedproperty @name=N'MS_Format', @value=N'Yes/No' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowNull'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowNull'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'AllowNull' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowNull'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowNull'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'6' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowNull'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowNull'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowNull'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowNull'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowNull'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowNull'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'AllowNull' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowNull'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowNull'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Fields' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowNull'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowNull'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowNull'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowRepeat'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowRepeat'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowRepeat'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowRepeat'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowRepeat'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowRepeat'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowRepeat'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowRepeat'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowRepeat'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowRepeat'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowRepeat'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowRepeat'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowRepeat'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowRepeat'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowRepeat'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowRepeat'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowRepeat'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'106' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowRepeat'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Format' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowRepeat'))
EXEC sys.sp_addextendedproperty @name=N'MS_Format', @value=N'Yes/No' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowRepeat'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowRepeat'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'AllowRepeat' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowRepeat'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowRepeat'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'7' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowRepeat'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowRepeat'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowRepeat'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowRepeat'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowRepeat'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowRepeat'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'AllowRepeat' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowRepeat'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowRepeat'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Fields' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowRepeat'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AllowRepeat'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AllowRepeat'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DefaultVal'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DefaultVal'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DefaultVal'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DefaultVal'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DefaultVal'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DefaultVal'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DefaultVal'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DefaultVal'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DefaultVal'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DefaultVal'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DefaultVal'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'1125' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DefaultVal'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DefaultVal'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DefaultVal'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DefaultVal'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'""' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DefaultVal'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DefaultVal'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DefaultVal'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DefaultVal'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DefaultVal'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DefaultVal'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'DefaultVal' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DefaultVal'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DefaultVal'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'8' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DefaultVal'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DefaultVal'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DefaultVal'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DefaultVal'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DefaultVal'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DefaultVal'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'DefaultVal' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DefaultVal'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DefaultVal'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Fields' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DefaultVal'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DefaultVal'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'12' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DefaultVal'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'DefaultVal'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'DefaultVal'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Options'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Options'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Options'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Options'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Options'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Options'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Options'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Options'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Options'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Options'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Options'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Options'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Options'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Options'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Options'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'""' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Options'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Options'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Options'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Options'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Options'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Options'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Options' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Options'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Options'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'9' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Options'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Options'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Options'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Options'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Options'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Options'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Options' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Options'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Options'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Fields' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Options'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Options'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'12' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Options'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Options'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Options'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'930' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'SecLevel' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'SecLevel' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Fields' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'SecLevel'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'SecLevel'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'1110' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'TempletID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'12' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'TempletID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Fields' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Unit'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Unit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Unit'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Unit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Unit'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Unit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Unit'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Unit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Unit'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Unit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Unit'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'885' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Unit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Unit'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Unit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Unit'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'""' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Unit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Unit'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Unit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Unit'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Unit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Unit'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Unit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Unit'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Unit' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Unit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Unit'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'13' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Unit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Unit'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Unit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Unit'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Unit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Unit'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Unit' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Unit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Unit'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Fields' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Unit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Unit'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Unit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Unit'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Unit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Formula'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Formula'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Formula'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Formula'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Formula'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Formula'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Formula'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Formula'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Formula'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Formula'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Formula'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'1245' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Formula'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Formula'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Formula'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Formula'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'""' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Formula'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Formula'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Formula'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Formula'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Formula'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Formula'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Formula'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Formula'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Formula' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Formula'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Formula'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'14' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Formula'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Formula'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Formula'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Formula'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Formula'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Formula'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Formula' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Formula'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Formula'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Fields' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Formula'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Formula'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Formula'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Formula'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Formula'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Query'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Query'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Query'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Query'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Query'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Query'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Query'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Query'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Query'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Query'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Query'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'1290' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Query'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Query'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Query'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Query'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Query' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Query'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Query'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'15' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Query'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Query'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Query'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Query'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Query'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Query'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Query' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Query'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Query'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Fields' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Query'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'Query'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'11' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'Query'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'InnerLink'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'InnerLink'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'InnerLink'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'InnerLink'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'InnerLink'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'InnerLink'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'InnerLink'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'InnerLink'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'InnerLink'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'InnerLink'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'InnerLink'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'1245' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'InnerLink'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'InnerLink'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'InnerLink'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'InnerLink'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'InnerLink' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'InnerLink'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'InnerLink'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'16' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'InnerLink'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'InnerLink'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'InnerLink'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'InnerLink'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'InnerLink'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'InnerLink'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'InnerLink' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'InnerLink'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'InnerLink'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Fields' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'InnerLink'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'InnerLink'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'11' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'InnerLink'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AutoComplete'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AutoComplete'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AutoComplete'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AutoComplete'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AutoComplete'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AutoComplete'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AutoComplete'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AutoComplete'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AutoComplete'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AutoComplete'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AutoComplete'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'1275' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AutoComplete'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AutoComplete'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AutoComplete'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AutoComplete'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'AutoComplete' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AutoComplete'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AutoComplete'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'17' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AutoComplete'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AutoComplete'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AutoComplete'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AutoComplete'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AutoComplete'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AutoComplete'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'AutoComplete' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AutoComplete'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AutoComplete'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Fields' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AutoComplete'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'AutoComplete'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'11' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'AutoComplete'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'ColIndex_Display' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'19' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'ColIndex_Display' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Fields' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'RowIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'RowIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'RowIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'RowIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'RowIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'RowIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'RowIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'RowIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'RowIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'RowIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'RowIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'RowIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'RowIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'RowIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'RowIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'RowIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'RowIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'RowIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'RowIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'RowIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'RowIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'RowIndex_Display' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'RowIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'RowIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'21' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'RowIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'RowIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'RowIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'RowIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'RowIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'RowIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'RowIndex_Display' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'RowIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'RowIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Fields' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'RowIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'RowIndex_Display'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'RowIndex_Display'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'ColIndex_Edit_Data' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'22' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'ColIndex_Edit_Data' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Fields' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColIndex_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColIndex_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColWidth_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColWidth_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColWidth_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColWidth_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColWidth_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColWidth_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColWidth_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColWidth_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColWidth_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColWidth_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColWidth_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColWidth_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColWidth_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColWidth_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColWidth_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColWidth_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColWidth_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColWidth_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColWidth_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColWidth_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColWidth_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'ColWidth_Edit_Data' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColWidth_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColWidth_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'24' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColWidth_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColWidth_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColWidth_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColWidth_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColWidth_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColWidth_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'ColWidth_Edit_Data' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColWidth_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColWidth_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Fields' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColWidth_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', N'COLUMN',N'ColWidth_MultiRowEdit'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields', @level2type=N'COLUMN',@level2name=N'ColWidth_MultiRowEdit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DateCreated' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'DateCreated', @value=N'2006-12-5 8:21:59' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'LastUpdated' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'LastUpdated', @value=N'2007-10-5 11:17:19' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DefaultView' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DefaultView', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_OrderByOn' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_OrderByOn', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Orientation' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_Orientation', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Fields' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'RecordCount' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'RecordCount', @value=N'34' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Updatable' , N'SCHEMA',N'dbo', N'TABLE',N'Fields', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Updatable', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Fields'
GO
/****** Object:  Table [dbo].[Dirs]    Script Date: 06/06/2021 10:17:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Dirs]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Dirs](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[DirName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[ParentID] [int] NULL,
	[BuildTime] [datetime] NULL,
	[Builder] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[LastMender] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_DirID] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'17' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'645' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Dirs' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ID'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'DirName'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'DirName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'DirName'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'DirName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'DirName'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'DirName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'DirName'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'DirName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'DirName'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'DirName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'DirName'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'1110' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'DirName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'DirName'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'DirName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'DirName'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'DirName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'DirName'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'DirName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'DirName'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'DirName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'DirName'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'DirName' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'DirName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'DirName'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'DirName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'DirName'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'DirName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'DirName'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'64' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'DirName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'DirName'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'DirName' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'DirName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'DirName'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Dirs' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'DirName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'DirName'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'DirName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'DirName'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'DirName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ParentID'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ParentID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ParentID'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ParentID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ParentID'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ParentID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ParentID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ParentID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ParentID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ParentID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ParentID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'1170' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ParentID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ParentID'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ParentID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ParentID'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ParentID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ParentID'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ParentID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ParentID'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ParentID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ParentID'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'ParentID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ParentID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ParentID'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ParentID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ParentID'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ParentID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ParentID'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ParentID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ParentID'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'ParentID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ParentID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ParentID'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Dirs' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ParentID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'ParentID'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'ParentID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'BuildTime'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'BuildTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'BuildTime'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'BuildTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'BuildTime'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'BuildTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'BuildTime'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'BuildTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'BuildTime'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'BuildTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'BuildTime'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'BuildTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'BuildTime'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'BuildTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'BuildTime'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'Now()' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'BuildTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'BuildTime'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'BuildTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'BuildTime'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'BuildTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'BuildTime'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'BuildTime' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'BuildTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'BuildTime'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'BuildTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'BuildTime'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'BuildTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'BuildTime'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'8' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'BuildTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'BuildTime'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'BuildTime' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'BuildTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'BuildTime'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Dirs' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'BuildTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'BuildTime'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'8' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'BuildTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'""' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Builder' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Builder' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Dirs' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'Builder'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'Builder'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'""' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'LastMender' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'5' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'LastMender' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'Dirs' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', N'COLUMN',N'LastMender'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs', @level2type=N'COLUMN',@level2name=N'LastMender'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DateCreated' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'DateCreated', @value=N'2006-12-5 9:11:50' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'LastUpdated' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'LastUpdated', @value=N'2007-3-19 14:03:19' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DefaultView' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DefaultView', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_OrderByOn' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_OrderByOn', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Orientation' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_Orientation', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Dirs' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'RecordCount' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'RecordCount', @value=N'5' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Updatable' , N'SCHEMA',N'dbo', N'TABLE',N'Dirs', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Updatable', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dirs'
GO
/****** Object:  Table [dbo].[DirPower]    Script Date: 06/06/2021 10:17:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[DirPower]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[DirPower](
	[DirID] [int] NOT NULL,
	[Role] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Power] [tinyint] NULL,
 CONSTRAINT [aaaaaDirPower_PK] PRIMARY KEY NONCLUSTERED 
(
	[DirID] ASC,
	[Role] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'DirID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'DirID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'DirPower' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Role' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Role' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'DirPower' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Role'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Role'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Power' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Power' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'DirPower' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower', @level2type=N'COLUMN',@level2name=N'Power'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DateCreated' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'DateCreated', @value=N'2007-3-20 8:31:20' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'LastUpdated' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'LastUpdated', @value=N'2007-3-30 16:08:37' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DefaultView' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DefaultView', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_OrderByOn' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_OrderByOn', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Orientation' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_Orientation', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'DirPower' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'RecordCount' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'RecordCount', @value=N'9' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Updatable' , N'SCHEMA',N'dbo', N'TABLE',N'DirPower', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Updatable', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirPower'
GO
INSERT [dbo].[DirPower] ([DirID], [Role], [Power]) VALUES (0, N'匿名用户', 1)
INSERT [dbo].[DirPower] ([DirID], [Role], [Power]) VALUES (0, N'注册用户', 1)
/****** Object:  Table [dbo].[DirIndex]    Script Date: 06/06/2021 10:17:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[DirIndex]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[DirIndex](
	[TempletID] [int] NOT NULL,
	[DirID] [int] NOT NULL,
 CONSTRAINT [aaaaaDirIndex_PK] PRIMARY KEY NONCLUSTERED 
(
	[TempletID] ASC,
	[DirID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'TempletID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'TempletID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'DirIndex' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'TempletID'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'TempletID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'DirID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'DirID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'DirIndex' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', N'COLUMN',N'DirID'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex', @level2type=N'COLUMN',@level2name=N'DirID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DateCreated' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'DateCreated', @value=N'2007-4-28 11:13:33' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'LastUpdated' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'LastUpdated', @value=N'2007-7-16 9:04:16' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DefaultView' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DefaultView', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_OrderByOn' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_OrderByOn', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Orientation' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_Orientation', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'DirIndex' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'RecordCount' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'RecordCount', @value=N'5' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Updatable' , N'SCHEMA',N'dbo', N'TABLE',N'DirIndex', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Updatable', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DirIndex'
GO
/****** Object:  Table [dbo].[Comment]    Script Date: 06/06/2021 10:17:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Comment]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Comment](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Tid] [int] NOT NULL,
	[Rid] [int] NOT NULL,
	[UserName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Content] [nvarchar](max) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Time] [datetime] NOT NULL,
	[EditTime] [datetime] NULL,
 CONSTRAINT [PK_Comment] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[Comment]') AND name = N'SX_Tid_Rid')
CREATE NONCLUSTERED INDEX [SX_Tid_Rid] ON [dbo].[Comment] 
(
	[Tid] ASC,
	[Rid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
/****** Object:  Table [dbo].[BusinessRules]    Script Date: 06/06/2021 10:17:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[BusinessRules]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[BusinessRules](
	[RuleName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Basis] [nvarchar](4) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[CondOperator] [tinyint] NULL,
	[Value1] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Value2] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[OperaChar] [nvarchar](1) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[OperaNum] [float] NULL,
 CONSTRAINT [PK_BusinessRules] PRIMARY KEY CLUSTERED 
(
	[RuleName] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[BusinessRules]') AND name = N'OperaNum')
CREATE NONCLUSTERED INDEX [OperaNum] ON [dbo].[BusinessRules] 
(
	[OperaNum] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'RuleName'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'RuleName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'RuleName'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'RuleName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'RuleName'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'RuleName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'RuleName'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'RuleName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'RuleName'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'RuleName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'RuleName'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'RuleName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'RuleName'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'RuleName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'RuleName'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'RuleName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'RuleName'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'RuleName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'RuleName'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'RuleName' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'RuleName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'RuleName'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'RuleName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'RuleName'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'RuleName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'RuleName'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'RuleName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'RuleName'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'RuleName' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'RuleName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'RuleName'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'BusinessRules' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'RuleName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'RuleName'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'12' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'RuleName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'RuleName'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'RuleName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Basis'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Basis'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Basis'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Basis'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Basis'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Basis'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Basis'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Basis'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Basis'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Basis'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Basis'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Basis'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Basis'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Basis'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Basis'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Basis'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Basis'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Basis'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Basis'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Basis'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Basis'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Basis' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Basis'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Basis'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Basis'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Basis'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Basis'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Basis'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Basis'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Basis'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Basis' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Basis'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Basis'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'BusinessRules' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Basis'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Basis'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Basis'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Basis'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Basis'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'CondOperator'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'CondOperator'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'CondOperator'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'CondOperator'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'CondOperator'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'CondOperator'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'CondOperator'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'CondOperator'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'CondOperator'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'CondOperator'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'CondOperator'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'CondOperator'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'CondOperator'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'CondOperator'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'CondOperator'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'CondOperator'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'CondOperator'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'CondOperator'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'CondOperator'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'CondOperator'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'CondOperator'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'CondOperator' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'CondOperator'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'CondOperator'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'CondOperator'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'CondOperator'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'CondOperator'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'CondOperator'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'CondOperator'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'CondOperator'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'CondOperator' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'CondOperator'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'CondOperator'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'BusinessRules' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'CondOperator'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'CondOperator'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'CondOperator'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value1'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value1'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value1'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value1'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value1'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value1'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value1'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value1'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value1'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value1'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value1'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value1'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value1'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value1'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value1'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value1'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value1'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value1'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value1'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value1'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value1'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Value1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value1'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value1'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value1'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value1'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value1'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value1'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value1'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value1'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Value1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value1'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value1'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'BusinessRules' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value1'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value1'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value1'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value1'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value1'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value2'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value2'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value2'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value2'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value2'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value2'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value2'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value2'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value2'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value2'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value2'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value2'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value2'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value2'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value2'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value2'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value2'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value2'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value2'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value2'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value2'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'Value2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value2'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value2'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'4' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value2'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value2'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value2'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value2'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value2'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value2'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'Value2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value2'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value2'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'BusinessRules' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value2'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value2'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value2'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'Value2'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'Value2'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaChar'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaChar'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaChar'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaChar'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaChar'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaChar'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaChar'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaChar'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaChar'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaChar'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaChar'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaChar'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaChar'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaChar'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaChar'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaChar'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMEMode' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaChar'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMEMode', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaChar'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_IMESentMode' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaChar'))
EXEC sys.sp_addextendedproperty @name=N'MS_IMESentMode', @value=N'3' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaChar'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaChar'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'OperaChar' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaChar'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaChar'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'5' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaChar'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaChar'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaChar'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaChar'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaChar'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaChar'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'OperaChar' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaChar'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaChar'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'BusinessRules' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaChar'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaChar'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaChar'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'UnicodeCompression' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaChar'))
EXEC sys.sp_addextendedproperty @name=N'UnicodeCompression', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaChar'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'AllowZeroLength' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaNum'))
EXEC sys.sp_addextendedproperty @name=N'AllowZeroLength', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaNum'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaNum'))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaNum'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'CollatingOrder' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaNum'))
EXEC sys.sp_addextendedproperty @name=N'CollatingOrder', @value=N'2052' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaNum'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnHidden' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaNum'))
EXEC sys.sp_addextendedproperty @name=N'ColumnHidden', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaNum'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnOrder' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaNum'))
EXEC sys.sp_addextendedproperty @name=N'ColumnOrder', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaNum'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'ColumnWidth' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaNum'))
EXEC sys.sp_addextendedproperty @name=N'ColumnWidth', @value=N'-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaNum'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DataUpdatable' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaNum'))
EXEC sys.sp_addextendedproperty @name=N'DataUpdatable', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaNum'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DefaultValue' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaNum'))
EXEC sys.sp_addextendedproperty @name=N'DefaultValue', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaNum'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DecimalPlaces' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaNum'))
EXEC sys.sp_addextendedproperty @name=N'MS_DecimalPlaces', @value=N'255' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaNum'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DisplayControl' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaNum'))
EXEC sys.sp_addextendedproperty @name=N'MS_DisplayControl', @value=N'109' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaNum'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaNum'))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'OperaNum' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaNum'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'OrdinalPosition' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaNum'))
EXEC sys.sp_addextendedproperty @name=N'OrdinalPosition', @value=N'6' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaNum'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Required' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaNum'))
EXEC sys.sp_addextendedproperty @name=N'Required', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaNum'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Size' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaNum'))
EXEC sys.sp_addextendedproperty @name=N'Size', @value=N'8' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaNum'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceField' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaNum'))
EXEC sys.sp_addextendedproperty @name=N'SourceField', @value=N'OperaNum' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaNum'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'SourceTable' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaNum'))
EXEC sys.sp_addextendedproperty @name=N'SourceTable', @value=N'BusinessRules' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaNum'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Type' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', N'COLUMN',N'OperaNum'))
EXEC sys.sp_addextendedproperty @name=N'Type', @value=N'7' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules', @level2type=N'COLUMN',@level2name=N'OperaNum'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Attributes' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Attributes', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'DateCreated' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'DateCreated', @value=N'2007-8-6 17:37:49' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'LastUpdated' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'LastUpdated', @value=N'2007-9-29 12:04:42' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DefaultView' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DefaultView', @value=N'2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_OrderByOn' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_OrderByOn', @value=N'False' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Orientation' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_Orientation', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Name' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Name', @value=N'BusinessRules' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'RecordCount' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'RecordCount', @value=N'0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'Updatable' , N'SCHEMA',N'dbo', N'TABLE',N'BusinessRules', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'Updatable', @value=N'True' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BusinessRules'
GO
/****** Object:  Table [dbo].[BackRequest]    Script Date: 06/06/2021 10:17:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[BackRequest]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[BackRequest](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[FlowID] [int] NULL,
	[TaskID] [int] NULL,
	[Sendee] [varchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Comment] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Requestor] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Time] [datetime] NULL,
	[BackID] [int] NULL,
 CONSTRAINT [PK_BackRequest] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[BackRequest]') AND name = N'SX_FlowID')
CREATE NONCLUSTERED INDEX [SX_FlowID] ON [dbo].[BackRequest] 
(
	[FlowID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
/****** Object:  Table [dbo].[BackHistory]    Script Date: 06/06/2021 10:17:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[BackHistory]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[BackHistory](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[FlowID] [int] NULL,
	[BackTo] [int] NULL,
	[BackType] [int] NULL,
	[FromNode] [varchar](18) COLLATE Chinese_PRC_CI_AS NULL,
	[UserName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Comment] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Time] [datetime] NULL,
 CONSTRAINT [PK_BackHistory] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[BackHistory]') AND name = N'SX_FlowID')
CREATE NONCLUSTERED INDEX [SX_FlowID] ON [dbo].[BackHistory] 
(
	[FlowID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
/****** Object:  Table [dbo].[AppBinds]    Script Date: 06/06/2021 10:17:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[AppBinds]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[AppBinds](
	[AppID] [varchar](32) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[AppUser] [varchar](32) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[UserName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Profile] [nvarchar](4000) COLLATE Chinese_PRC_CI_AS NULL
)
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AppBinds]') AND name = N'SX_AppID')
CREATE NONCLUSTERED INDEX [SX_AppID] ON [dbo].[AppBinds] 
(
	[AppID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AppBinds]') AND name = N'SX_AppUser')
CREATE NONCLUSTERED INDEX [SX_AppUser] ON [dbo].[AppBinds] 
(
	[AppUser] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[AppBinds]') AND name = N'SX_UserName')
CREATE NONCLUSTERED INDEX [SX_UserName] ON [dbo].[AppBinds] 
(
	[UserName] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON)
GO
/****** Object:  Default [DF_BackHistory_FlowID]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_BackHistory_FlowID]') AND parent_object_id = OBJECT_ID(N'[dbo].[BackHistory]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_BackHistory_FlowID]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[BackHistory] ADD  CONSTRAINT [DF_BackHistory_FlowID]  DEFAULT ((0)) FOR [FlowID]
END


End
GO
/****** Object:  Default [DF_BackHistory_BackTo]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_BackHistory_BackTo]') AND parent_object_id = OBJECT_ID(N'[dbo].[BackHistory]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_BackHistory_BackTo]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[BackHistory] ADD  CONSTRAINT [DF_BackHistory_BackTo]  DEFAULT ((0)) FOR [BackTo]
END


End
GO
/****** Object:  Default [DF_BackHistory_BackType]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_BackHistory_BackType]') AND parent_object_id = OBJECT_ID(N'[dbo].[BackHistory]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_BackHistory_BackType]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[BackHistory] ADD  CONSTRAINT [DF_BackHistory_BackType]  DEFAULT ((0)) FOR [BackType]
END


End
GO
/****** Object:  Default [DF_BackHistory_Time]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_BackHistory_Time]') AND parent_object_id = OBJECT_ID(N'[dbo].[BackHistory]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_BackHistory_Time]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[BackHistory] ADD  CONSTRAINT [DF_BackHistory_Time]  DEFAULT (getdate()) FOR [Time]
END


End
GO
/****** Object:  Default [DF_BackRequest_FlowID]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_BackRequest_FlowID]') AND parent_object_id = OBJECT_ID(N'[dbo].[BackRequest]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_BackRequest_FlowID]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[BackRequest] ADD  CONSTRAINT [DF_BackRequest_FlowID]  DEFAULT ((0)) FOR [FlowID]
END


End
GO
/****** Object:  Default [DF_BackRequest_TaskID]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_BackRequest_TaskID]') AND parent_object_id = OBJECT_ID(N'[dbo].[BackRequest]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_BackRequest_TaskID]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[BackRequest] ADD  CONSTRAINT [DF_BackRequest_TaskID]  DEFAULT ((0)) FOR [TaskID]
END


End
GO
/****** Object:  Default [DF_BackRequest_Time]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_BackRequest_Time]') AND parent_object_id = OBJECT_ID(N'[dbo].[BackRequest]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_BackRequest_Time]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[BackRequest] ADD  CONSTRAINT [DF_BackRequest_Time]  DEFAULT (getdate()) FOR [Time]
END


End
GO
/****** Object:  Default [DF_BackRequest_BackID]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_BackRequest_BackID]') AND parent_object_id = OBJECT_ID(N'[dbo].[BackRequest]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_BackRequest_BackID]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[BackRequest] ADD  CONSTRAINT [DF_BackRequest_BackID]  DEFAULT (NULL) FOR [BackID]
END


End
GO
/****** Object:  Default [DF__BusinessR__CondO__07020F21]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__BusinessR__CondO__07020F21]') AND parent_object_id = OBJECT_ID(N'[dbo].[BusinessRules]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__BusinessR__CondO__07020F21]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[BusinessRules] ADD  CONSTRAINT [DF__BusinessR__CondO__07020F21]  DEFAULT ((0)) FOR [CondOperator]
END


End
GO
/****** Object:  Default [DF__BusinessR__Opera__07F6335A]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__BusinessR__Opera__07F6335A]') AND parent_object_id = OBJECT_ID(N'[dbo].[BusinessRules]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__BusinessR__Opera__07F6335A]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[BusinessRules] ADD  CONSTRAINT [DF__BusinessR__Opera__07F6335A]  DEFAULT ((0)) FOR [OperaNum]
END


End
GO
/****** Object:  Default [DF_Comment_Tid]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Comment_Tid]') AND parent_object_id = OBJECT_ID(N'[dbo].[Comment]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Comment_Tid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Comment] ADD  CONSTRAINT [DF_Comment_Tid]  DEFAULT ((0)) FOR [Tid]
END


End
GO
/****** Object:  Default [DF_Comment_Rid]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Comment_Rid]') AND parent_object_id = OBJECT_ID(N'[dbo].[Comment]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Comment_Rid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Comment] ADD  CONSTRAINT [DF_Comment_Rid]  DEFAULT ((0)) FOR [Rid]
END


End
GO
/****** Object:  Default [DF_Comment_Time]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Comment_Time]') AND parent_object_id = OBJECT_ID(N'[dbo].[Comment]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Comment_Time]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Comment] ADD  CONSTRAINT [DF_Comment_Time]  DEFAULT (getdate()) FOR [Time]
END


End
GO
/****** Object:  Default [DF__DirIndex__Temple__0BC6C43E]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__DirIndex__Temple__0BC6C43E]') AND parent_object_id = OBJECT_ID(N'[dbo].[DirIndex]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__DirIndex__Temple__0BC6C43E]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[DirIndex] ADD  CONSTRAINT [DF__DirIndex__Temple__0BC6C43E]  DEFAULT ((0)) FOR [TempletID]
END


End
GO
/****** Object:  Default [DF__DirIndex__DirID__0CBAE877]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__DirIndex__DirID__0CBAE877]') AND parent_object_id = OBJECT_ID(N'[dbo].[DirIndex]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__DirIndex__DirID__0CBAE877]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[DirIndex] ADD  CONSTRAINT [DF__DirIndex__DirID__0CBAE877]  DEFAULT ((0)) FOR [DirID]
END


End
GO
/****** Object:  Default [DF__DirPower__Power__117F9D94]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__DirPower__Power__117F9D94]') AND parent_object_id = OBJECT_ID(N'[dbo].[DirPower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__DirPower__Power__117F9D94]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[DirPower] ADD  CONSTRAINT [DF__DirPower__Power__117F9D94]  DEFAULT ((0)) FOR [Power]
END


End
GO
/****** Object:  Default [DF__Dirs__ParentID__164452B1]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Dirs__ParentID__164452B1]') AND parent_object_id = OBJECT_ID(N'[dbo].[Dirs]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Dirs__ParentID__164452B1]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Dirs] ADD  CONSTRAINT [DF__Dirs__ParentID__164452B1]  DEFAULT ((0)) FOR [ParentID]
END


End
GO
/****** Object:  Default [DF__Dirs__BuildTime__173876EA]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Dirs__BuildTime__173876EA]') AND parent_object_id = OBJECT_ID(N'[dbo].[Dirs]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Dirs__BuildTime__173876EA]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Dirs] ADD  CONSTRAINT [DF__Dirs__BuildTime__173876EA]  DEFAULT (getdate()) FOR [BuildTime]
END


End
GO
/****** Object:  Default [DF__Dirs__Builder__182C9B23]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Dirs__Builder__182C9B23]') AND parent_object_id = OBJECT_ID(N'[dbo].[Dirs]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Dirs__Builder__182C9B23]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Dirs] ADD  CONSTRAINT [DF__Dirs__Builder__182C9B23]  DEFAULT ('') FOR [Builder]
END


End
GO
/****** Object:  Default [DF__Dirs__LastMender__1920BF5C]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Dirs__LastMender__1920BF5C]') AND parent_object_id = OBJECT_ID(N'[dbo].[Dirs]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Dirs__LastMender__1920BF5C]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Dirs] ADD  CONSTRAINT [DF__Dirs__LastMender__1920BF5C]  DEFAULT ('') FOR [LastMender]
END


End
GO
/****** Object:  Default [DF__Fields__DataType__1DE57479]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Fields__DataType__1DE57479]') AND parent_object_id = OBJECT_ID(N'[dbo].[Fields]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Fields__DataType__1DE57479]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Fields] ADD  CONSTRAINT [DF__Fields__DataType__1DE57479]  DEFAULT ((0)) FOR [DataType]
END


End
GO
/****** Object:  Default [DF__Fields__ContentL__1ED998B2]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Fields__ContentL__1ED998B2]') AND parent_object_id = OBJECT_ID(N'[dbo].[Fields]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Fields__ContentL__1ED998B2]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Fields] ADD  CONSTRAINT [DF__Fields__ContentL__1ED998B2]  DEFAULT ((0)) FOR [ContentLen]
END


End
GO
/****** Object:  Default [DF__Fields__EnEditor__1FCDBCEB]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Fields__EnEditor__1FCDBCEB]') AND parent_object_id = OBJECT_ID(N'[dbo].[Fields]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Fields__EnEditor__1FCDBCEB]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Fields] ADD  CONSTRAINT [DF__Fields__EnEditor__1FCDBCEB]  DEFAULT ((0)) FOR [EnEditor]
END


End
GO
/****** Object:  Default [DF__Fields__AllowNul__20C1E124]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Fields__AllowNul__20C1E124]') AND parent_object_id = OBJECT_ID(N'[dbo].[Fields]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Fields__AllowNul__20C1E124]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Fields] ADD  CONSTRAINT [DF__Fields__AllowNul__20C1E124]  DEFAULT ((1)) FOR [AllowNull]
END


End
GO
/****** Object:  Default [DF__Fields__AllowRep__21B6055D]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Fields__AllowRep__21B6055D]') AND parent_object_id = OBJECT_ID(N'[dbo].[Fields]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Fields__AllowRep__21B6055D]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Fields] ADD  CONSTRAINT [DF__Fields__AllowRep__21B6055D]  DEFAULT ((1)) FOR [AllowRepeat]
END


End
GO
/****** Object:  Default [DF__Fields__DefaultV__22AA2996]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Fields__DefaultV__22AA2996]') AND parent_object_id = OBJECT_ID(N'[dbo].[Fields]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Fields__DefaultV__22AA2996]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Fields] ADD  CONSTRAINT [DF__Fields__DefaultV__22AA2996]  DEFAULT ('') FOR [DefaultVal]
END


End
GO
/****** Object:  Default [DF__Fields__Options__239E4DCF]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Fields__Options__239E4DCF]') AND parent_object_id = OBJECT_ID(N'[dbo].[Fields]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Fields__Options__239E4DCF]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Fields] ADD  CONSTRAINT [DF__Fields__Options__239E4DCF]  DEFAULT ('') FOR [Options]
END


End
GO
/****** Object:  Default [DF__Fields__SecLevel__24927208]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Fields__SecLevel__24927208]') AND parent_object_id = OBJECT_ID(N'[dbo].[Fields]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Fields__SecLevel__24927208]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Fields] ADD  CONSTRAINT [DF__Fields__SecLevel__24927208]  DEFAULT ((0)) FOR [SecLevel]
END


End
GO
/****** Object:  Default [DF__Fields__TempletI__267ABA7A]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Fields__TempletI__267ABA7A]') AND parent_object_id = OBJECT_ID(N'[dbo].[Fields]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Fields__TempletI__267ABA7A]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Fields] ADD  CONSTRAINT [DF__Fields__TempletI__267ABA7A]  DEFAULT ((0)) FOR [TempletID]
END


End
GO
/****** Object:  Default [DF__Fields__Unit__276EDEB3]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Fields__Unit__276EDEB3]') AND parent_object_id = OBJECT_ID(N'[dbo].[Fields]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Fields__Unit__276EDEB3]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Fields] ADD  CONSTRAINT [DF__Fields__Unit__276EDEB3]  DEFAULT ('') FOR [Unit]
END


End
GO
/****** Object:  Default [DF__Fields__Formula__286302EC]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Fields__Formula__286302EC]') AND parent_object_id = OBJECT_ID(N'[dbo].[Fields]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Fields__Formula__286302EC]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Fields] ADD  CONSTRAINT [DF__Fields__Formula__286302EC]  DEFAULT ('') FOR [Formula]
END


End
GO
/****** Object:  Default [DF__Fields__ColIndex__2A4B4B5E]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Fields__ColIndex__2A4B4B5E]') AND parent_object_id = OBJECT_ID(N'[dbo].[Fields]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Fields__ColIndex__2A4B4B5E]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Fields] ADD  CONSTRAINT [DF__Fields__ColIndex__2A4B4B5E]  DEFAULT ((-1)) FOR [ColIndex_Display]
END


End
GO
/****** Object:  Default [DF__Fields__RowIndex__2C3393D0]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Fields__RowIndex__2C3393D0]') AND parent_object_id = OBJECT_ID(N'[dbo].[Fields]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Fields__RowIndex__2C3393D0]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Fields] ADD  CONSTRAINT [DF__Fields__RowIndex__2C3393D0]  DEFAULT ((-1)) FOR [RowIndex_Display]
END


End
GO
/****** Object:  Default [DF__Fields__ColIndex__2D27B809]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Fields__ColIndex__2D27B809]') AND parent_object_id = OBJECT_ID(N'[dbo].[Fields]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Fields__ColIndex__2D27B809]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Fields] ADD  CONSTRAINT [DF__Fields__ColIndex__2D27B809]  DEFAULT ((-1)) FOR [ColIndex_MultiRowEdit]
END


End
GO
/****** Object:  Default [DF__Fields__ColWidth__2F10007B]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Fields__ColWidth__2F10007B]') AND parent_object_id = OBJECT_ID(N'[dbo].[Fields]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Fields__ColWidth__2F10007B]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Fields] ADD  CONSTRAINT [DF__Fields__ColWidth__2F10007B]  DEFAULT ((-1)) FOR [ColWidth_MultiRowEdit]
END


End
GO
/****** Object:  Default [DF_Fields_RowIndex_Design]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Fields_RowIndex_Design]') AND parent_object_id = OBJECT_ID(N'[dbo].[Fields]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Fields_RowIndex_Design]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Fields] ADD  CONSTRAINT [DF_Fields_RowIndex_Design]  DEFAULT ((-1)) FOR [RowIndex_Design]
END


End
GO
/****** Object:  Default [DF_Fields_RowIndex_SingleColEdit]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Fields_RowIndex_SingleColEdit]') AND parent_object_id = OBJECT_ID(N'[dbo].[Fields]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Fields_RowIndex_SingleColEdit]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Fields] ADD  CONSTRAINT [DF_Fields_RowIndex_SingleColEdit]  DEFAULT ((-1)) FOR [RowIndex_SingleColEdit]
END


End
GO
/****** Object:  Default [DF_Fields_AllowInput]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Fields_AllowInput]') AND parent_object_id = OBJECT_ID(N'[dbo].[Fields]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Fields_AllowInput]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Fields] ADD  CONSTRAINT [DF_Fields_AllowInput]  DEFAULT ((0)) FOR [AllowInput]
END


End
GO
/****** Object:  Default [DF__Fields__Visible__66EA454A]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Fields__Visible__66EA454A]') AND parent_object_id = OBJECT_ID(N'[dbo].[Fields]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Fields__Visible__66EA454A]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Fields] ADD  CONSTRAINT [DF__Fields__Visible__66EA454A]  DEFAULT ((1)) FOR [Visible]
END


End
GO
/****** Object:  Default [DF_Files_Size]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Files_Size]') AND parent_object_id = OBJECT_ID(N'[dbo].[Files]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Files_Size]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Files] ADD  CONSTRAINT [DF_Files_Size]  DEFAULT ((0)) FOR [Size]
END


End
GO
/****** Object:  Default [DF_Files_CreateTime]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Files_CreateTime]') AND parent_object_id = OBJECT_ID(N'[dbo].[Files]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Files_CreateTime]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Files] ADD  CONSTRAINT [DF_Files_CreateTime]  DEFAULT (getdate()) FOR [CreateTime]
END


End
GO
/****** Object:  Default [DF_Files_Dir]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Files_Dir]') AND parent_object_id = OBJECT_ID(N'[dbo].[Files]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Files_Dir]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Files] ADD  CONSTRAINT [DF_Files_Dir]  DEFAULT ((0)) FOR [Dir]
END


End
GO
/****** Object:  Default [DF_History_FlowID]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_History_FlowID]') AND parent_object_id = OBJECT_ID(N'[dbo].[History]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_History_FlowID]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[History] ADD  CONSTRAINT [DF_History_FlowID]  DEFAULT ((0)) FOR [FlowID]
END


End
GO
/****** Object:  Default [DF_History_TaskID]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_History_TaskID]') AND parent_object_id = OBJECT_ID(N'[dbo].[History]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_History_TaskID]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[History] ADD  CONSTRAINT [DF_History_TaskID]  DEFAULT ((0)) FOR [TaskID]
END


End
GO
/****** Object:  Default [DF_History_Percent]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_History_Percent]') AND parent_object_id = OBJECT_ID(N'[dbo].[History]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_History_Percent]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[History] ADD  CONSTRAINT [DF_History_Percent]  DEFAULT ((0)) FOR [Percent]
END


End
GO
/****** Object:  Default [DF_History_Time]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_History_Time]') AND parent_object_id = OBJECT_ID(N'[dbo].[History]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_History_Time]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[History] ADD  CONSTRAINT [DF_History_Time]  DEFAULT (getdate()) FOR [Time]
END


End
GO
/****** Object:  Default [DF_Info_Time]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Info_Time]') AND parent_object_id = OBJECT_ID(N'[dbo].[Info]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Info_Time]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Info] ADD  CONSTRAINT [DF_Info_Time]  DEFAULT (getdate()) FOR [Time]
END


End
GO
/****** Object:  Default [DF_Info_SecLevel]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Info_SecLevel]') AND parent_object_id = OBJECT_ID(N'[dbo].[Info]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Info_SecLevel]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Info] ADD  CONSTRAINT [DF_Info_SecLevel]  DEFAULT ((0)) FOR [SecLevel]
END


End
GO
/****** Object:  Default [DF_Info_AllowComment]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Info_AllowComment]') AND parent_object_id = OBJECT_ID(N'[dbo].[Info]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Info_AllowComment]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Info] ADD  CONSTRAINT [DF_Info_AllowComment]  DEFAULT ((0)) FOR [AllowComment]
END


End
GO
/****** Object:  Default [DF_Info_AtTop]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Info_AtTop]') AND parent_object_id = OBJECT_ID(N'[dbo].[Info]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Info_AtTop]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Info] ADD  CONSTRAINT [DF_Info_AtTop]  DEFAULT ((0)) FOR [AtTop]
END


End
GO
/****** Object:  Default [DF_Info_ClickTimes]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Info_ClickTimes]') AND parent_object_id = OBJECT_ID(N'[dbo].[Info]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Info_ClickTimes]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Info] ADD  CONSTRAINT [DF_Info_ClickTimes]  DEFAULT ((0)) FOR [ClickTimes]
END


End
GO
/****** Object:  Default [DF_Info_Audited]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Info_Audited]') AND parent_object_id = OBJECT_ID(N'[dbo].[Info]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Info_Audited]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Info] ADD  CONSTRAINT [DF_Info_Audited]  DEFAULT ((0)) FOR [Audited]
END


End
GO
/****** Object:  Default [DF_InfoComment_InfoID]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_InfoComment_InfoID]') AND parent_object_id = OBJECT_ID(N'[dbo].[InfoComment]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_InfoComment_InfoID]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[InfoComment] ADD  CONSTRAINT [DF_InfoComment_InfoID]  DEFAULT ((0)) FOR [InfoID]
END


End
GO
/****** Object:  Default [DF_InfoComment_Time]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_InfoComment_Time]') AND parent_object_id = OBJECT_ID(N'[dbo].[InfoComment]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_InfoComment_Time]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[InfoComment] ADD  CONSTRAINT [DF_InfoComment_Time]  DEFAULT (getdate()) FOR [Time]
END


End
GO
/****** Object:  Default [DF_InfoComment_Audited]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_InfoComment_Audited]') AND parent_object_id = OBJECT_ID(N'[dbo].[InfoComment]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_InfoComment_Audited]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[InfoComment] ADD  CONSTRAINT [DF_InfoComment_Audited]  DEFAULT ((0)) FOR [Audited]
END


End
GO
/****** Object:  Default [DF_Message_SendTime]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Message_SendTime]') AND parent_object_id = OBJECT_ID(N'[dbo].[Message]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Message_SendTime]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Message] ADD  CONSTRAINT [DF_Message_SendTime]  DEFAULT (getdate()) FOR [SendTime]
END


End
GO
/****** Object:  Default [DF_Message_DeletedBySender]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Message_DeletedBySender]') AND parent_object_id = OBJECT_ID(N'[dbo].[Message]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Message_DeletedBySender]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Message] ADD  CONSTRAINT [DF_Message_DeletedBySender]  DEFAULT ((0)) FOR [DeletedBySender]
END


End
GO
/****** Object:  Default [DF_Notify_TaskID]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Notify_TaskID]') AND parent_object_id = OBJECT_ID(N'[dbo].[Notify]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Notify_TaskID]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Notify] ADD  CONSTRAINT [DF_Notify_TaskID]  DEFAULT ((0)) FOR [TaskID]
END


End
GO
/****** Object:  Default [DF_Notify_NotifyTime]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Notify_NotifyTime]') AND parent_object_id = OBJECT_ID(N'[dbo].[Notify]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Notify_NotifyTime]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Notify] ADD  CONSTRAINT [DF_Notify_NotifyTime]  DEFAULT (getdate()) FOR [NotifyTime]
END


End
GO
/****** Object:  Default [DF_Notify_CreateTime]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Notify_CreateTime]') AND parent_object_id = OBJECT_ID(N'[dbo].[Notify]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Notify_CreateTime]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Notify] ADD  CONSTRAINT [DF_Notify_CreateTime]  DEFAULT (getdate()) FOR [CreateTime]
END


End
GO
/****** Object:  Default [DF__OrderDetail__Tid__114A936A]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__OrderDetail__Tid__114A936A]') AND parent_object_id = OBJECT_ID(N'[dbo].[OrderDetail]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__OrderDetail__Tid__114A936A]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[OrderDetail] ADD  CONSTRAINT [DF__OrderDetail__Tid__114A936A]  DEFAULT ((0)) FOR [Tid]
END


End
GO
/****** Object:  Default [DF__OrderDetail__Rid__123EB7A3]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__OrderDetail__Rid__123EB7A3]') AND parent_object_id = OBJECT_ID(N'[dbo].[OrderDetail]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__OrderDetail__Rid__123EB7A3]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[OrderDetail] ADD  CONSTRAINT [DF__OrderDetail__Rid__123EB7A3]  DEFAULT ((0)) FOR [Rid]
END


End
GO
/****** Object:  Default [DF__OrderDeta__Amoun__1332DBDC]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__OrderDeta__Amoun__1332DBDC]') AND parent_object_id = OBJECT_ID(N'[dbo].[OrderDetail]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__OrderDeta__Amoun__1332DBDC]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[OrderDetail] ADD  CONSTRAINT [DF__OrderDeta__Amoun__1332DBDC]  DEFAULT ((0)) FOR [Amount]
END


End
GO
/****** Object:  Default [DF__OrderDeta__Price__14270015]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__OrderDeta__Price__14270015]') AND parent_object_id = OBJECT_ID(N'[dbo].[OrderDetail]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__OrderDeta__Price__14270015]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[OrderDetail] ADD  CONSTRAINT [DF__OrderDeta__Price__14270015]  DEFAULT ((0)) FOR [Price]
END


End
GO
/****** Object:  Default [DF__Orders__SumPrice__4222D4EF]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Orders__SumPrice__4222D4EF]') AND parent_object_id = OBJECT_ID(N'[dbo].[Orders]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Orders__SumPrice__4222D4EF]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Orders] ADD  CONSTRAINT [DF__Orders__SumPrice__4222D4EF]  DEFAULT ((0)) FOR [SumPrice]
END


End
GO
/****** Object:  Default [DF__Orders__TotalPri__4316F928]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Orders__TotalPri__4316F928]') AND parent_object_id = OBJECT_ID(N'[dbo].[Orders]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Orders__TotalPri__4316F928]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Orders] ADD  CONSTRAINT [DF__Orders__TotalPri__4316F928]  DEFAULT ((0)) FOR [TotalPrice]
END


End
GO
/****** Object:  Default [DF__Orders__PriceUni__440B1D61]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Orders__PriceUni__440B1D61]') AND parent_object_id = OBJECT_ID(N'[dbo].[Orders]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Orders__PriceUni__440B1D61]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Orders] ADD  CONSTRAINT [DF__Orders__PriceUni__440B1D61]  DEFAULT ('') FOR [PriceUnit]
END


End
GO
/****** Object:  Default [DF__Orders__SendWay__44FF419A]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Orders__SendWay__44FF419A]') AND parent_object_id = OBJECT_ID(N'[dbo].[Orders]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Orders__SendWay__44FF419A]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Orders] ADD  CONSTRAINT [DF__Orders__SendWay__44FF419A]  DEFAULT ('') FOR [SendWay]
END


End
GO
/****** Object:  Default [DF__Orders__PayWay__45F365D3]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Orders__PayWay__45F365D3]') AND parent_object_id = OBJECT_ID(N'[dbo].[Orders]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Orders__PayWay__45F365D3]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Orders] ADD  CONSTRAINT [DF__Orders__PayWay__45F365D3]  DEFAULT ('') FOR [PayWay]
END


End
GO
/****** Object:  Default [DF__Orders__NeedInvo__46E78A0C]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Orders__NeedInvo__46E78A0C]') AND parent_object_id = OBJECT_ID(N'[dbo].[Orders]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Orders__NeedInvo__46E78A0C]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Orders] ADD  CONSTRAINT [DF__Orders__NeedInvo__46E78A0C]  DEFAULT ((0)) FOR [NeedInvoice]
END


End
GO
/****** Object:  Default [DF__Orders__InvoiceT__47DBAE45]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Orders__InvoiceT__47DBAE45]') AND parent_object_id = OBJECT_ID(N'[dbo].[Orders]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Orders__InvoiceT__47DBAE45]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Orders] ADD  CONSTRAINT [DF__Orders__InvoiceT__47DBAE45]  DEFAULT ('') FOR [InvoiceTitle]
END


End
GO
/****** Object:  Default [DF__Orders__Address__48CFD27E]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Orders__Address__48CFD27E]') AND parent_object_id = OBJECT_ID(N'[dbo].[Orders]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Orders__Address__48CFD27E]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Orders] ADD  CONSTRAINT [DF__Orders__Address__48CFD27E]  DEFAULT ('') FOR [Address]
END


End
GO
/****** Object:  Default [DF__Orders__Zip__49C3F6B7]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Orders__Zip__49C3F6B7]') AND parent_object_id = OBJECT_ID(N'[dbo].[Orders]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Orders__Zip__49C3F6B7]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Orders] ADD  CONSTRAINT [DF__Orders__Zip__49C3F6B7]  DEFAULT ('') FOR [Zip]
END


End
GO
/****** Object:  Default [DF__Orders__Contact__4AB81AF0]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Orders__Contact__4AB81AF0]') AND parent_object_id = OBJECT_ID(N'[dbo].[Orders]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Orders__Contact__4AB81AF0]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Orders] ADD  CONSTRAINT [DF__Orders__Contact__4AB81AF0]  DEFAULT ('') FOR [Contact]
END


End
GO
/****** Object:  Default [DF__Orders__Phone__4BAC3F29]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Orders__Phone__4BAC3F29]') AND parent_object_id = OBJECT_ID(N'[dbo].[Orders]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Orders__Phone__4BAC3F29]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Orders] ADD  CONSTRAINT [DF__Orders__Phone__4BAC3F29]  DEFAULT ('') FOR [Phone]
END


End
GO
/****** Object:  Default [DF__Orders__Email__4CA06362]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Orders__Email__4CA06362]') AND parent_object_id = OBJECT_ID(N'[dbo].[Orders]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Orders__Email__4CA06362]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Orders] ADD  CONSTRAINT [DF__Orders__Email__4CA06362]  DEFAULT ('') FOR [Email]
END


End
GO
/****** Object:  Default [DF__Orders__CustomCo__4D94879B]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Orders__CustomCo__4D94879B]') AND parent_object_id = OBJECT_ID(N'[dbo].[Orders]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Orders__CustomCo__4D94879B]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Orders] ADD  CONSTRAINT [DF__Orders__CustomCo__4D94879B]  DEFAULT ('') FOR [CustomComment]
END


End
GO
/****** Object:  Default [DF__Orders__AdminCom__4E88ABD4]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Orders__AdminCom__4E88ABD4]') AND parent_object_id = OBJECT_ID(N'[dbo].[Orders]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Orders__AdminCom__4E88ABD4]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Orders] ADD  CONSTRAINT [DF__Orders__AdminCom__4E88ABD4]  DEFAULT ('') FOR [AdminComment]
END


End
GO
/****** Object:  Default [DF__Orders__OrderSta__4F7CD00D]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Orders__OrderSta__4F7CD00D]') AND parent_object_id = OBJECT_ID(N'[dbo].[Orders]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Orders__OrderSta__4F7CD00D]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Orders] ADD  CONSTRAINT [DF__Orders__OrderSta__4F7CD00D]  DEFAULT ((0)) FOR [OrderStatus]
END


End
GO
/****** Object:  Default [DF__Orders__SubmitTi__5070F446]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Orders__SubmitTi__5070F446]') AND parent_object_id = OBJECT_ID(N'[dbo].[Orders]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Orders__SubmitTi__5070F446]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Orders] ADD  CONSTRAINT [DF__Orders__SubmitTi__5070F446]  DEFAULT (getdate()) FOR [SubmitTime]
END


End
GO
/****** Object:  Default [DF__Orders__Submiter__5165187F]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Orders__Submiter__5165187F]') AND parent_object_id = OBJECT_ID(N'[dbo].[Orders]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Orders__Submiter__5165187F]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Orders] ADD  CONSTRAINT [DF__Orders__Submiter__5165187F]  DEFAULT ('') FOR [Submiter]
END


End
GO
/****** Object:  Default [DF_Plans_FlowID]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Plans_FlowID]') AND parent_object_id = OBJECT_ID(N'[dbo].[Plans]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Plans_FlowID]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Plans] ADD  CONSTRAINT [DF_Plans_FlowID]  DEFAULT ((0)) FOR [FlowID]
END


End
GO
/****** Object:  Default [DF_Plans_MaxTimes]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Plans_MaxTimes]') AND parent_object_id = OBJECT_ID(N'[dbo].[Plans]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Plans_MaxTimes]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Plans] ADD  CONSTRAINT [DF_Plans_MaxTimes]  DEFAULT ((0)) FOR [MaxTimes]
END


End
GO
/****** Object:  Default [DF_Plans_Times]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Plans_Times]') AND parent_object_id = OBJECT_ID(N'[dbo].[Plans]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Plans_Times]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Plans] ADD  CONSTRAINT [DF_Plans_Times]  DEFAULT ((0)) FOR [Times]
END


End
GO
/****** Object:  Default [DF_Plans_Enabled]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Plans_Enabled]') AND parent_object_id = OBJECT_ID(N'[dbo].[Plans]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Plans_Enabled]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Plans] ADD  CONSTRAINT [DF_Plans_Enabled]  DEFAULT ((1)) FOR [Enabled]
END


End
GO
/****** Object:  Default [DF_Plans_CreatTime]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Plans_CreatTime]') AND parent_object_id = OBJECT_ID(N'[dbo].[Plans]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Plans_CreatTime]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Plans] ADD  CONSTRAINT [DF_Plans_CreatTime]  DEFAULT (getdate()) FOR [CreatTime]
END


End
GO
/****** Object:  Default [DF_ReadLog_tid]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_ReadLog_tid]') AND parent_object_id = OBJECT_ID(N'[dbo].[ReadLog]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_ReadLog_tid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[ReadLog] ADD  CONSTRAINT [DF_ReadLog_tid]  DEFAULT ((0)) FOR [tid]
END


End
GO
/****** Object:  Default [DF_ReadLog_time]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_ReadLog_time]') AND parent_object_id = OBJECT_ID(N'[dbo].[ReadLog]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_ReadLog_time]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[ReadLog] ADD  CONSTRAINT [DF_ReadLog_time]  DEFAULT (getdate()) FOR [time]
END


End
GO
/****** Object:  Default [DF_Remind_TempletID]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Remind_TempletID]') AND parent_object_id = OBJECT_ID(N'[dbo].[Remind]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Remind_TempletID]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Remind] ADD  CONSTRAINT [DF_Remind_TempletID]  DEFAULT ((0)) FOR [TempletID]
END


End
GO
/****** Object:  Default [DF_Remind_CheckMoment]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Remind_CheckMoment]') AND parent_object_id = OBJECT_ID(N'[dbo].[Remind]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Remind_CheckMoment]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Remind] ADD  CONSTRAINT [DF_Remind_CheckMoment]  DEFAULT ((0)) FOR [CheckMoment]
END


End
GO
/****** Object:  Default [DF_Remind_StartTime]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Remind_StartTime]') AND parent_object_id = OBJECT_ID(N'[dbo].[Remind]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Remind_StartTime]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Remind] ADD  CONSTRAINT [DF_Remind_StartTime]  DEFAULT (getdate()) FOR [StartTime]
END


End
GO
/****** Object:  Default [DF_Remind_NextTime]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Remind_NextTime]') AND parent_object_id = OBJECT_ID(N'[dbo].[Remind]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Remind_NextTime]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Remind] ADD  CONSTRAINT [DF_Remind_NextTime]  DEFAULT (getdate()) FOR [NextTime]
END


End
GO
/****** Object:  Default [DF_Remind_RemindTimes]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Remind_RemindTimes]') AND parent_object_id = OBJECT_ID(N'[dbo].[Remind]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Remind_RemindTimes]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Remind] ADD  CONSTRAINT [DF_Remind_RemindTimes]  DEFAULT ((0)) FOR [RemindTimes]
END


End
GO
/****** Object:  Default [DF_Remind_Enabled]    Script Date: 06/06/2021 10:17:48 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Remind_Enabled]') AND parent_object_id = OBJECT_ID(N'[dbo].[Remind]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Remind_Enabled]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Remind] ADD  CONSTRAINT [DF_Remind_Enabled]  DEFAULT ((1)) FOR [Enabled]
END


End
GO
/****** Object:  Default [DF__RolePower__SysAd__5FB337D6]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__RolePower__SysAd__5FB337D6]') AND parent_object_id = OBJECT_ID(N'[dbo].[RolePower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__RolePower__SysAd__5FB337D6]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[RolePower] ADD  CONSTRAINT [DF__RolePower__SysAd__5FB337D6]  DEFAULT ((0)) FOR [SysAdmin]
END


End
GO
/****** Object:  Default [DF_RolePower_UserAdmin]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_RolePower_UserAdmin]') AND parent_object_id = OBJECT_ID(N'[dbo].[RolePower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_RolePower_UserAdmin]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[RolePower] ADD  CONSTRAINT [DF_RolePower_UserAdmin]  DEFAULT ((0)) FOR [UserAdmin]
END


End
GO
/****** Object:  Default [DF__RolePower__Templ__60A75C0F]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__RolePower__Templ__60A75C0F]') AND parent_object_id = OBJECT_ID(N'[dbo].[RolePower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__RolePower__Templ__60A75C0F]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[RolePower] ADD  CONSTRAINT [DF__RolePower__Templ__60A75C0F]  DEFAULT ((0)) FOR [EnCreatTemplet]
END


End
GO
/****** Object:  Default [DF__RolePower__Order__619B8048]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__RolePower__Order__619B8048]') AND parent_object_id = OBJECT_ID(N'[dbo].[RolePower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__RolePower__Order__619B8048]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[RolePower] ADD  CONSTRAINT [DF__RolePower__Order__619B8048]  DEFAULT ((0)) FOR [OrderAdmin]
END


End
GO
/****** Object:  Default [DF_RolePower_Info_AllowPublish]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_RolePower_Info_AllowPublish]') AND parent_object_id = OBJECT_ID(N'[dbo].[RolePower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_RolePower_Info_AllowPublish]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[RolePower] ADD  CONSTRAINT [DF_RolePower_Info_AllowPublish]  DEFAULT ((0)) FOR [Info_AllowPublish]
END


End
GO
/****** Object:  Default [DF_RolePower_Info_AllowRead]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_RolePower_Info_AllowRead]') AND parent_object_id = OBJECT_ID(N'[dbo].[RolePower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_RolePower_Info_AllowRead]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[RolePower] ADD  CONSTRAINT [DF_RolePower_Info_AllowRead]  DEFAULT ((0)) FOR [Info_AllowRead]
END


End
GO
/****** Object:  Default [DF_RolePower_Info_ReadLevel]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_RolePower_Info_ReadLevel]') AND parent_object_id = OBJECT_ID(N'[dbo].[RolePower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_RolePower_Info_ReadLevel]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[RolePower] ADD  CONSTRAINT [DF_RolePower_Info_ReadLevel]  DEFAULT ((-1)) FOR [Info_ReadLevel]
END


End
GO
/****** Object:  Default [DF_RolePower_Info_AllowComment]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_RolePower_Info_AllowComment]') AND parent_object_id = OBJECT_ID(N'[dbo].[RolePower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_RolePower_Info_AllowComment]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[RolePower] ADD  CONSTRAINT [DF_RolePower_Info_AllowComment]  DEFAULT ((0)) FOR [Info_AllowComment]
END


End
GO
/****** Object:  Default [DF_RolePower_Info_AllowAdmin]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_RolePower_Info_AllowAdmin]') AND parent_object_id = OBJECT_ID(N'[dbo].[RolePower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_RolePower_Info_AllowAdmin]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[RolePower] ADD  CONSTRAINT [DF_RolePower_Info_AllowAdmin]  DEFAULT ((0)) FOR [Info_AllowAdmin]
END


End
GO
/****** Object:  Default [DF_RolePower_Sms_AllowSend]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_RolePower_Sms_AllowSend]') AND parent_object_id = OBJECT_ID(N'[dbo].[RolePower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_RolePower_Sms_AllowSend]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[RolePower] ADD  CONSTRAINT [DF_RolePower_Sms_AllowSend]  DEFAULT ((0)) FOR [Sms_AllowSend]
END


End
GO
/****** Object:  Default [DF_RolePower_Sms_AllowBatchSend]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_RolePower_Sms_AllowBatchSend]') AND parent_object_id = OBJECT_ID(N'[dbo].[RolePower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_RolePower_Sms_AllowBatchSend]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[RolePower] ADD  CONSTRAINT [DF_RolePower_Sms_AllowBatchSend]  DEFAULT ((0)) FOR [Sms_AllowBatchSend]
END


End
GO
/****** Object:  Default [DF_RolePower_Sms_AllowReceive]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_RolePower_Sms_AllowReceive]') AND parent_object_id = OBJECT_ID(N'[dbo].[RolePower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_RolePower_Sms_AllowReceive]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[RolePower] ADD  CONSTRAINT [DF_RolePower_Sms_AllowReceive]  DEFAULT ((0)) FOR [Sms_AllowReceive]
END


End
GO
/****** Object:  Default [DF_RolePower_Msg_AllowSend]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_RolePower_Msg_AllowSend]') AND parent_object_id = OBJECT_ID(N'[dbo].[RolePower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_RolePower_Msg_AllowSend]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[RolePower] ADD  CONSTRAINT [DF_RolePower_Msg_AllowSend]  DEFAULT ((0)) FOR [Msg_AllowSend]
END


End
GO
/****** Object:  Default [DF_RolePower_Msg_AllowBatchSend]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_RolePower_Msg_AllowBatchSend]') AND parent_object_id = OBJECT_ID(N'[dbo].[RolePower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_RolePower_Msg_AllowBatchSend]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[RolePower] ADD  CONSTRAINT [DF_RolePower_Msg_AllowBatchSend]  DEFAULT ((0)) FOR [Msg_AllowBatchSend]
END


End
GO
/****** Object:  Default [DF_RolePower_Mail_AllowSend]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_RolePower_Mail_AllowSend]') AND parent_object_id = OBJECT_ID(N'[dbo].[RolePower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_RolePower_Mail_AllowSend]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[RolePower] ADD  CONSTRAINT [DF_RolePower_Mail_AllowSend]  DEFAULT ((0)) FOR [Mail_AllowSend]
END


End
GO
/****** Object:  Default [DF_RolePower_Mail_AllowBatchSend]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_RolePower_Mail_AllowBatchSend]') AND parent_object_id = OBJECT_ID(N'[dbo].[RolePower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_RolePower_Mail_AllowBatchSend]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[RolePower] ADD  CONSTRAINT [DF_RolePower_Mail_AllowBatchSend]  DEFAULT ((0)) FOR [Mail_AllowBatchSend]
END


End
GO
/****** Object:  Default [DF_RolePower_Wx_AllowSend]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_RolePower_Wx_AllowSend]') AND parent_object_id = OBJECT_ID(N'[dbo].[RolePower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_RolePower_Wx_AllowSend]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[RolePower] ADD  CONSTRAINT [DF_RolePower_Wx_AllowSend]  DEFAULT ((0)) FOR [Wx_AllowSend]
END


End
GO
/****** Object:  Default [DF_RolePower_Wx_AllowBatchSend]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_RolePower_Wx_AllowBatchSend]') AND parent_object_id = OBJECT_ID(N'[dbo].[RolePower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_RolePower_Wx_AllowBatchSend]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[RolePower] ADD  CONSTRAINT [DF_RolePower_Wx_AllowBatchSend]  DEFAULT ((0)) FOR [Wx_AllowBatchSend]
END


End
GO
/****** Object:  Default [DF_Snapshot_FlowID]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Snapshot_FlowID]') AND parent_object_id = OBJECT_ID(N'[dbo].[Snapshot]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Snapshot_FlowID]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Snapshot] ADD  CONSTRAINT [DF_Snapshot_FlowID]  DEFAULT ((0)) FOR [FlowID]
END


End
GO
/****** Object:  Default [DF_Snapshot_TaskID]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Snapshot_TaskID]') AND parent_object_id = OBJECT_ID(N'[dbo].[Snapshot]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Snapshot_TaskID]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Snapshot] ADD  CONSTRAINT [DF_Snapshot_TaskID]  DEFAULT ((0)) FOR [TaskID]
END


End
GO
/****** Object:  Default [DF_Snapshot_Time]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Snapshot_Time]') AND parent_object_id = OBJECT_ID(N'[dbo].[Snapshot]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Snapshot_Time]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Snapshot] ADD  CONSTRAINT [DF_Snapshot_Time]  DEFAULT (getdate()) FOR [Time]
END


End
GO
/****** Object:  Default [DF__Tem_Init__SecLev__74AE54BC]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Tem_Init__SecLev__74AE54BC]') AND parent_object_id = OBJECT_ID(N'[dbo].[Tem_Init]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Tem_Init__SecLev__74AE54BC]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Tem_Init] ADD  CONSTRAINT [DF__Tem_Init__SecLev__74AE54BC]  DEFAULT ((0)) FOR [SecLevel]
END


End
GO
/****** Object:  Default [DF__Tem_Init__LastMo__75A278F5]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Tem_Init__LastMo__75A278F5]') AND parent_object_id = OBJECT_ID(N'[dbo].[Tem_Init]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Tem_Init__LastMo__75A278F5]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Tem_Init] ADD  CONSTRAINT [DF__Tem_Init__LastMo__75A278F5]  DEFAULT (getdate()) FOR [LastModified]
END


End
GO
/****** Object:  Default [DF_TempletFolders_ParentID]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_TempletFolders_ParentID]') AND parent_object_id = OBJECT_ID(N'[dbo].[TempletFolders]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_TempletFolders_ParentID]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[TempletFolders] ADD  CONSTRAINT [DF_TempletFolders_ParentID]  DEFAULT ((0)) FOR [ParentID]
END


End
GO
/****** Object:  Default [DF_TempletFolders_BuildTime]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_TempletFolders_BuildTime]') AND parent_object_id = OBJECT_ID(N'[dbo].[TempletFolders]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_TempletFolders_BuildTime]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[TempletFolders] ADD  CONSTRAINT [DF_TempletFolders_BuildTime]  DEFAULT (getdate()) FOR [BuildTime]
END


End
GO
/****** Object:  Default [DF_TempletFolders_Builder]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_TempletFolders_Builder]') AND parent_object_id = OBJECT_ID(N'[dbo].[TempletFolders]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_TempletFolders_Builder]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[TempletFolders] ADD  CONSTRAINT [DF_TempletFolders_Builder]  DEFAULT ('') FOR [Builder]
END


End
GO
/****** Object:  Default [DF_TempletFolders_LastMender]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_TempletFolders_LastMender]') AND parent_object_id = OBJECT_ID(N'[dbo].[TempletFolders]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_TempletFolders_LastMender]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[TempletFolders] ADD  CONSTRAINT [DF_TempletFolders_LastMender]  DEFAULT ('') FOR [LastMender]
END


End
GO
/****** Object:  Default [DF__TempletPo__Power__7B5B524B]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__TempletPo__Power__7B5B524B]') AND parent_object_id = OBJECT_ID(N'[dbo].[TempletPower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__TempletPo__Power__7B5B524B]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[TempletPower] ADD  CONSTRAINT [DF__TempletPo__Power__7B5B524B]  DEFAULT ((0)) FOR [Power]
END


End
GO
/****** Object:  Default [DF_TempletPower_ReadPower]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_TempletPower_ReadPower]') AND parent_object_id = OBJECT_ID(N'[dbo].[TempletPower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_TempletPower_ReadPower]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[TempletPower] ADD  CONSTRAINT [DF_TempletPower_ReadPower]  DEFAULT ((-1)) FOR [ReadPower]
END


End
GO
/****** Object:  Default [DF__TempletPo__Admin__67DE6983]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__TempletPo__Admin__67DE6983]') AND parent_object_id = OBJECT_ID(N'[dbo].[TempletPower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__TempletPo__Admin__67DE6983]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[TempletPower] ADD  CONSTRAINT [DF__TempletPo__Admin__67DE6983]  DEFAULT ((0)) FOR [AdminMadeByOther]
END


End
GO
/****** Object:  Default [DF__TempletPo__Writa__68D28DBC]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__TempletPo__Writa__68D28DBC]') AND parent_object_id = OBJECT_ID(N'[dbo].[TempletPower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__TempletPo__Writa__68D28DBC]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[TempletPower] ADD  CONSTRAINT [DF__TempletPo__Writa__68D28DBC]  DEFAULT ((0)) FOR [WritableAllFields]
END


End
GO
/****** Object:  Default [DF_TempletPower_AllowAdd]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_TempletPower_AllowAdd]') AND parent_object_id = OBJECT_ID(N'[dbo].[TempletPower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_TempletPower_AllowAdd]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[TempletPower] ADD  CONSTRAINT [DF_TempletPower_AllowAdd]  DEFAULT ((0)) FOR [AllowAdd]
END


End
GO
/****** Object:  Default [DF_TempletPower_ReadComment]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_TempletPower_ReadComment]') AND parent_object_id = OBJECT_ID(N'[dbo].[TempletPower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_TempletPower_ReadComment]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[TempletPower] ADD  CONSTRAINT [DF_TempletPower_ReadComment]  DEFAULT ((0)) FOR [ReadComment]
END


End
GO
/****** Object:  Default [DF_TempletPower_WriteComment]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_TempletPower_WriteComment]') AND parent_object_id = OBJECT_ID(N'[dbo].[TempletPower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_TempletPower_WriteComment]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[TempletPower] ADD  CONSTRAINT [DF_TempletPower_WriteComment]  DEFAULT ((0)) FOR [WriteComment]
END


End
GO
/****** Object:  Default [DF_TempletPower_AdminComment]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_TempletPower_AdminComment]') AND parent_object_id = OBJECT_ID(N'[dbo].[TempletPower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_TempletPower_AdminComment]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[TempletPower] ADD  CONSTRAINT [DF_TempletPower_AdminComment]  DEFAULT ((0)) FOR [AdminComment]
END


End
GO
/****** Object:  Default [DF_TempletPower_Visible]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_TempletPower_Visible]') AND parent_object_id = OBJECT_ID(N'[dbo].[TempletPower]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_TempletPower_Visible]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[TempletPower] ADD  CONSTRAINT [DF_TempletPower_Visible]  DEFAULT ((1)) FOR [Visible]
END


End
GO
/****** Object:  Default [DF__Templets__LastMe__07C12930]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__Templets__LastMe__07C12930]') AND parent_object_id = OBJECT_ID(N'[dbo].[Templets]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__Templets__LastMe__07C12930]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Templets] ADD  CONSTRAINT [DF__Templets__LastMe__07C12930]  DEFAULT ('') FOR [LastMender]
END


End
GO
/****** Object:  Default [DF_Templets_DefaultDir]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Templets_DefaultDir]') AND parent_object_id = OBJECT_ID(N'[dbo].[Templets]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Templets_DefaultDir]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Templets] ADD  CONSTRAINT [DF_Templets_DefaultDir]  DEFAULT ((0)) FOR [DefaultDir]
END


End
GO
/****** Object:  Default [DF_Templets_DefaultSecLevel]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Templets_DefaultSecLevel]') AND parent_object_id = OBJECT_ID(N'[dbo].[Templets]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Templets_DefaultSecLevel]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Templets] ADD  CONSTRAINT [DF_Templets_DefaultSecLevel]  DEFAULT ((0)) FOR [DefaultSecLevel]
END


End
GO
/****** Object:  Default [DF_Templets_FolderID]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Templets_FolderID]') AND parent_object_id = OBJECT_ID(N'[dbo].[Templets]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Templets_FolderID]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Templets] ADD  CONSTRAINT [DF_Templets_FolderID]  DEFAULT ((0)) FOR [FolderID]
END


End
GO
/****** Object:  Default [DF_Templets_PowerAs]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Templets_PowerAs]') AND parent_object_id = OBJECT_ID(N'[dbo].[Templets]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Templets_PowerAs]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Templets] ADD  CONSTRAINT [DF_Templets_PowerAs]  DEFAULT (NULL) FOR [PowerAs]
END


End
GO
/****** Object:  Default [DF_Units_ParentID]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Units_ParentID]') AND parent_object_id = OBJECT_ID(N'[dbo].[Units]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Units_ParentID]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Units] ADD  CONSTRAINT [DF_Units_ParentID]  DEFAULT ((0)) FOR [ParentID]
END


End
GO
/****** Object:  Default [DF_Units_SortNum]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Units_SortNum]') AND parent_object_id = OBJECT_ID(N'[dbo].[Units]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Units_SortNum]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Units] ADD  CONSTRAINT [DF_Units_SortNum]  DEFAULT ((0)) FOR [SortNum]
END


End
GO
/****** Object:  Default [DF_Units_Deep]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_Units_Deep]') AND parent_object_id = OBJECT_ID(N'[dbo].[Units]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Units_Deep]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Units] ADD  CONSTRAINT [DF_Units_Deep]  DEFAULT ((1)) FOR [Deep]
END


End
GO
/****** Object:  Default [DF_UserExInfo_UnitID]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_UserExInfo_UnitID]') AND parent_object_id = OBJECT_ID(N'[dbo].[UserExInfo]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_UserExInfo_UnitID]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[UserExInfo] ADD  CONSTRAINT [DF_UserExInfo_UnitID]  DEFAULT ((0)) FOR [UnitID]
END


End
GO
/****** Object:  Default [DF_UserExInfo_IsRector]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_UserExInfo_IsRector]') AND parent_object_id = OBJECT_ID(N'[dbo].[UserExInfo]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_UserExInfo_IsRector]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[UserExInfo] ADD  CONSTRAINT [DF_UserExInfo_IsRector]  DEFAULT ((0)) FOR [IsRector]
END


End
GO
/****** Object:  Default [DF__UserExInfo__Sex__0C85DE4D]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF__UserExInfo__Sex__0C85DE4D]') AND parent_object_id = OBJECT_ID(N'[dbo].[UserExInfo]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF__UserExInfo__Sex__0C85DE4D]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[UserExInfo] ADD  CONSTRAINT [DF__UserExInfo__Sex__0C85DE4D]  DEFAULT ((1)) FOR [Sex]
END


End
GO
/****** Object:  Default [DF_WorkFlow_TempletID]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_WorkFlow_TempletID]') AND parent_object_id = OBJECT_ID(N'[dbo].[WorkFlow]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_WorkFlow_TempletID]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[WorkFlow] ADD  CONSTRAINT [DF_WorkFlow_TempletID]  DEFAULT ((0)) FOR [TempletID]
END


End
GO
/****** Object:  Default [DF_WorkFlow_DataOpera]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_WorkFlow_DataOpera]') AND parent_object_id = OBJECT_ID(N'[dbo].[WorkFlow]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_WorkFlow_DataOpera]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[WorkFlow] ADD  CONSTRAINT [DF_WorkFlow_DataOpera]  DEFAULT ((0)) FOR [DataOpera]
END


End
GO
/****** Object:  Default [DF_WorkFlow_LastModified]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_WorkFlow_LastModified]') AND parent_object_id = OBJECT_ID(N'[dbo].[WorkFlow]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_WorkFlow_LastModified]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[WorkFlow] ADD  CONSTRAINT [DF_WorkFlow_LastModified]  DEFAULT (getdate()) FOR [LastModified]
END


End
GO
/****** Object:  Default [DF_WorkFlows_TempletID]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_WorkFlows_TempletID]') AND parent_object_id = OBJECT_ID(N'[dbo].[WorkFlows]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_WorkFlows_TempletID]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[WorkFlows] ADD  CONSTRAINT [DF_WorkFlows_TempletID]  DEFAULT ((0)) FOR [TempletID]
END


End
GO
/****** Object:  Default [DF_WorkFlows_FormID]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_WorkFlows_FormID]') AND parent_object_id = OBJECT_ID(N'[dbo].[WorkFlows]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_WorkFlows_FormID]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[WorkFlows] ADD  CONSTRAINT [DF_WorkFlows_FormID]  DEFAULT ((0)) FOR [FormID]
END


End
GO
/****** Object:  Default [DF_WorkFlows_State]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_WorkFlows_State]') AND parent_object_id = OBJECT_ID(N'[dbo].[WorkFlows]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_WorkFlows_State]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[WorkFlows] ADD  CONSTRAINT [DF_WorkFlows_State]  DEFAULT ((0)) FOR [State]
END


End
GO
/****** Object:  Default [DF_WorkFlows_BuildTime]    Script Date: 06/06/2021 10:17:49 ******/
IF Not EXISTS (SELECT * FROM sys.default_constraints WHERE object_id = OBJECT_ID(N'[dbo].[DF_WorkFlows_BuildTime]') AND parent_object_id = OBJECT_ID(N'[dbo].[WorkFlows]'))
Begin
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_WorkFlows_BuildTime]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[WorkFlows] ADD  CONSTRAINT [DF_WorkFlows_BuildTime]  DEFAULT (getdate()) FOR [BuildTime]
END


End
GO
