source: src/FinkiChattery/FinkiChattery.Database/dbo/Tables/Answer.sql@ cabaa79

dev
Last change on this file since cabaa79 was e6a6d9a, checked in by Стојков Марко <mst@…>, 3 years ago

Initialized FinkiChattery project

  • Property mode set to 100644
File size: 846 bytes
RevLine 
[e6a6d9a]1CREATE TABLE [dbo].[Answer] (
2 [Id] BIGINT IDENTITY (1, 1) NOT NULL,
3 [Uid] UNIQUEIDENTIFIER NOT NULL,
4 [Text] NVARCHAR (1) NOT NULL,
5 [QuestionFk] BIGINT NOT NULL,
6 [StudentFk] BIGINT NOT NULL,
7 [CorrectAnswer] BIT NOT NULL,
8 [CreatedOn] SMALLDATETIME NOT NULL,
9 CONSTRAINT [PK_Answer] PRIMARY KEY CLUSTERED ([Id] ASC),
10 CONSTRAINT [FK_Answer_Question_QuestionFk] FOREIGN KEY ([QuestionFk]) REFERENCES [dbo].[Question] ([Id]),
11 CONSTRAINT [FK_Answer_Student_StudentFk] FOREIGN KEY ([StudentFk]) REFERENCES [dbo].[Student] ([Id])
12);
13
14
15GO
16CREATE NONCLUSTERED INDEX [IX_Answer_QuestionFk]
17 ON [dbo].[Answer]([QuestionFk] ASC);
18
19
20GO
21CREATE NONCLUSTERED INDEX [IX_Answer_StudentFk]
22 ON [dbo].[Answer]([StudentFk] ASC);
23
Note: See TracBrowser for help on using the repository browser.