-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathtest.migrations.toml
287 lines (246 loc) · 10.1 KB
/
test.migrations.toml
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
# This file is auto-generated by Turbosql.
# It is used to create and apply automatic schema migrations.
# It should be checked into source control.
# Modifying it by hand may be dangerous; see the docs.
migrations_append_only = [
"CREATE TABLE personintegrationtest (rowid INTEGER PRIMARY KEY) STRICT",
"ALTER TABLE personintegrationtest ADD COLUMN field_string TEXT",
"ALTER TABLE personintegrationtest ADD COLUMN field_i64 INTEGER",
"ALTER TABLE personintegrationtest ADD COLUMN field_bool INTEGER",
"ALTER TABLE personintegrationtest ADD COLUMN field_f64 REAL",
"ALTER TABLE personintegrationtest ADD COLUMN field_f32 REAL",
"ALTER TABLE personintegrationtest ADD COLUMN field_u8 INTEGER",
"ALTER TABLE personintegrationtest ADD COLUMN field_i8 INTEGER",
"ALTER TABLE personintegrationtest ADD COLUMN field_u16 INTEGER",
"ALTER TABLE personintegrationtest ADD COLUMN field_i16 INTEGER",
"ALTER TABLE personintegrationtest ADD COLUMN field_u32 INTEGER",
"ALTER TABLE personintegrationtest ADD COLUMN field_i32 INTEGER",
"ALTER TABLE personintegrationtest ADD COLUMN field_blob BLOB",
"ALTER TABLE personintegrationtest ADD COLUMN field_vec_u8 BLOB",
"ALTER TABLE personintegrationtest ADD COLUMN field_array_u8 BLOB",
"ALTER TABLE personintegrationtest ADD COLUMN field_serialize TEXT",
"ALTER TABLE personintegrationtest ADD COLUMN field_string_not_null TEXT NOT NULL DEFAULT 'foo foo'",
"ALTER TABLE personintegrationtest ADD COLUMN field_i64_not_null INTEGER NOT NULL DEFAULT 6",
"ALTER TABLE personintegrationtest ADD COLUMN field_bool_not_null INTEGER NOT NULL DEFAULT false",
"ALTER TABLE personintegrationtest ADD COLUMN field_f64_not_null REAL NOT NULL DEFAULT 1.1",
"ALTER TABLE personintegrationtest ADD COLUMN field_f32_not_null REAL NOT NULL DEFAULT '2.3'",
"ALTER TABLE personintegrationtest ADD COLUMN field_u8_not_null INTEGER NOT NULL DEFAULT -1.2",
"ALTER TABLE personintegrationtest ADD COLUMN field_i8_not_null INTEGER NOT NULL DEFAULT 0",
"ALTER TABLE personintegrationtest ADD COLUMN field_u16_not_null INTEGER NOT NULL DEFAULT 'hello'",
"ALTER TABLE personintegrationtest ADD COLUMN field_i16_not_null INTEGER NOT NULL DEFAULT -1",
"ALTER TABLE personintegrationtest ADD COLUMN field_u32_not_null INTEGER NOT NULL DEFAULT -1",
"ALTER TABLE personintegrationtest ADD COLUMN field_i32_not_null INTEGER NOT NULL DEFAULT -1",
"ALTER TABLE personintegrationtest ADD COLUMN field_blob_not_null BLOB NOT NULL DEFAULT x''",
"ALTER TABLE personintegrationtest ADD COLUMN field_vec_u8_not_null BLOB NOT NULL DEFAULT x'30'",
"ALTER TABLE personintegrationtest ADD COLUMN field_array_u8_not_null BLOB NOT NULL DEFAULT x'0001ff'",
"ALTER TABLE personintegrationtest ADD COLUMN field_serialize_not_null TEXT NOT NULL DEFAULT ''",
"CREATE TABLE nooption (rowid INTEGER PRIMARY KEY) STRICT",
"ALTER TABLE nooption ADD COLUMN e INTEGER NOT NULL DEFAULT 0",
"CREATE TABLE person (rowid INTEGER PRIMARY KEY) STRICT",
"ALTER TABLE person ADD COLUMN name TEXT",
"ALTER TABLE person ADD COLUMN age INTEGER",
"ALTER TABLE person ADD COLUMN image_jpg BLOB",
]
output_generated_schema_for_your_information_do_not_edit = """
CREATE TABLE _turbosql_migrations (
rowid INTEGER PRIMARY KEY,
migration TEXT NOT NULL
) STRICT
CREATE TABLE nooption (
rowid INTEGER PRIMARY KEY,
e INTEGER NOT NULL DEFAULT 0
) STRICT
CREATE TABLE person (
rowid INTEGER PRIMARY KEY,
name TEXT,
age INTEGER,
image_jpg BLOB
) STRICT
CREATE TABLE personintegrationtest (
rowid INTEGER PRIMARY KEY,
field_string TEXT,
field_i64 INTEGER,
field_bool INTEGER,
field_f64 REAL,
field_f32 REAL,
field_u8 INTEGER,
field_i8 INTEGER,
field_u16 INTEGER,
field_i16 INTEGER,
field_u32 INTEGER,
field_i32 INTEGER,
field_blob BLOB,
field_vec_u8 BLOB,
field_array_u8 BLOB,
field_serialize TEXT,
field_string_not_null TEXT NOT NULL DEFAULT 'foo foo',
field_i64_not_null INTEGER NOT NULL DEFAULT 6,
field_bool_not_null INTEGER NOT NULL DEFAULT false,
field_f64_not_null REAL NOT NULL DEFAULT 1.1,
field_f32_not_null REAL NOT NULL DEFAULT '2.3',
field_u8_not_null INTEGER NOT NULL DEFAULT -1.2,
field_i8_not_null INTEGER NOT NULL DEFAULT 0,
field_u16_not_null INTEGER NOT NULL DEFAULT 'hello',
field_i16_not_null INTEGER NOT NULL DEFAULT -1,
field_u32_not_null INTEGER NOT NULL DEFAULT -1,
field_i32_not_null INTEGER NOT NULL DEFAULT -1,
field_blob_not_null BLOB NOT NULL DEFAULT x'',
field_vec_u8_not_null BLOB NOT NULL DEFAULT x'30',
field_array_u8_not_null BLOB NOT NULL DEFAULT x'0001ff',
field_serialize_not_null TEXT NOT NULL DEFAULT ''
) STRICT
"""
[output_generated_tables_do_not_edit.nooption]
name = "nooption"
[[output_generated_tables_do_not_edit.nooption.columns]]
name = "rowid"
rust_type = "Option < i64 >"
sql_type = "INTEGER PRIMARY KEY"
[[output_generated_tables_do_not_edit.nooption.columns]]
name = "e"
rust_type = "u8"
sql_type = "INTEGER NOT NULL"
[output_generated_tables_do_not_edit.person]
name = "person"
[[output_generated_tables_do_not_edit.person.columns]]
name = "rowid"
rust_type = "Option < i64 >"
sql_type = "INTEGER PRIMARY KEY"
[[output_generated_tables_do_not_edit.person.columns]]
name = "name"
rust_type = "Option < String >"
sql_type = "TEXT"
[[output_generated_tables_do_not_edit.person.columns]]
name = "age"
rust_type = "Option < i64 >"
sql_type = "INTEGER"
[[output_generated_tables_do_not_edit.person.columns]]
name = "image_jpg"
rust_type = "Option < Vec < u8 > >"
sql_type = "BLOB"
[output_generated_tables_do_not_edit.personintegrationtest]
name = "personintegrationtest"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "rowid"
rust_type = "Option < i64 >"
sql_type = "INTEGER PRIMARY KEY"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_string"
rust_type = "Option < String >"
sql_type = "TEXT"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_i64"
rust_type = "Option < i64 >"
sql_type = "INTEGER"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_bool"
rust_type = "Option < bool >"
sql_type = "INTEGER"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_f64"
rust_type = "Option < f64 >"
sql_type = "REAL"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_f32"
rust_type = "Option < f32 >"
sql_type = "REAL"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_u8"
rust_type = "Option < u8 >"
sql_type = "INTEGER"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_i8"
rust_type = "Option < i8 >"
sql_type = "INTEGER"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_u16"
rust_type = "Option < u16 >"
sql_type = "INTEGER"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_i16"
rust_type = "Option < i16 >"
sql_type = "INTEGER"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_u32"
rust_type = "Option < u32 >"
sql_type = "INTEGER"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_i32"
rust_type = "Option < i32 >"
sql_type = "INTEGER"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_blob"
rust_type = "Option < Blob >"
sql_type = "BLOB"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_vec_u8"
rust_type = "Option < Vec < u8 > >"
sql_type = "BLOB"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_array_u8"
rust_type = "Option < [u8; 99] >"
sql_type = "BLOB"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_serialize"
rust_type = "Option < Vec < i64 > >"
sql_type = "TEXT"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_string_not_null"
rust_type = "String"
sql_type = "TEXT NOT NULL"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_i64_not_null"
rust_type = "i64"
sql_type = "INTEGER NOT NULL"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_bool_not_null"
rust_type = "bool"
sql_type = "INTEGER NOT NULL"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_f64_not_null"
rust_type = "f64"
sql_type = "REAL NOT NULL"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_f32_not_null"
rust_type = "f32"
sql_type = "REAL NOT NULL"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_u8_not_null"
rust_type = "u8"
sql_type = "INTEGER NOT NULL"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_i8_not_null"
rust_type = "i8"
sql_type = "INTEGER NOT NULL"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_u16_not_null"
rust_type = "u16"
sql_type = "INTEGER NOT NULL"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_i16_not_null"
rust_type = "i16"
sql_type = "INTEGER NOT NULL"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_u32_not_null"
rust_type = "u32"
sql_type = "INTEGER NOT NULL"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_i32_not_null"
rust_type = "i32"
sql_type = "INTEGER NOT NULL"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_blob_not_null"
rust_type = "Blob"
sql_type = "BLOB NOT NULL"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_vec_u8_not_null"
rust_type = "Vec < u8 >"
sql_type = "BLOB NOT NULL"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_array_u8_not_null"
rust_type = "[u8; 5]"
sql_type = "BLOB NOT NULL"
[[output_generated_tables_do_not_edit.personintegrationtest.columns]]
name = "field_serialize_not_null"
rust_type = "Vec < i64 >"
sql_type = "TEXT NOT NULL"