Y2S1-Database_Design/SQL/individual_creates/21 - dbo.VideoEntry.Table.sql

35 lines
2.2 KiB
MySQL
Raw Normal View History

2020-06-07 21:29:59 +00:00
<EFBFBD><EFBFBD>USE [MediaLibrary]
GO
/****** Object: Table [dbo].[VideoEntry] Script Date: 14/12/2018 00:20:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[VideoEntry](
[VideoID] [int] IDENTITY(1,1) NOT NULL,
[EntryID] [int] NOT NULL,
[EncodeID] [int] NOT NULL,
[FileTypeID] [int] NOT NULL,
[AiredTypeID] [int] NULL,
[VideoFileName] [varchar](255) NOT NULL,
[AiredOn] [datetime] NULL,
[Length] [int] NOT NULL,
PRIMARY KEY CLUSTERED
(
[VideoID] 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
ALTER TABLE [dbo].[VideoEntry] WITH CHECK ADD FOREIGN KEY([AiredTypeID])
REFERENCES [dbo].[AiredTypes] ([AiredTypeID])
GO
ALTER TABLE [dbo].[VideoEntry] WITH CHECK ADD FOREIGN KEY([EncodeID])
REFERENCES [dbo].[VideoEncode] ([EncodeID])
GO
ALTER TABLE [dbo].[VideoEntry] WITH CHECK ADD FOREIGN KEY([EntryID])
REFERENCES [dbo].[MediaEntry] ([EntryID])
GO
ALTER TABLE [dbo].[VideoEntry] WITH CHECK ADD FOREIGN KEY([FileTypeID])
REFERENCES [dbo].[VideoFileTypes] ([FileTypeID])
GO