@@ -73,102 +73,152 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
73
73
$ table = $ schema ->createTable ('backup_changes ' );
74
74
$ table ->addColumn (
75
75
'id ' , 'integer ' , [
76
- 'autoincrement ' => true ,
77
- 'notnull ' => true ,
78
- 'length ' => 11 ,
79
- 'unsigned ' => true ,
80
- ]
76
+ 'autoincrement ' => true ,
77
+ 'notnull ' => true ,
78
+ 'length ' => 11 ,
79
+ 'unsigned ' => true ,
80
+ ]
81
81
);
82
82
$ table ->addColumn (
83
83
'path ' , 'text ' , [
84
- 'notnull ' => true
85
- ]
84
+ 'notnull ' => true
85
+ ]
86
86
);
87
87
$ table ->addColumn (
88
88
'hash ' , 'string ' , [
89
- 'notnull ' => true ,
90
- 'length ' => 63
91
- ]
89
+ 'notnull ' => true ,
90
+ 'length ' => 63
91
+ ]
92
92
);
93
93
$ table ->setPrimaryKey (['id ' ]);
94
94
$ table ->addUniqueIndex (['hash ' ]);
95
95
}
96
96
97
97
98
+ /**
99
+ * BACKUP_DATA
100
+ */
101
+ if (!$ schema ->hasTable ('backup_data ' )) {
102
+ $ table = $ schema ->createTable ('backup_data ' );
103
+ $ table ->addColumn (
104
+ 'id ' , 'integer ' , [
105
+ 'autoincrement ' => true ,
106
+ 'notnull ' => true ,
107
+ 'length ' => 4 ,
108
+ 'unsigned ' => true ,
109
+ ]
110
+ );
111
+ $ table ->addColumn (
112
+ 'name ' , 'string ' , [
113
+ 'notnull ' => true ,
114
+ 'length ' => 63
115
+ ]
116
+ );
117
+ $ table ->addColumn (
118
+ 'type ' , 'integer ' , [
119
+ 'notnull ' => true ,
120
+ 'length ' => 11 ,
121
+ 'unsigned ' => true
122
+ ]
123
+ );
124
+ $ table ->addColumn (
125
+ 'root ' , 'string ' , [
126
+ 'notnull ' => true ,
127
+ 'length ' => 255
128
+ ]
129
+ );
130
+ $ table ->addColumn (
131
+ 'path ' , 'string ' , [
132
+ 'notnull ' => true ,
133
+ 'length ' => 255
134
+ ]
135
+ );
136
+ $ table ->addColumn (
137
+ 'static ' , 'integer ' , [
138
+ 'notnull ' => true ,
139
+ 'length ' => 1 ,
140
+ 'unsigned ' => true ,
141
+ ]
142
+ );
143
+
144
+ $ table ->setPrimaryKey (['id ' ]);
145
+ }
146
+
147
+
98
148
/**
99
149
* BACKUP_POINT
100
150
*/
101
151
if (!$ schema ->hasTable ('backup_point ' )) {
102
152
$ table = $ schema ->createTable ('backup_point ' );
103
153
$ table ->addColumn (
104
154
'id ' , 'integer ' , [
105
- 'autoincrement ' => true ,
106
- 'notnull ' => true ,
107
- 'length ' => 4 ,
108
- 'unsigned ' => true ,
109
- ]
155
+ 'autoincrement ' => true ,
156
+ 'notnull ' => true ,
157
+ 'length ' => 4 ,
158
+ 'unsigned ' => true ,
159
+ ]
110
160
);
111
161
$ table ->addColumn (
112
162
'uid ' , 'string ' , [
113
- 'notnull ' => true ,
114
- 'length ' => 63 ,
115
- ]
163
+ 'notnull ' => true ,
164
+ 'length ' => 63 ,
165
+ ]
116
166
);
117
167
$ table ->addColumn (
118
168
'archive ' , 'integer ' , [
119
- 'unsigned ' => true ,
120
- 'notnull ' => true ,
121
- 'length ' => 1 ,
122
- ]
169
+ 'unsigned ' => true ,
170
+ 'notnull ' => true ,
171
+ 'length ' => 1 ,
172
+ ]
123
173
);
124
174
$ table ->addColumn (
125
175
'lock ' , 'integer ' , [
126
- 'notnull ' => true ,
127
- 'unsigned ' => true ,
128
- 'length ' => 11 ,
129
- ]
176
+ 'notnull ' => true ,
177
+ 'unsigned ' => true ,
178
+ 'length ' => 11 ,
179
+ ]
130
180
);
131
181
$ table ->addColumn (
132
182
'instance ' , 'string ' , [
133
- 'notnull ' => true ,
134
- 'length ' => 127 ,
135
- ]
183
+ 'notnull ' => true ,
184
+ 'length ' => 127 ,
185
+ ]
136
186
);
137
187
$ table ->addColumn (
138
188
'parent ' , 'string ' , [
139
- 'notnull ' => true ,
140
- 'length ' => 63 ,
141
- ]
189
+ 'notnull ' => true ,
190
+ 'length ' => 63 ,
191
+ ]
142
192
);
143
193
$ table ->addColumn (
144
194
'status ' , 'integer ' , [
145
- 'notnull ' => true ,
146
- 'unsigned ' => true ,
147
- 'length ' => 1
148
- ]
195
+ 'notnull ' => true ,
196
+ 'unsigned ' => true ,
197
+ 'length ' => 1
198
+ ]
149
199
);
150
200
$ table ->addColumn (
151
201
'notes ' , 'text ' , [
152
- 'notnull ' => true
153
- ]
202
+ 'notnull ' => true
203
+ ]
154
204
);
155
205
$ table ->addColumn (
156
206
'metadata ' , 'text ' , [
157
- 'notnull ' => true
158
- ]
207
+ 'notnull ' => true
208
+ ]
159
209
);
160
210
$ table ->addColumn (
161
211
'health ' , 'text ' , [
162
- 'notnull ' => false ,
163
- 'default ' => '[] '
164
- ]
212
+ 'notnull ' => false ,
213
+ 'default ' => '[] '
214
+ ]
165
215
);
166
216
$ table ->addColumn (
167
217
'date ' , 'integer ' , [
168
- 'notnull ' => true ,
169
- 'unsigned ' => true ,
170
- 'length ' => 11
171
- ]
218
+ 'notnull ' => true ,
219
+ 'unsigned ' => true ,
220
+ 'length ' => 11
221
+ ]
172
222
);
173
223
174
224
$ table ->setPrimaryKey (['id ' ]);
@@ -186,28 +236,28 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
186
236
$ table = $ schema ->createTable ('backup_external ' );
187
237
$ table ->addColumn (
188
238
'id ' , 'integer ' , [
189
- 'autoincrement ' => true ,
190
- 'notnull ' => true ,
191
- 'length ' => 4 ,
192
- 'unsigned ' => true ,
193
- ]
239
+ 'autoincrement ' => true ,
240
+ 'notnull ' => true ,
241
+ 'length ' => 4 ,
242
+ 'unsigned ' => true ,
243
+ ]
194
244
);
195
245
$ table ->addColumn (
196
246
'storage_id ' , 'integer ' , [
197
- 'notnull ' => false ,
198
- 'length ' => 4 ,
199
- ]
247
+ 'notnull ' => false ,
248
+ 'length ' => 4 ,
249
+ ]
200
250
);
201
251
$ table ->addColumn (
202
252
'root ' , 'string ' , [
203
- 'notnull ' => false ,
204
- 'length ' => 255 ,
205
- ]
253
+ 'notnull ' => false ,
254
+ 'length ' => 255 ,
255
+ ]
206
256
);
207
257
$ table ->addColumn (
208
258
'creation ' , 'datetime ' , [
209
- 'notnull ' => false ,
210
- ]
259
+ 'notnull ' => false ,
260
+ ]
211
261
);
212
262
213
263
$ table ->setPrimaryKey (['id ' ]);
@@ -222,46 +272,46 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
222
272
$ table = $ schema ->createTable ('backup_remote ' );
223
273
$ table ->addColumn (
224
274
'id ' , 'integer ' , [
225
- 'autoincrement ' => true ,
226
- 'notnull ' => true ,
227
- 'length ' => 4 ,
228
- 'unsigned ' => true ,
229
- ]
275
+ 'autoincrement ' => true ,
276
+ 'notnull ' => true ,
277
+ 'length ' => 4 ,
278
+ 'unsigned ' => true ,
279
+ ]
230
280
);
231
281
$ table ->addColumn (
232
282
'uid ' , 'string ' , [
233
- 'notnull ' => false ,
234
- 'length ' => 20 ,
235
- ]
283
+ 'notnull ' => false ,
284
+ 'length ' => 20 ,
285
+ ]
236
286
);
237
287
$ table ->addColumn (
238
288
'instance ' , 'string ' , [
239
- 'notnull ' => false ,
240
- 'length ' => 127 ,
241
- ]
289
+ 'notnull ' => false ,
290
+ 'length ' => 127 ,
291
+ ]
242
292
);
243
293
$ table ->addColumn (
244
294
'exchange ' , 'integer ' , [
245
- 'notnull ' => true ,
246
- 'length ' => 1 ,
247
- 'unsigned ' => true ,
248
- ]
295
+ 'notnull ' => true ,
296
+ 'length ' => 1 ,
297
+ 'unsigned ' => true ,
298
+ ]
249
299
);
250
300
$ table ->addColumn (
251
301
'href ' , 'string ' , [
252
- 'notnull ' => false ,
253
- 'length ' => 254 ,
254
- ]
302
+ 'notnull ' => false ,
303
+ 'length ' => 254 ,
304
+ ]
255
305
);
256
306
$ table ->addColumn (
257
307
'item ' , 'text ' , [
258
- 'notnull ' => false ,
259
- ]
308
+ 'notnull ' => false ,
309
+ ]
260
310
);
261
311
$ table ->addColumn (
262
312
'creation ' , 'datetime ' , [
263
- 'notnull ' => false ,
264
- ]
313
+ 'notnull ' => false ,
314
+ ]
265
315
);
266
316
267
317
$ table ->setPrimaryKey (['id ' ]);
@@ -278,38 +328,38 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
278
328
$ table = $ schema ->createTable ('backup_event ' );
279
329
$ table ->addColumn (
280
330
'id ' , 'integer ' , [
281
- 'autoincrement ' => true ,
282
- 'notnull ' => true ,
283
- 'length ' => 4 ,
284
- 'unsigned ' => true ,
285
- ]
331
+ 'autoincrement ' => true ,
332
+ 'notnull ' => true ,
333
+ 'length ' => 4 ,
334
+ 'unsigned ' => true ,
335
+ ]
286
336
);
287
337
$ table ->addColumn (
288
338
'author ' , 'string ' , [
289
- 'notnull ' => false ,
290
- 'length ' => 127 ,
291
- ]
339
+ 'notnull ' => false ,
340
+ 'length ' => 127 ,
341
+ ]
292
342
);
293
343
$ table ->addColumn (
294
344
'type ' , 'string ' , [
295
- 'notnull ' => false ,
296
- 'length ' => 127 ,
297
- ]
345
+ 'notnull ' => false ,
346
+ 'length ' => 127 ,
347
+ ]
298
348
);
299
349
$ table ->addColumn (
300
350
'status ' , 'integer ' , [
301
- 'notnull ' => false ,
302
- 'unsigned ' => true ,
303
- 'length ' => 1 ,
304
- ]
351
+ 'notnull ' => false ,
352
+ 'unsigned ' => true ,
353
+ 'length ' => 1 ,
354
+ ]
305
355
);
306
356
$ table ->addColumn (
307
357
'data ' , 'text ' , [
308
- ]
358
+ ]
309
359
);
310
360
$ table ->addColumn (
311
361
'result ' , 'string ' , [
312
- ]
362
+ ]
313
363
);
314
364
315
365
$ table ->setPrimaryKey (['id ' ]);
0 commit comments