USE [DD_ECM]
GO

/****** Object:  Table [dbo].[TBDD_ZUGFERD_XML_ITEMS]    Script Date: 25.07.2023 10:04:13 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[TBDD_ZUGFERD_XML_ITEMS](
	[GUID] [int] IDENTITY(1,1) NOT NULL,
	[SPECIFICATION] [nvarchar](50) NOT NULL,
	[XML_PATH] [nvarchar](500) NOT NULL,
	[DESCRIPTION] [nvarchar](500) NOT NULL,
	[TABLE_NAME] [nvarchar](100) NOT NULL,
	[TABLE_COLUMN] [nvarchar](100) NOT NULL,
	[COMMENT] [nvarchar](500) NULL,
	[ACTIVE] [bit] NULL,
	[IS_REQUIRED] [bit] NULL,
	[IS_GROUPED] [bit] NULL,
	[GROUP_SCOPE] [nvarchar](50) NULL,
	[ADDED_WHEN] [datetime] NULL,
	[ADDED_WHO] [nvarchar](50) NULL,
	[CHANGED_WHEN] [datetime] NULL,
	[CHANGED_WHO] [nvarchar](50) NULL,
 CONSTRAINT [PK_TBDD_ZUGFERD_XML_ITEMS] PRIMARY KEY CLUSTERED 
(
	[GUID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[TBDD_ZUGFERD_XML_ITEMS] ADD  CONSTRAINT [DF_TBDD_ZUGFERD_XML_ITEMS_SPECIFICATION]  DEFAULT (N'DEFAULT') FOR [SPECIFICATION]
GO

ALTER TABLE [dbo].[TBDD_ZUGFERD_XML_ITEMS] ADD  CONSTRAINT [DF_TBDD_ZUGFERD_XML_ITEMS_ACTIVE]  DEFAULT ((1)) FOR [ACTIVE]
GO

ALTER TABLE [dbo].[TBDD_ZUGFERD_XML_ITEMS] ADD  CONSTRAINT [DF_TBDD_ZUGFERD_XML_ITEMS_GROUP_SCOPE]  DEFAULT (N'DEFAULT') FOR [GROUP_SCOPE]
GO

ALTER TABLE [dbo].[TBDD_ZUGFERD_XML_ITEMS] ADD  CONSTRAINT [DF_TBDD_ZUGFERD_XML_ITEMS_ADDED_WHEN]  DEFAULT (getdate()) FOR [ADDED_WHEN]
GO

ALTER TABLE [dbo].[TBDD_ZUGFERD_XML_ITEMS] ADD  CONSTRAINT [DF_TBDD_ZUGFERD_XML_ITEMS_ADDED_WHO]  DEFAULT (N'EDM-Admin') FOR [ADDED_WHO]
GO