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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
|
CREATE TABLE accounts (
id numeric(9,0) IDENTITY PRIMARY KEY,
firm_id int NULL,
credit_limit int NULL
)
CREATE TABLE funny_jokes (
id numeric(9,0) IDENTITY PRIMARY KEY,
name varchar(50) NULL
)
CREATE TABLE companies (
id numeric(9,0) IDENTITY PRIMARY KEY,
type varchar(50) NULL,
ruby_type varchar(50) NULL,
firm_id int NULL,
name varchar(50) NULL,
client_of int NULL,
rating int default 1
)
CREATE TABLE topics (
id numeric(9,0) IDENTITY PRIMARY KEY,
title varchar(255) NULL,
author_name varchar(255) NULL,
author_email_address varchar(255) NULL,
written_on datetime NULL,
bonus_time datetime NULL,
last_read datetime NULL,
content varchar(255) NULL,
approved bit default 1,
replies_count int default 0,
parent_id int NULL,
type varchar(50) NULL
)
CREATE TABLE developers (
id numeric(9,0) IDENTITY PRIMARY KEY,
name varchar(100) NULL,
salary int default 70000,
created_at datetime NULL,
updated_at datetime NULL
)
CREATE TABLE projects (
id numeric(9,0) IDENTITY PRIMARY KEY,
name varchar(100) NULL,
type varchar(255) NULL
)
CREATE TABLE developers_projects (
developer_id int NOT NULL,
project_id int NOT NULL,
joined_on datetime NULL,
access_level smallint default 1
)
CREATE TABLE orders (
id numeric(9,0) IDENTITY PRIMARY KEY,
name varchar(100) NULL,
billing_customer_id int NULL,
shipping_customer_id int NULL
)
CREATE TABLE customers (
id numeric(9,0) IDENTITY PRIMARY KEY,
name varchar(100) NULL,
balance int default 0,
address_street varchar(100) NULL,
address_city varchar(100) NULL,
address_country varchar(100) NULL,
gps_location varchar(100) NULL
)
CREATE TABLE movies (
movieid numeric(9,0) IDENTITY PRIMARY KEY,
name varchar(100) NULL
)
CREATE TABLE subscribers (
nick varchar(100) PRIMARY KEY,
name varchar(100) NULL
)
CREATE TABLE booleantests (
id numeric(9,0) IDENTITY PRIMARY KEY,
value int NULL
)
CREATE TABLE auto_id_tests (
auto_id numeric(9,0) IDENTITY PRIMARY KEY,
value int NULL
)
CREATE TABLE entrants (
id numeric(9,0) IDENTITY PRIMARY KEY,
name varchar(255) NOT NULL,
course_id int NOT NULL
)
CREATE TABLE colnametests (
id numeric(9,0) IDENTITY PRIMARY KEY,
[references] int NOT NULL
)
CREATE TABLE mixins (
id numeric(9,0) IDENTITY PRIMARY KEY,
parent_id int NULL,
pos int NULL,
created_at datetime NULL,
updated_at datetime NULL,
lft int NULL,
rgt int NULL,
root_id int NULL,
type varchar(40) NULL
)
CREATE TABLE people (
id numeric(9,0) IDENTITY PRIMARY KEY,
first_name varchar(40) NULL,
lock_version int DEFAULT 0
)
CREATE TABLE readers (
id numeric(9,0) IDENTITY PRIMARY KEY,
post_id int NOT NULL,
person_id int NOT NULL
)
CREATE TABLE binaries (
id numeric(9,0) IDENTITY PRIMARY KEY,
data image NULL
)
CREATE TABLE computers (
id numeric(9,0) IDENTITY PRIMARY KEY,
developer int NOT NULL,
extendedWarranty int NOT NULL
)
CREATE TABLE posts (
id numeric(9,0) IDENTITY PRIMARY KEY,
author_id int NULL,
title varchar(255) NOT NULL,
body varchar(2048) NOT NULL,
type varchar(255) NOT NULL
)
CREATE TABLE comments (
id numeric(9,0) IDENTITY PRIMARY KEY,
post_id int NOT NULL,
body varchar(2048) NOT NULL,
type varchar(255) NOT NULL
)
CREATE TABLE authors (
id numeric(9,0) IDENTITY PRIMARY KEY,
name varchar(255) NOT NULL
)
CREATE TABLE tasks (
id numeric(9,0) IDENTITY PRIMARY KEY,
starting datetime NULL,
ending datetime NULL
)
CREATE TABLE categories (
id numeric(9,0) IDENTITY PRIMARY KEY,
name varchar(255) NOT NULL,
type varchar(255) NOT NULL
)
CREATE TABLE categories_posts (
category_id int NOT NULL,
post_id int NOT NULL
)
CREATE TABLE fk_test_has_pk (
id numeric(9,0) IDENTITY PRIMARY KEY
)
CREATE TABLE fk_test_has_fk (
id numeric(9,0) PRIMARY KEY,
fk_id numeric(9,0) NOT NULL,
FOREIGN KEY (fk_id) REFERENCES fk_test_has_pk(id)
)
CREATE TABLE keyboards (
key_number numeric(9,0) IDENTITY PRIMARY KEY,
name varchar(50) NULL
)
--This table has an altered lock_version column name.
CREATE TABLE legacy_things (
id numeric(9,0) IDENTITY PRIMARY KEY,
tps_report_number int default NULL,
version int default 0
)
CREATE TABLE numeric_data (
id numeric(9,0) IDENTITY PRIMARY KEY,
bank_balance numeric(10,2),
big_bank_balance numeric(15,2),
world_population numeric(10),
my_house_population numeric(2),
decimal_number_with_default numeric(3,2) DEFAULT 2.78
)
CREATE TABLE mixed_case_monkeys (
[monkeyID] numeric(9,0) IDENTITY PRIMARY KEY,
[fleaCount] numeric(9,0)
);
go
|