USE [site_fuchs] GO ALTER TABLE [dbo].[ocms_properties] DROP CONSTRAINT [FK_ocms_properties_ocms_items] GO ALTER TABLE [dbo].[ocms_properties] DROP CONSTRAINT [DF_ocms_properties_DateModified] GO ALTER TABLE [dbo].[ocms_properties] DROP CONSTRAINT [DF_ocms_properties_DateCreated] GO /****** Object: Table [dbo].[ocms_properties] Script Date: 02.12.2020 21:05:05 ******/ IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ocms_properties]') AND type in (N'U')) DROP TABLE [dbo].[ocms_properties] GO /****** Object: Table [dbo].[ocms_properties] Script Date: 02.12.2020 21:05:06 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[ocms_properties]( [ocms_pid] [bigint] NOT NULL, [ocms_iid] [bigint] NOT NULL, [key] [varchar](50) NULL, [value] [nvarchar](max) NOT NULL, [locale] [varchar](5) NULL, [DateCreated] [datetime] NULL, [DateModified] [datetime] NULL, CONSTRAINT [PK_ocms_properties] PRIMARY KEY CLUSTERED ( [ocms_pid] 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 ALTER AUTHORIZATION ON [dbo].[ocms_properties] TO SCHEMA OWNER GO ALTER TABLE [dbo].[ocms_properties] ADD CONSTRAINT [DF_ocms_properties_DateCreated] DEFAULT (getutcdate()) FOR [DateCreated] GO ALTER TABLE [dbo].[ocms_properties] ADD CONSTRAINT [DF_ocms_properties_DateModified] DEFAULT (getutcdate()) FOR [DateModified] GO ALTER TABLE [dbo].[ocms_properties] WITH CHECK ADD CONSTRAINT [FK_ocms_properties_ocms_items] FOREIGN KEY([ocms_iid]) REFERENCES [dbo].[ocms_items] ([ocms_iid]) ON DELETE CASCADE GO ALTER TABLE [dbo].[ocms_properties] CHECK CONSTRAINT [FK_ocms_properties_ocms_items] GO