Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
2.2 kB
2
Indexable
Never
CREATE TABLE [dbo].[SCH_Class_Closed_Hour](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[classId] [int] NOT NULL,
	[scheduleDayHourId] [int] NOT NULL,
	[createdDate] [datetime] NOT NULL,
	[updatedDate] [datetime] NOT NULL,
	[createdUserId] [int] NOT NULL,
	[updatedUserId] [int] NOT NULL,
 CONSTRAINT [PK_SCH_Class_Closed_Hour] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)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]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[SCH_Class_Closed_Hour]  WITH CHECK ADD  CONSTRAINT [FK__SCH_Class__class__0662F0A3] FOREIGN KEY([classId])
REFERENCES [dbo].[CMP_Class] ([id])
GO

ALTER TABLE [dbo].[SCH_Class_Closed_Hour] CHECK CONSTRAINT [FK__SCH_Class__class__0662F0A3]
GO

ALTER TABLE [dbo].[SCH_Class_Closed_Hour]  WITH CHECK ADD  CONSTRAINT [FK__SCH_Class__sched__075714DC] FOREIGN KEY([scheduleDayHourId])
REFERENCES [dbo].[SCH_Schedule_Day_Hour] ([id])
GO

ALTER TABLE [dbo].[SCH_Class_Closed_Hour] CHECK CONSTRAINT [FK__SCH_Class__sched__075714DC]
GO

CREATE TABLE [dbo].[SCH_Class_Closed_Day](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[classId] [int] NOT NULL,
	[scheduleDayId] [int] NOT NULL,
	[createdDate] [datetime] NOT NULL,
	[updatedDate] [datetime] NOT NULL,
	[createdUserId] [int] NOT NULL,
	[updatedUserId] [int] NOT NULL,
 CONSTRAINT [PK_SCH_Class_Closed_Day] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)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]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[SCH_Class_Closed_Day]  WITH CHECK ADD  CONSTRAINT [FK__SCH_Class__class__02925FBF] FOREIGN KEY([classId])
REFERENCES [dbo].[CMP_Class] ([id])
GO

ALTER TABLE [dbo].[SCH_Class_Closed_Day] CHECK CONSTRAINT [FK__SCH_Class__class__02925FBF]
GO

ALTER TABLE [dbo].[SCH_Class_Closed_Day]  WITH CHECK ADD  CONSTRAINT [FK__SCH_Class__sched__038683F8] FOREIGN KEY([scheduleDayId])
REFERENCES [dbo].[SCH_Schedule_Day] ([id])
GO

ALTER TABLE [dbo].[SCH_Class_Closed_Day] CHECK CONSTRAINT [FK__SCH_Class__sched__038683F8]
GO
Leave a Comment