· 2 years ago · Apr 03, 2023, 09:20 PM
1USE [MERCEDES_ENTITY]
2GO
3ALTER TABLE [dbo].[IntegratorMappingDetails] DROP CONSTRAINT [FK_IntegratorMappingDetails_IntegratorMappings]
4GO
5/****** Object: Table [dbo].[IntegratorMappingDetails] Script Date: 4/3/2023 3:18:37 PM ******/
6IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[IntegratorMappingDetails]') AND type in (N'U'))
7DROP TABLE [dbo].[IntegratorMappingDetails]
8GO
9/****** Object: Table [dbo].[IntegratorMappingDetails] Script Date: 4/3/2023 3:18:37 PM ******/
10SET ANSI_NULLS ON
11GO
12SET QUOTED_IDENTIFIER ON
13GO
14CREATE TABLE [dbo].[IntegratorMappingDetails](
15 [integrator_mapping_detail_id] [int] NOT NULL,
16 [integrator_mapping_id] [int] NOT NULL,
17 [text_origin] [varchar](100) NOT NULL,
18 [text_destination] [varchar](100) NOT NULL,
19 [format] [varchar](50) NULL,
20 CONSTRAINT [PK_IntegratorMappingDetails] PRIMARY KEY CLUSTERED
21(
22 [integrator_mapping_detail_id] ASC,
23 [integrator_mapping_id] ASC,
24 [text_origin] ASC,
25 [text_destination] ASC
26)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
27) ON [PRIMARY]
28GO
29INSERT [dbo].[IntegratorMappingDetails] ([integrator_mapping_detail_id], [integrator_mapping_id], [text_origin], [text_destination], [format]) VALUES (1, 1, N'business_name', N'business_name_test', NULL)
30GO
31INSERT [dbo].[IntegratorMappingDetails] ([integrator_mapping_detail_id], [integrator_mapping_id], [text_origin], [text_destination], [format]) VALUES (2, 1, N'commercial_name', N'commercial_name_test', NULL)
32GO
33INSERT [dbo].[IntegratorMappingDetails] ([integrator_mapping_detail_id], [integrator_mapping_id], [text_origin], [text_destination], [format]) VALUES (3, 1, N'country_id', N'country_id_test', NULL)
34GO
35INSERT [dbo].[IntegratorMappingDetails] ([integrator_mapping_detail_id], [integrator_mapping_id], [text_origin], [text_destination], [format]) VALUES (4, 1, N'creation_date', N'creation_date_test', NULL)
36GO
37INSERT [dbo].[IntegratorMappingDetails] ([integrator_mapping_detail_id], [integrator_mapping_id], [text_origin], [text_destination], [format]) VALUES (5, 1, N'economic_sector_id', N'economic_sector_id_test', NULL)
38GO
39INSERT [dbo].[IntegratorMappingDetails] ([integrator_mapping_detail_id], [integrator_mapping_id], [text_origin], [text_destination], [format]) VALUES (6, 1, N'entity_id', N'entity_id_test', NULL)
40GO
41INSERT [dbo].[IntegratorMappingDetails] ([integrator_mapping_detail_id], [integrator_mapping_id], [text_origin], [text_destination], [format]) VALUES (7, 1, N'external_reference', N'external_reference_test', NULL)
42GO
43INSERT [dbo].[IntegratorMappingDetails] ([integrator_mapping_detail_id], [integrator_mapping_id], [text_origin], [text_destination], [format]) VALUES (8, 1, N'fiscal_key_id', N'fiscal_key_id_test', NULL)
44GO
45INSERT [dbo].[IntegratorMappingDetails] ([integrator_mapping_detail_id], [integrator_mapping_id], [text_origin], [text_destination], [format]) VALUES (9, 1, N'fiscal_key_value', N'fiscal_key_value_test', NULL)
46GO
47INSERT [dbo].[IntegratorMappingDetails] ([integrator_mapping_detail_id], [integrator_mapping_id], [text_origin], [text_destination], [format]) VALUES (10, 1, N'status', N'status_test', NULL)
48GO
49ALTER TABLE [dbo].[IntegratorMappingDetails] WITH CHECK ADD CONSTRAINT [FK_IntegratorMappingDetails_IntegratorMappings] FOREIGN KEY([integrator_mapping_id])
50REFERENCES [dbo].[IntegratorMappings] ([integrator_mapping_id])
51GO
52ALTER TABLE [dbo].[IntegratorMappingDetails] CHECK CONSTRAINT [FK_IntegratorMappingDetails_IntegratorMappings]
53GO
54