forked from fsprojects/Rezoom.SQL
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathV1.model.sql
More file actions
32 lines (26 loc) · 744 Bytes
/
Copy pathV1.model.sql
File metadata and controls
32 lines (26 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
create table Pictures
( SHA256 binary(32) primary key
, PNGData binary(4000)
);
create table Users
( Id int64 primary key autoincrement
, Name string(80)
, Email string(254)
, ProfilePictureSHA256 binary(32) null references Pictures(SHA256)
, Created datetime
, RandomId guid
);
create table Articles
( Id int64 primary key autoincrement
, AuthorId int64 references Users(Id)
, ArticleTitle string(80)
, ArticleText string(4000)
);
create index IX_Articles_AuthorId on Articles(AuthorId);
create table ArticleComments
( Id int64 primary key autoincrement
, ArticleId int64 references Articles(Id)
, AuthorId int64 references Users(Id)
, CommentText string(512)
);
create index IX_ArticleComments_AuthorId on ArticleComments(AuthorId);