﻿USE [DD_ECM]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATE_ITEMS] DROP CONSTRAINT [FK_TBEDI_XML_TYPES]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATE_ITEMS] DROP CONSTRAINT [FK_TBEDI_XML_NODES]
GO
ALTER TABLE [dbo].[TBEDI_XML_TYPES] DROP CONSTRAINT [DF_TBEDI_XML_TYPES_ADDED_WHEN]
GO
ALTER TABLE [dbo].[TBEDI_XML_TYPES] DROP CONSTRAINT [DF_TBEDI_XML_TYPES_ADDED_WHO]
GO
ALTER TABLE [dbo].[TBEDI_XML_TYPES] DROP CONSTRAINT [DF_TBEDI_XML_TYPES_ACTIVE]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATES] DROP CONSTRAINT [DF_TBEDI_XML_TEMPLATES_ADDED_WHEN]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATES] DROP CONSTRAINT [DF_TBEDI_XML_TEMPLATES_ADDED_WHO]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATES] DROP CONSTRAINT [DF_TBEDI_XML_TEMPLATES_ACTIVE]
GO
ALTER TABLE [dbo].[TBEDI_XML_TABLES] DROP CONSTRAINT [DF_TBEDI_XML_TABLES_ADDED_WHEN]
GO
ALTER TABLE [dbo].[TBEDI_XML_TABLES] DROP CONSTRAINT [DF_TBEDI_XML_TABLES_ADDED_WHO]
GO
ALTER TABLE [dbo].[TBEDI_XML_TABLES] DROP CONSTRAINT [DF_TBEDI_XML_TABLES_ACTIVE]
GO
ALTER TABLE [dbo].[TBEDI_XML_TABLES] DROP CONSTRAINT [DF_TBEDI_XML_NODES_IS_HEAD]
GO
ALTER TABLE [dbo].[TBMT_MAPPING_ENTITIES] DROP CONSTRAINT [DF_TBMT_MAPPING_ENTITIES_ADDED_WHEN]
GO
ALTER TABLE [dbo].[TBMT_MAPPING_ENTITIES] DROP CONSTRAINT [DF_TBMT_MAPPING_ENTITIES_ADDED_WHO]
GO
ALTER TABLE [dbo].[TBMT_MAPPING_ENTITIES] DROP CONSTRAINT [DF_TBMT_MAPPING_ENTITIES_ACTIVE]
GO
ALTER TABLE [dbo].[TBMT_MAPPING_CONFIG] DROP CONSTRAINT [DF_TBMT_MAPPING_CONFIG_ADDED_WHEN]
GO
ALTER TABLE [dbo].[TBMT_MAPPING_CONFIG] DROP CONSTRAINT [DF_TBMT_MAPPING_CONFIG_ADDED_WHO]
GO
ALTER TABLE [dbo].[TBMT_MAPPING_CONFIG] DROP CONSTRAINT [DF_TBMT_MAPPING_CONFIG_ACTIVE]
GO
ALTER TABLE [dbo].[TBMT_MAPPING_CONFIG] DROP CONSTRAINT [DF_TBEDI_XML_VALUE_MAPPING_ORDER_KEY]
GO
ALTER TABLE [dbo].[TBMT_MANDATORS] DROP CONSTRAINT [DF_TBMT_MANDATORS_ACTIVE]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATE_ITEMS] DROP CONSTRAINT [DF_TBEDI_XML_TEMPLATE_ITEMS_ADDED_WHEN]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATE_ITEMS] DROP CONSTRAINT [DF_TBEDI_XML_TEMPLATE_ITEMS_ADDED_WHO]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATE_ITEMS] DROP CONSTRAINT [DF_TBEDI_XML_TEMPLATE_ITEMS_ACTIVE]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATE_ITEMS] DROP CONSTRAINT [DF_TBEDI_XML_TEMPLATE_ITEMS_IS_VIRTUAL]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATE_ITEMS] DROP CONSTRAINT [DF_TBEDI_XML_TEMPLATE_ITEMS_IS_REQUIRED]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATE_ITEMS] DROP CONSTRAINT [DF_TBEDI_XML_TEMPLATE_ITEMS_IS_VISIBLE]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATE_ITEMS] DROP CONSTRAINT [DF_TBEDI_XML_TEMPLATE_ITEMS_IS_READ_ONLY]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATE_ITEMS] DROP CONSTRAINT [DF_TBEDI_XML_TEMPLATE_ITEMS_ORDER_KEY]
GO
ALTER TABLE [dbo].[TBMT_FUNCTIONS] DROP CONSTRAINT [DF_TBMT_FUNCTIONS_ADDED_WHEN]
GO
ALTER TABLE [dbo].[TBMT_FUNCTIONS] DROP CONSTRAINT [DF_TBMT_FUNCTIONS_ADDED_WHO]
GO
ALTER TABLE [dbo].[TBMT_FUNCTIONS] DROP CONSTRAINT [DF_TBMT_FUNCTIONS_ACTIVE]
GO
ALTER TABLE [dbo].[TBMT_CONFIG] DROP CONSTRAINT [DF_TBMT_CONFIG_ADDED_WHEN]
GO
ALTER TABLE [dbo].[TBMT_CONFIG] DROP CONSTRAINT [DF_TBMT_CONFIG_ADDED_WHO]
GO
ALTER TABLE [dbo].[TBMT_CONFIG] DROP CONSTRAINT [DF_TBMT_CONFIG_ACTIVE]
GO
/****** Object:  Table [dbo].[TBEDI_XML_TYPES]    Script Date: 26.11.2021 16:07:58 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[TBEDI_XML_TYPES]') AND type in (N'U'))
DROP TABLE [dbo].[TBEDI_XML_TYPES]
GO
/****** Object:  Table [dbo].[TBEDI_XML_TEMPLATES]    Script Date: 26.11.2021 16:07:58 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[TBEDI_XML_TEMPLATES]') AND type in (N'U'))
DROP TABLE [dbo].[TBEDI_XML_TEMPLATES]
GO
/****** Object:  Table [dbo].[TBEDI_XML_TABLES]    Script Date: 26.11.2021 16:07:58 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[TBEDI_XML_TABLES]') AND type in (N'U'))
DROP TABLE [dbo].[TBEDI_XML_TABLES]
GO
/****** Object:  Table [dbo].[TBMT_MAPPING_ENTITIES]    Script Date: 26.11.2021 16:07:58 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[TBMT_MAPPING_ENTITIES]') AND type in (N'U'))
DROP TABLE [dbo].[TBMT_MAPPING_ENTITIES]
GO
/****** Object:  Table [dbo].[TBMT_MAPPING_CONFIG]    Script Date: 26.11.2021 16:07:58 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[TBMT_MAPPING_CONFIG]') AND type in (N'U'))
DROP TABLE [dbo].[TBMT_MAPPING_CONFIG]
GO
/****** Object:  Table [dbo].[TBMT_MANDATORS]    Script Date: 26.11.2021 16:07:58 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[TBMT_MANDATORS]') AND type in (N'U'))
DROP TABLE [dbo].[TBMT_MANDATORS]
GO
/****** Object:  Table [dbo].[TBEDI_XML_TEMPLATE_ITEMS]    Script Date: 26.11.2021 16:07:58 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[TBEDI_XML_TEMPLATE_ITEMS]') AND type in (N'U'))
DROP TABLE [dbo].[TBEDI_XML_TEMPLATE_ITEMS]
GO
/****** Object:  Table [dbo].[TBMT_FUNCTIONS]    Script Date: 26.11.2021 16:07:58 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[TBMT_FUNCTIONS]') AND type in (N'U'))
DROP TABLE [dbo].[TBMT_FUNCTIONS]
GO
/****** Object:  Table [dbo].[TBMT_CONFIG]    Script Date: 26.11.2021 16:07:58 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[TBMT_CONFIG]') AND type in (N'U'))
DROP TABLE [dbo].[TBMT_CONFIG]
GO
/****** Object:  Table [dbo].[TBMT_CONFIG]    Script Date: 26.11.2021 16:07:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TBMT_CONFIG](
	[GUID] [int] IDENTITY(1,1) NOT NULL,
	[KEY] [nvarchar](100) NOT NULL,
	[VALUE] [nvarchar](500) NOT NULL,
	[ACTIVE] [bit] NOT NULL,
	[COMMENT] [nvarchar](100) NULL,
	[ADDED_WHO] [nvarchar](50) NOT NULL,
	[ADDED_WHEN] [datetime] NULL,
	[CHANGED_WHO] [nvarchar](50) NULL,
	[CHANGED_WHEN] [datetime] NULL,
 CONSTRAINT [PK_TBMT_CONFIG] 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
/****** Object:  Table [dbo].[TBMT_FUNCTIONS]    Script Date: 26.11.2021 16:07:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TBMT_FUNCTIONS](
	[GUID] [int] IDENTITY(1,1) NOT NULL,
	[NAME] [nvarchar](max) NOT NULL,
	[DESCRIPTION] [nvarchar](max) NOT NULL,
	[PARAMETERS] [nvarchar](max) NULL,
	[ACTIVE] [bit] NOT NULL,
	[COMMENT] [nvarchar](100) NULL,
	[ADDED_WHO] [nvarchar](50) NOT NULL,
	[ADDED_WHEN] [datetime] NULL,
	[CHANGED_WHO] [nvarchar](50) NULL,
	[CHANGED_WHEN] [datetime] NULL,
 CONSTRAINT [PK__TBEDI_XM__15B69B8E0E5FF7EC] 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] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[TBEDI_XML_TEMPLATE_ITEMS]    Script Date: 26.11.2021 16:07:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TBEDI_XML_TEMPLATE_ITEMS](
	[GUID] [int] IDENTITY(1,1) NOT NULL,
	[ORDER_KEY] [int] NOT NULL,
	[XML_NAME] [nvarchar](50) NOT NULL,
	[XML_TABLE_ID] [int] NOT NULL,
	[XML_TYPE_ID] [int] NOT NULL,
	[IS_READ_ONLY] [bit] NOT NULL,
	[IS_VISIBLE] [bit] NOT NULL,
	[IS_REQUIRED] [bit] NOT NULL,
	[IS_VIRTUAL] [bit] NOT NULL,
	[FUNCTION_ID] [int] NULL,
	[FUNCTION_PARAMETERS] [nvarchar](max) NULL,
	[ACTIVE] [bit] NOT NULL,
	[COMMENT] [nvarchar](100) NULL,
	[ADDED_WHO] [nvarchar](50) NOT NULL,
	[ADDED_WHEN] [datetime] NULL,
	[CHANGED_WHO] [nvarchar](50) NULL,
	[CHANGED_WHEN] [datetime] NULL,
 CONSTRAINT [PK__TBEDI_XM__15B69B8E6125D501] 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] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[TBMT_MANDATORS]    Script Date: 26.11.2021 16:07:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TBMT_MANDATORS](
	[GUID] [int] IDENTITY(1,1) NOT NULL,
	[NAME] [nvarchar](50) NULL,
	[ORDER_KEY] [int] NULL,
	[ACTIVE] [bit] NOT NULL,
	[COMMENT] [nvarchar](100) NULL,
	[ADDED_WHO] [nvarchar](50) NULL,
	[ADDED_WHEN] [datetime] NULL,
	[CHANGED_WHO] [nvarchar](50) NULL,
	[CHANGED_WHEN] [datetime] NULL,
 CONSTRAINT [PK_TBMT_MANDATORS] 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
/****** Object:  Table [dbo].[TBMT_MAPPING_CONFIG]    Script Date: 26.11.2021 16:07:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TBMT_MAPPING_CONFIG](
	[GUID] [int] IDENTITY(1,1) NOT NULL,
	[ORDER_KEY] [int] NOT NULL,
	[SOURCE_ENTITY_ID] [int] NOT NULL,
	[SOURCE_REGEX] [nvarchar](100) NOT NULL,
	[DESTINATION_ENTITY_ID] [int] NOT NULL,
	[DESTINATION_VALUE] [nvarchar](100) NOT NULL,
	[ACTIVE] [bit] NOT NULL,
	[COMMENT] [nvarchar](100) NULL,
	[ADDED_WHO] [nvarchar](50) NOT NULL,
	[ADDED_WHEN] [datetime] NULL,
	[CHANGED_WHO] [nvarchar](50) NULL,
	[CHANGED_WHEN] [nchar](10) NULL,
 CONSTRAINT [PK_TBMT_MAPPING_CONFIG] 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
/****** Object:  Table [dbo].[TBMT_MAPPING_ENTITIES]    Script Date: 26.11.2021 16:07:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TBMT_MAPPING_ENTITIES](
	[GUID] [int] IDENTITY(1,1) NOT NULL,
	[NAME] [nvarchar](100) NULL,
	[ITEM_ID] [int] NULL,
	[ACTIVE] [bit] NOT NULL,
	[COMMENT] [nvarchar](100) NULL,
	[ADDED_WHO] [nvarchar](50) NOT NULL,
	[ADDED_WHEN] [datetime] NULL,
	[CHANGED_WHO] [nvarchar](50) NULL,
	[CHANGED_WHEN] [datetime] NULL,
 CONSTRAINT [PK_TBMT_MAPPING_ENTITIES] 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
/****** Object:  Table [dbo].[TBEDI_XML_TABLES]    Script Date: 26.11.2021 16:07:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TBEDI_XML_TABLES](
	[GUID] [int] IDENTITY(1,1) NOT NULL,
	[NAME] [nvarchar](max) NOT NULL,
	[TEMPLATE_ID] [int] NOT NULL,
	[IS_HEAD] [bit] NOT NULL,
	[ACTIVE] [bit] NOT NULL,
	[COMMENT] [nvarchar](100) NULL,
	[ADDED_WHO] [nvarchar](50) NOT NULL,
	[ADDED_WHEN] [datetime] NULL,
	[CHANGED_WHO] [nvarchar](50) NULL,
	[CHANGED_WHEN] [datetime] NULL,
 CONSTRAINT [PK__TBEDI_XM__15B69B8E6F74D014] 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] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[TBEDI_XML_TEMPLATES]    Script Date: 26.11.2021 16:07:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TBEDI_XML_TEMPLATES](
	[GUID] [int] IDENTITY(1,1) NOT NULL,
	[NAME] [nvarchar](20) NOT NULL,
	[DESCRIPTION] [nvarchar](max) NULL,
	[FILE_NAME] [nvarchar](100) NULL,
	[IS_IMPORT] [bit] NULL,
	[ACTIVE] [bit] NOT NULL,
	[COMMENT] [nvarchar](100) NULL,
	[ADDED_WHO] [nvarchar](50) NOT NULL,
	[ADDED_WHEN] [datetime] NULL,
	[CHANGED_WHO] [nvarchar](50) NULL,
	[CHANGED_WHEN] [datetime] NULL,
 CONSTRAINT [PK__TBEDI_XM__15B69B8E8C482F3B] 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] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[TBEDI_XML_TYPES]    Script Date: 26.11.2021 16:07:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TBEDI_XML_TYPES](
	[GUID] [int] IDENTITY(1,1) NOT NULL,
	[NAME] [nvarchar](20) NOT NULL,
	[ACTIVE] [bit] NOT NULL,
	[COMMENT] [nvarchar](100) NULL,
	[ADDED_WHO] [nvarchar](50) NOT NULL,
	[ADDED_WHEN] [datetime] NULL,
	[CHANGED_WHO] [nvarchar](50) NULL,
	[CHANGED_WHEN] [datetime] NULL,
 CONSTRAINT [PK__TBEDI_XM__15B69B8E5B32E7AF] 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
SET IDENTITY_INSERT [dbo].[TBMT_CONFIG] ON 
GO
INSERT [dbo].[TBMT_CONFIG] ([GUID], [KEY], [VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (2, N'YEAR_OVERRIDE', N'2020', 1, NULL, N'DEFAULT', CAST(N'2021-11-22T10:33:12.413' AS DateTime), NULL, NULL)
GO
INSERT [dbo].[TBMT_CONFIG] ([GUID], [KEY], [VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (3, N'WEBSERVICE_BASEURL', N'http://sDD-VMP05-VM01:8181', 1, NULL, N'DEFAULT', CAST(N'2021-11-22T10:34:07.760' AS DateTime), NULL, NULL)
GO
INSERT [dbo].[TBMT_CONFIG] ([GUID], [KEY], [VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (4, N'WEBSERVICE_USERNAME', N'DigitalData', 1, NULL, N'DEFAULT', CAST(N'2021-11-22T10:34:22.930' AS DateTime), NULL, NULL)
GO
INSERT [dbo].[TBMT_CONFIG] ([GUID], [KEY], [VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (5, N'WEBSERIVCE_PASSWORD', N'dd', 1, NULL, N'DEFAULT', CAST(N'2021-11-22T10:34:45.617' AS DateTime), NULL, NULL)
GO
INSERT [dbo].[TBMT_CONFIG] ([GUID], [KEY], [VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (6, N'WEBSERVICE_IMPORT_BASE_PATH', N'\\172.24.12.51\mesonic$\WinLine', 1, NULL, N'DEFAULT', CAST(N'2021-11-22T10:35:09.290' AS DateTime), NULL, NULL)
GO
INSERT [dbo].[TBMT_CONFIG] ([GUID], [KEY], [VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (8, N'WEBSERVICE_IMPORT_RELATIVE_PATH', N'', 1, NULL, N'DEFAULT', CAST(N'2021-11-22T10:35:32.977' AS DateTime), NULL, NULL)
GO
INSERT [dbo].[TBMT_CONFIG] ([GUID], [KEY], [VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (10, N'INPUT_DIRECTORY', N'P:\Projekte DIGITAL DATA\Schaum\mesonic Projekt\Werks EDI Import\Input', 1, NULL, N'DEFAULT', CAST(N'2021-11-22T10:37:16.697' AS DateTime), NULL, NULL)
GO
INSERT [dbo].[TBMT_CONFIG] ([GUID], [KEY], [VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (11, N'OUTPUT_DIRECTORY', N'', 1, NULL, N'DEFAULT', CAST(N'2021-11-22T10:37:22.447' AS DateTime), NULL, NULL)
GO
INSERT [dbo].[TBMT_CONFIG] ([GUID], [KEY], [VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (12, N'TEMPLATE_DIRECTORY', N'P:\Projekte DIGITAL DATA\Schaum\mesonic Projekt\Werks EDI Import\Schemata', 1, NULL, N'DEFAULT', CAST(N'2021-11-22T10:37:48.697' AS DateTime), NULL, NULL)
GO
SET IDENTITY_INSERT [dbo].[TBMT_CONFIG] OFF
GO
SET IDENTITY_INSERT [dbo].[TBMT_FUNCTIONS] ON 
GO
INSERT [dbo].[TBMT_FUNCTIONS] ([GUID], [NAME], [DESCRIPTION], [PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (1, N'GLN', N'Finds an WinLine Account Number by GLN', NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBMT_FUNCTIONS] ([GUID], [NAME], [DESCRIPTION], [PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (2, N'EAN', N'Finds an WinLine Article Number by EAN', NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBMT_FUNCTIONS] ([GUID], [NAME], [DESCRIPTION], [PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (3, N'SQL', N'Finds a Value by SQL Query', N'Query', 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
SET IDENTITY_INSERT [dbo].[TBMT_FUNCTIONS] OFF
GO
SET IDENTITY_INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ON 
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (1, 0, N'BELEGKEY', 1, 1, 0, 0, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (2, 0, N'Fakt_Kontonummer', 1, 1, 0, 1, 0, 0, 1, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (3, 0, N'Laufnummer', 1, 1, 0, 0, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (4, 0, N'Bestellt_von', 1, 1, 0, 1, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (5, 0, N'Lief_Kontonummer', 1, 1, 0, 1, 0, 0, 1, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (6, 0, N'Lief_Name', 1, 1, 0, 1, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (7, 0, N'Lief_Strasse', 1, 1, 0, 1, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (8, 0, N'Lief_PLZ', 1, 1, 0, 1, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (9, 0, N'Lief_Ort', 1, 1, 0, 1, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (10, 0, N'Belegart', 1, 2, 0, 1, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, CAST(N'2021-11-23T13:26:49.413' AS DateTime))
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (11, 0, N'Datum_Auftrag-Bestellung', 1, 3, 0, 1, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (12, 0, N'Auftrags-Bestellnummer', 1, 1, 0, 1, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (13, 0, N'Leistungsdatum', 1, 3, 0, 1, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (14, 0, N'Infotext', 1, 1, 0, 0, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (15, 0, N'BELEGKEY', 2, 1, 0, 0, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (16, 1, N'Zeilennummer', 2, 1, 0, 1, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (17, 0, N'Datentyp', 2, 2, 0, 0, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (18, 2, N'Artikelnummer', 2, 1, 0, 1, 0, 0, 2, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (19, 3, N'Bezeichnung', 2, 1, 0, 1, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (20, 0, N'Lieferantenartikelnummer', 2, 1, 0, 1, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (21, 0, N'Menge_bestellt', 2, 5, 0, 1, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (22, 0, N'Menge_geliefert', 2, 5, 0, 1, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (23, 0, N'Colli', 2, 1, 0, 1, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (24, 0, N'Einzelpreis', 2, 5, 0, 1, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (25, 0, N'Zeilenrabatt1', 2, 5, 0, 0, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (26, 0, N'Zeilenrabatt2', 2, 5, 0, 0, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (27, 0, N'Zeilenrabatt3', 2, 5, 0, 0, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (28, 0, N'Zeilenrabatt4', 2, 5, 0, 0, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (29, 0, N'Umsatzsteuerprozent_Zeile', 2, 2, 0, 0, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (30, 0, N'EDI_Infotext', 2, 1, 0, 0, 0, 0, NULL, NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (31, 0, N'Lagerstand', 2, 1, 0, 0, 0, 1, 3, N'SELECT (c008 - c009) FROM [CWLDATEN_SIVT].[dbo].[v021] WHERE c002 = ''{#FIELD#Artikelnummer}'' AND MESOCOMP = ''{#CONST#MESOCOMP}'' AND MESOYEAR = {#CONST#MESOYEAR}', 1, NULL, N'DEFAULT', CAST(N'2021-11-23T14:00:35.573' AS DateTime), NULL, CAST(N'2021-11-23T16:05:09.667' AS DateTime))
GO
INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID], [ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (32, 0, N'EinheitProPalette', 2, 1, 0, 0, 0, 1, 3, N'SELECT TRY_CONVERT(float, ISNULL(c208, 0)) FROM [CWLDATEN_SIVT].[dbo].[v021] WHERE c002 = ''{#FIELD#Artikelnummer}'' AND MESOCOMP = ''{#CONST#MESOCOMP}'' AND MESOYEAR = {#CONST#MESOYEAR}', 1, NULL, N'DEFAULT', CAST(N'2021-11-23T15:41:26.263' AS DateTime), NULL, CAST(N'2021-11-23T15:42:23.123' AS DateTime))
GO
SET IDENTITY_INSERT [dbo].[TBEDI_XML_TEMPLATE_ITEMS] OFF
GO
SET IDENTITY_INSERT [dbo].[TBMT_MANDATORS] ON 
GO
INSERT [dbo].[TBMT_MANDATORS] ([GUID], [NAME], [ORDER_KEY], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (1, N'SHGT', 1, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBMT_MANDATORS] ([GUID], [NAME], [ORDER_KEY], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (2, N'SIVT', 2, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
SET IDENTITY_INSERT [dbo].[TBMT_MANDATORS] OFF
GO
SET IDENTITY_INSERT [dbo].[TBMT_MAPPING_CONFIG] ON 
GO
INSERT [dbo].[TBMT_MAPPING_CONFIG] ([GUID], [ORDER_KEY], [SOURCE_ENTITY_ID], [SOURCE_REGEX], [DESTINATION_ENTITY_ID], [DESTINATION_VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (2, 1, 2, N'^R[a-zA-Z0-9\-_\s]+$', 1, N'SHGT', 1, NULL, N'DigitalData', NULL, NULL, N'Nov 26 202')
GO
INSERT [dbo].[TBMT_MAPPING_CONFIG] ([GUID], [ORDER_KEY], [SOURCE_ENTITY_ID], [SOURCE_REGEX], [DESTINATION_ENTITY_ID], [DESTINATION_VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (3, 2, 2, N'^R[a-zA-Z0-9\-_\s]+$', 3, N'1', 1, NULL, N'DigitalData', NULL, NULL, N'Nov 26 202')
GO
INSERT [dbo].[TBMT_MAPPING_CONFIG] ([GUID], [ORDER_KEY], [SOURCE_ENTITY_ID], [SOURCE_REGEX], [DESTINATION_ENTITY_ID], [DESTINATION_VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (5, 3, 2, N'^ABN-[a-zA-Z0-9\-_\s]+$', 1, N'SIVT', 1, NULL, N'DigitalData', NULL, NULL, N'Nov 26 202')
GO
INSERT [dbo].[TBMT_MAPPING_CONFIG] ([GUID], [ORDER_KEY], [SOURCE_ENTITY_ID], [SOURCE_REGEX], [DESTINATION_ENTITY_ID], [DESTINATION_VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (6, 4, 2, N'^ABN-[a-zA-Z0-9\-_\s]+$', 3, N'100', 1, NULL, N'DigitalData', CAST(N'2021-11-23T13:30:15.197' AS DateTime), NULL, N'Nov 26 202')
GO
INSERT [dbo].[TBMT_MAPPING_CONFIG] ([GUID], [ORDER_KEY], [SOURCE_ENTITY_ID], [SOURCE_REGEX], [DESTINATION_ENTITY_ID], [DESTINATION_VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (7, 5, 2, N'^HAU-[a-zA-Z0-9\-_\s]+$', 1, N'SIVT', 1, NULL, N'DigitalData', CAST(N'2021-11-26T13:40:10.130' AS DateTime), NULL, N'Nov 26 202')
GO
INSERT [dbo].[TBMT_MAPPING_CONFIG] ([GUID], [ORDER_KEY], [SOURCE_ENTITY_ID], [SOURCE_REGEX], [DESTINATION_ENTITY_ID], [DESTINATION_VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (8, 6, 2, N'^HAU-[a-zA-Z0-9\-_\s]+$', 3, N'101', 1, NULL, N'DigitalData', CAST(N'2021-11-26T13:40:23.803' AS DateTime), NULL, N'Nov 26 202')
GO
INSERT [dbo].[TBMT_MAPPING_CONFIG] ([GUID], [ORDER_KEY], [SOURCE_ENTITY_ID], [SOURCE_REGEX], [DESTINATION_ENTITY_ID], [DESTINATION_VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (11, 7, 2, N'^SCHI-[a-zA-Z0-9\-_\s]+$', 1, N'SIVT', 1, NULL, N'DigitalData', CAST(N'2021-11-26T13:41:22.587' AS DateTime), NULL, N'Nov 26 202')
GO
INSERT [dbo].[TBMT_MAPPING_CONFIG] ([GUID], [ORDER_KEY], [SOURCE_ENTITY_ID], [SOURCE_REGEX], [DESTINATION_ENTITY_ID], [DESTINATION_VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (12, 8, 2, N'^SCHI-[a-zA-Z0-9\-_\s]+$', 3, N'102', 1, NULL, N'DigitalData', CAST(N'2021-11-26T13:41:35.943' AS DateTime), NULL, N'Nov 26 202')
GO
INSERT [dbo].[TBMT_MAPPING_CONFIG] ([GUID], [ORDER_KEY], [SOURCE_ENTITY_ID], [SOURCE_REGEX], [DESTINATION_ENTITY_ID], [DESTINATION_VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (13, 9, 2, N'^FSC-[a-zA-Z0-9\-_\s]+$', 1, N'SIVT', 1, NULL, N'DigitalData', CAST(N'2021-11-26T13:42:05.040' AS DateTime), NULL, N'Nov 26 202')
GO
INSERT [dbo].[TBMT_MAPPING_CONFIG] ([GUID], [ORDER_KEY], [SOURCE_ENTITY_ID], [SOURCE_REGEX], [DESTINATION_ENTITY_ID], [DESTINATION_VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (15, 10, 2, N'^FSC-[a-zA-Z0-9\-_\s]+$', 3, N'103', 1, NULL, N'DigitalData', CAST(N'2021-11-26T13:42:18.227' AS DateTime), NULL, N'Nov 26 202')
GO
INSERT [dbo].[TBMT_MAPPING_CONFIG] ([GUID], [ORDER_KEY], [SOURCE_ENTITY_ID], [SOURCE_REGEX], [DESTINATION_ENTITY_ID], [DESTINATION_VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (16, 11, 2, N'^HEL-[a-zA-Z0-9\-_\s]+$', 1, N'SIVT', 1, NULL, N'DigitalData', CAST(N'2021-11-26T13:43:12.260' AS DateTime), NULL, N'Nov 26 202')
GO
INSERT [dbo].[TBMT_MAPPING_CONFIG] ([GUID], [ORDER_KEY], [SOURCE_ENTITY_ID], [SOURCE_REGEX], [DESTINATION_ENTITY_ID], [DESTINATION_VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (17, 12, 2, N'^HEL-[a-zA-Z0-9\-_\s]+$', 3, N'104', 1, NULL, N'DigitalData', CAST(N'2021-11-26T13:43:21.867' AS DateTime), NULL, N'Nov 26 202')
GO
INSERT [dbo].[TBMT_MAPPING_CONFIG] ([GUID], [ORDER_KEY], [SOURCE_ENTITY_ID], [SOURCE_REGEX], [DESTINATION_ENTITY_ID], [DESTINATION_VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (19, 13, 2, N'^NIE-[a-zA-Z0-9\-_\s]+$', 1, N'SIVT', 1, NULL, N'DigitalData', CAST(N'2021-11-26T13:43:54.493' AS DateTime), NULL, N'Nov 26 202')
GO
INSERT [dbo].[TBMT_MAPPING_CONFIG] ([GUID], [ORDER_KEY], [SOURCE_ENTITY_ID], [SOURCE_REGEX], [DESTINATION_ENTITY_ID], [DESTINATION_VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (20, 14, 2, N'^NIE-[a-zA-Z0-9\-_\s]+$', 3, N'106', 1, NULL, N'DigitalData', CAST(N'2021-11-26T13:44:07.993' AS DateTime), NULL, N'Nov 26 202')
GO
INSERT [dbo].[TBMT_MAPPING_CONFIG] ([GUID], [ORDER_KEY], [SOURCE_ENTITY_ID], [SOURCE_REGEX], [DESTINATION_ENTITY_ID], [DESTINATION_VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (21, 15, 2, N'^WAL-[a-zA-Z0-9\-_\s]+$', 1, N'SIVT', 1, NULL, N'DigitalData', CAST(N'2021-11-26T13:45:02.557' AS DateTime), NULL, N'Nov 26 202')
GO
INSERT [dbo].[TBMT_MAPPING_CONFIG] ([GUID], [ORDER_KEY], [SOURCE_ENTITY_ID], [SOURCE_REGEX], [DESTINATION_ENTITY_ID], [DESTINATION_VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (22, 16, 2, N'^WAL-[a-zA-Z0-9\-_\s]+$', 3, N'107', 1, NULL, N'DigitalData', CAST(N'2021-11-26T13:45:14.463' AS DateTime), NULL, N'Nov 26 202')
GO
INSERT [dbo].[TBMT_MAPPING_CONFIG] ([GUID], [ORDER_KEY], [SOURCE_ENTITY_ID], [SOURCE_REGEX], [DESTINATION_ENTITY_ID], [DESTINATION_VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (23, 17, 2, N'^HKL-[a-zA-Z0-9\-_\s]+$', 1, N'SIVT', 1, NULL, N'DigitalData', CAST(N'2021-11-26T13:45:36.150' AS DateTime), NULL, N'Nov 26 202')
GO
INSERT [dbo].[TBMT_MAPPING_CONFIG] ([GUID], [ORDER_KEY], [SOURCE_ENTITY_ID], [SOURCE_REGEX], [DESTINATION_ENTITY_ID], [DESTINATION_VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (24, 18, 2, N'^HKL-[a-zA-Z0-9\-_\s]+$', 3, N'108', 1, NULL, N'DigitalData', CAST(N'2021-11-26T13:45:46.430' AS DateTime), NULL, N'Nov 26 202')
GO
INSERT [dbo].[TBMT_MAPPING_CONFIG] ([GUID], [ORDER_KEY], [SOURCE_ENTITY_ID], [SOURCE_REGEX], [DESTINATION_ENTITY_ID], [DESTINATION_VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (25, 19, 2, N'^FIN-[a-zA-Z0-9\-_\s]+$', 1, N'SIVT', 1, NULL, N'DigitalData', CAST(N'2021-11-26T13:46:14.730' AS DateTime), NULL, N'Nov 26 202')
GO
INSERT [dbo].[TBMT_MAPPING_CONFIG] ([GUID], [ORDER_KEY], [SOURCE_ENTITY_ID], [SOURCE_REGEX], [DESTINATION_ENTITY_ID], [DESTINATION_VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (26, 20, 2, N'^FIN-[a-zA-Z0-9\-_\s]+$', 3, N'109', 1, NULL, N'DigitalData', CAST(N'2021-11-26T13:46:25.650' AS DateTime), NULL, N'Nov 26 202')
GO
INSERT [dbo].[TBMT_MAPPING_CONFIG] ([GUID], [ORDER_KEY], [SOURCE_ENTITY_ID], [SOURCE_REGEX], [DESTINATION_ENTITY_ID], [DESTINATION_VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (27, 21, 2, N'^ETH-[a-zA-Z0-9\-_\s]+$', 1, N'SIVT', 1, NULL, N'DigitalData', CAST(N'2021-11-26T13:47:34.057' AS DateTime), NULL, N'Nov 26 202')
GO
INSERT [dbo].[TBMT_MAPPING_CONFIG] ([GUID], [ORDER_KEY], [SOURCE_ENTITY_ID], [SOURCE_REGEX], [DESTINATION_ENTITY_ID], [DESTINATION_VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (28, 22, 2, N'^ETH-[a-zA-Z0-9\-_\s]+$', 3, N'110', 1, NULL, N'DigitalData', CAST(N'2021-11-26T13:47:46.963' AS DateTime), NULL, N'Nov 26 202')
GO
INSERT [dbo].[TBMT_MAPPING_CONFIG] ([GUID], [ORDER_KEY], [SOURCE_ENTITY_ID], [SOURCE_REGEX], [DESTINATION_ENTITY_ID], [DESTINATION_VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (29, 23, 2, N'^BRI-[a-zA-Z0-9\-_\s]+$', 1, N'SIVT', 1, NULL, N'DigitalData', CAST(N'2021-11-26T13:48:36.667' AS DateTime), NULL, N'Nov 26 202')
GO
INSERT [dbo].[TBMT_MAPPING_CONFIG] ([GUID], [ORDER_KEY], [SOURCE_ENTITY_ID], [SOURCE_REGEX], [DESTINATION_ENTITY_ID], [DESTINATION_VALUE], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (30, 24, 2, N'^BRI-[a-zA-Z0-9\-_\s]+$', 3, N'111', 1, NULL, N'DigitalData', CAST(N'2021-11-26T13:49:00.463' AS DateTime), NULL, N'Nov 26 202')
GO
SET IDENTITY_INSERT [dbo].[TBMT_MAPPING_CONFIG] OFF
GO
SET IDENTITY_INSERT [dbo].[TBMT_MAPPING_ENTITIES] ON 
GO
INSERT [dbo].[TBMT_MAPPING_ENTITIES] ([GUID], [NAME], [ITEM_ID], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (1, N'MANDATOR', NULL, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBMT_MAPPING_ENTITIES] ([GUID], [NAME], [ITEM_ID], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (2, N'ARTICLE', 18, 1, NULL, N'DEFAULT', NULL, NULL, CAST(N'2021-11-19T12:27:02.443' AS DateTime))
GO
INSERT [dbo].[TBMT_MAPPING_ENTITIES] ([GUID], [NAME], [ITEM_ID], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (3, N'DOCUMENTTYPE', 10, 1, NULL, N'DEFAULT', NULL, NULL, CAST(N'2021-11-19T12:26:06.693' AS DateTime))
GO
SET IDENTITY_INSERT [dbo].[TBMT_MAPPING_ENTITIES] OFF
GO
SET IDENTITY_INSERT [dbo].[TBEDI_XML_TABLES] ON 
GO
INSERT [dbo].[TBEDI_XML_TABLES] ([GUID], [NAME], [TEMPLATE_ID], [IS_HEAD], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (1, N'EXIM-VRG_ordersT025', 1, 1, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TABLES] ([GUID], [NAME], [TEMPLATE_ID], [IS_HEAD], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (2, N'EXIM-VRG_ordersT026', 1, 0, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
SET IDENTITY_INSERT [dbo].[TBEDI_XML_TABLES] OFF
GO
SET IDENTITY_INSERT [dbo].[TBEDI_XML_TEMPLATES] ON 
GO
INSERT [dbo].[TBEDI_XML_TEMPLATES] ([GUID], [NAME], [DESCRIPTION], [FILE_NAME], [IS_IMPORT], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (1, N'EXIM-VRG_orders', N'Schaum EDI Aufträge', N'MESOBelegeEXIM-VRG_orders.xsd', 1, 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
SET IDENTITY_INSERT [dbo].[TBEDI_XML_TEMPLATES] OFF
GO
SET IDENTITY_INSERT [dbo].[TBEDI_XML_TYPES] ON 
GO
INSERT [dbo].[TBEDI_XML_TYPES] ([GUID], [NAME], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (1, N'STRING', 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TYPES] ([GUID], [NAME], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (2, N'INTEGER', 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TYPES] ([GUID], [NAME], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (3, N'DATE', 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TYPES] ([GUID], [NAME], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (4, N'BOOLEAN', 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TYPES] ([GUID], [NAME], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (5, N'DECIMAL', 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TYPES] ([GUID], [NAME], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (6, N'ACCOUNT', 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
INSERT [dbo].[TBEDI_XML_TYPES] ([GUID], [NAME], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (7, N'ARTICLE', 1, NULL, N'DEFAULT', NULL, NULL, NULL)
GO
SET IDENTITY_INSERT [dbo].[TBEDI_XML_TYPES] OFF
GO
ALTER TABLE [dbo].[TBMT_CONFIG] ADD  CONSTRAINT [DF_TBMT_CONFIG_ACTIVE]  DEFAULT ((1)) FOR [ACTIVE]
GO
ALTER TABLE [dbo].[TBMT_CONFIG] ADD  CONSTRAINT [DF_TBMT_CONFIG_ADDED_WHO]  DEFAULT (N'DEFAULT') FOR [ADDED_WHO]
GO
ALTER TABLE [dbo].[TBMT_CONFIG] ADD  CONSTRAINT [DF_TBMT_CONFIG_ADDED_WHEN]  DEFAULT (getdate()) FOR [ADDED_WHEN]
GO
ALTER TABLE [dbo].[TBMT_FUNCTIONS] ADD  CONSTRAINT [DF_TBMT_FUNCTIONS_ACTIVE]  DEFAULT ((1)) FOR [ACTIVE]
GO
ALTER TABLE [dbo].[TBMT_FUNCTIONS] ADD  CONSTRAINT [DF_TBMT_FUNCTIONS_ADDED_WHO]  DEFAULT (N'DEFAULT') FOR [ADDED_WHO]
GO
ALTER TABLE [dbo].[TBMT_FUNCTIONS] ADD  CONSTRAINT [DF_TBMT_FUNCTIONS_ADDED_WHEN]  DEFAULT (getdate()) FOR [ADDED_WHEN]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ADD  CONSTRAINT [DF_TBEDI_XML_TEMPLATE_ITEMS_ORDER_KEY]  DEFAULT ((0)) FOR [ORDER_KEY]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ADD  CONSTRAINT [DF_TBEDI_XML_TEMPLATE_ITEMS_IS_READ_ONLY]  DEFAULT ((0)) FOR [IS_READ_ONLY]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ADD  CONSTRAINT [DF_TBEDI_XML_TEMPLATE_ITEMS_IS_VISIBLE]  DEFAULT ((0)) FOR [IS_VISIBLE]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ADD  CONSTRAINT [DF_TBEDI_XML_TEMPLATE_ITEMS_IS_REQUIRED]  DEFAULT ((0)) FOR [IS_REQUIRED]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ADD  CONSTRAINT [DF_TBEDI_XML_TEMPLATE_ITEMS_IS_VIRTUAL]  DEFAULT ((0)) FOR [IS_VIRTUAL]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ADD  CONSTRAINT [DF_TBEDI_XML_TEMPLATE_ITEMS_ACTIVE]  DEFAULT ((1)) FOR [ACTIVE]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ADD  CONSTRAINT [DF_TBEDI_XML_TEMPLATE_ITEMS_ADDED_WHO]  DEFAULT (N'DEFAULT') FOR [ADDED_WHO]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ADD  CONSTRAINT [DF_TBEDI_XML_TEMPLATE_ITEMS_ADDED_WHEN]  DEFAULT (getdate()) FOR [ADDED_WHEN]
GO
ALTER TABLE [dbo].[TBMT_MANDATORS] ADD  CONSTRAINT [DF_TBMT_MANDATORS_ACTIVE]  DEFAULT ((1)) FOR [ACTIVE]
GO
ALTER TABLE [dbo].[TBMT_MAPPING_CONFIG] ADD  CONSTRAINT [DF_TBEDI_XML_VALUE_MAPPING_ORDER_KEY]  DEFAULT ((0)) FOR [ORDER_KEY]
GO
ALTER TABLE [dbo].[TBMT_MAPPING_CONFIG] ADD  CONSTRAINT [DF_TBMT_MAPPING_CONFIG_ACTIVE]  DEFAULT ((1)) FOR [ACTIVE]
GO
ALTER TABLE [dbo].[TBMT_MAPPING_CONFIG] ADD  CONSTRAINT [DF_TBMT_MAPPING_CONFIG_ADDED_WHO]  DEFAULT (N'DEFAULT') FOR [ADDED_WHO]
GO
ALTER TABLE [dbo].[TBMT_MAPPING_CONFIG] ADD  CONSTRAINT [DF_TBMT_MAPPING_CONFIG_ADDED_WHEN]  DEFAULT (getdate()) FOR [ADDED_WHEN]
GO
ALTER TABLE [dbo].[TBMT_MAPPING_ENTITIES] ADD  CONSTRAINT [DF_TBMT_MAPPING_ENTITIES_ACTIVE]  DEFAULT ((1)) FOR [ACTIVE]
GO
ALTER TABLE [dbo].[TBMT_MAPPING_ENTITIES] ADD  CONSTRAINT [DF_TBMT_MAPPING_ENTITIES_ADDED_WHO]  DEFAULT (N'DEFAULT') FOR [ADDED_WHO]
GO
ALTER TABLE [dbo].[TBMT_MAPPING_ENTITIES] ADD  CONSTRAINT [DF_TBMT_MAPPING_ENTITIES_ADDED_WHEN]  DEFAULT (getdate()) FOR [ADDED_WHEN]
GO
ALTER TABLE [dbo].[TBEDI_XML_TABLES] ADD  CONSTRAINT [DF_TBEDI_XML_NODES_IS_HEAD]  DEFAULT ((0)) FOR [IS_HEAD]
GO
ALTER TABLE [dbo].[TBEDI_XML_TABLES] ADD  CONSTRAINT [DF_TBEDI_XML_TABLES_ACTIVE]  DEFAULT ((1)) FOR [ACTIVE]
GO
ALTER TABLE [dbo].[TBEDI_XML_TABLES] ADD  CONSTRAINT [DF_TBEDI_XML_TABLES_ADDED_WHO]  DEFAULT (N'DEFAULT') FOR [ADDED_WHO]
GO
ALTER TABLE [dbo].[TBEDI_XML_TABLES] ADD  CONSTRAINT [DF_TBEDI_XML_TABLES_ADDED_WHEN]  DEFAULT (getdate()) FOR [ADDED_WHEN]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATES] ADD  CONSTRAINT [DF_TBEDI_XML_TEMPLATES_ACTIVE]  DEFAULT ((1)) FOR [ACTIVE]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATES] ADD  CONSTRAINT [DF_TBEDI_XML_TEMPLATES_ADDED_WHO]  DEFAULT (N'DEFAULT') FOR [ADDED_WHO]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATES] ADD  CONSTRAINT [DF_TBEDI_XML_TEMPLATES_ADDED_WHEN]  DEFAULT (getdate()) FOR [ADDED_WHEN]
GO
ALTER TABLE [dbo].[TBEDI_XML_TYPES] ADD  CONSTRAINT [DF_TBEDI_XML_TYPES_ACTIVE]  DEFAULT ((1)) FOR [ACTIVE]
GO
ALTER TABLE [dbo].[TBEDI_XML_TYPES] ADD  CONSTRAINT [DF_TBEDI_XML_TYPES_ADDED_WHO]  DEFAULT (N'DEFAULT') FOR [ADDED_WHO]
GO
ALTER TABLE [dbo].[TBEDI_XML_TYPES] ADD  CONSTRAINT [DF_TBEDI_XML_TYPES_ADDED_WHEN]  DEFAULT (getdate()) FOR [ADDED_WHEN]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATE_ITEMS]  WITH CHECK ADD  CONSTRAINT [FK_TBEDI_XML_NODES] FOREIGN KEY([XML_TABLE_ID])
REFERENCES [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID])
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATE_ITEMS] CHECK CONSTRAINT [FK_TBEDI_XML_NODES]
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATE_ITEMS]  WITH CHECK ADD  CONSTRAINT [FK_TBEDI_XML_TYPES] FOREIGN KEY([XML_TYPE_ID])
REFERENCES [dbo].[TBEDI_XML_TEMPLATE_ITEMS] ([GUID])
GO
ALTER TABLE [dbo].[TBEDI_XML_TEMPLATE_ITEMS] CHECK CONSTRAINT [FK_TBEDI_XML_TYPES]
GO
