Advertisement
daxruiz

Untitled

Apr 3rd, 2023
2,437
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 3.55 KB | None | 0 0
  1. USE [MERCEDES_ENTITY]
  2. GO
  3. ALTER TABLE [dbo].[IntegratorMappingDetails] DROP CONSTRAINT [FK_IntegratorMappingDetails_IntegratorMappings]
  4. GO
  5. /****** Object:  Table [dbo].[IntegratorMappingDetails]    Script Date: 4/3/2023 3:18:37 PM ******/
  6. IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[IntegratorMappingDetails]') AND TYPE IN (N'U'))
  7. DROP TABLE [dbo].[IntegratorMappingDetails]
  8. GO
  9. /****** Object:  Table [dbo].[IntegratorMappingDetails]    Script Date: 4/3/2023 3:18:37 PM ******/
  10. SET ANSI_NULLS ON
  11. GO
  12. SET QUOTED_IDENTIFIER ON
  13. GO
  14. CREATE 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]
  28. GO
  29. INSERT [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)
  30. GO
  31. INSERT [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)
  32. GO
  33. INSERT [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)
  34. GO
  35. INSERT [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)
  36. GO
  37. INSERT [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)
  38. GO
  39. INSERT [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)
  40. GO
  41. INSERT [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)
  42. GO
  43. INSERT [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)
  44. GO
  45. INSERT [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)
  46. GO
  47. INSERT [dbo].[IntegratorMappingDetails] ([integrator_mapping_detail_id], [integrator_mapping_id], [text_origin], [text_destination], [format]) VALUES (10, 1, N'status', N'status_test', NULL)
  48. GO
  49. ALTER TABLE [dbo].[IntegratorMappingDetails]  WITH CHECK ADD  CONSTRAINT [FK_IntegratorMappingDetails_IntegratorMappings] FOREIGN KEY([integrator_mapping_id])
  50. REFERENCES [dbo].[IntegratorMappings] ([integrator_mapping_id])
  51. GO
  52. ALTER TABLE [dbo].[IntegratorMappingDetails] CHECK CONSTRAINT [FK_IntegratorMappingDetails_IntegratorMappings]
  53. GO
  54.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement