dev
Last change
on this file since 7146ebb was 7146ebb, checked in by Стојков Марко <mst@…>, 3 years ago |
Ask question endpoint
|
-
Property mode
set to
100644
|
File size:
846 bytes
|
Rev | Line | |
---|
[e6a6d9a] | 1 | CREATE TABLE [dbo].[Answer] (
|
---|
| 2 | [Id] BIGINT IDENTITY (1, 1) NOT NULL,
|
---|
| 3 | [Uid] UNIQUEIDENTIFIER NOT NULL,
|
---|
[7146ebb] | 4 | [Text] NVARCHAR (4000) NOT NULL,
|
---|
[e6a6d9a] | 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 |
|
---|
| 15 | GO
|
---|
| 16 | CREATE NONCLUSTERED INDEX [IX_Answer_QuestionFk]
|
---|
| 17 | ON [dbo].[Answer]([QuestionFk] ASC);
|
---|
| 18 |
|
---|
| 19 |
|
---|
| 20 | GO
|
---|
| 21 | CREATE NONCLUSTERED INDEX [IX_Answer_StudentFk]
|
---|
| 22 | ON [dbo].[Answer]([StudentFk] ASC);
|
---|
| 23 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.