@@ -53,6 +53,7 @@ local function check_field(i, field, space)
53
53
decimal = true ,
54
54
double = true ,
55
55
uuid = true ,
56
+ datetime = true ,
56
57
}
57
58
58
59
if known_field_types [field .type ] == nil then
@@ -68,6 +69,13 @@ local function check_field(i, field, space)
68
69
space .name , field .name , _TARANTOOL
69
70
)
70
71
end
72
+
73
+ if not db .datetime_allowed () and field .type == ' datetime' then
74
+ return nil , string.format (
75
+ " spaces[%q].format[%q].type: datetime type isn't allowed in your Tarantool version (%s)" ,
76
+ space .name , field .name , _TARANTOOL
77
+ )
78
+ end
71
79
end
72
80
73
81
@@ -192,6 +200,7 @@ local function check_index_part_type(part_type, index_type)
192
200
decimal = true ,
193
201
double = true ,
194
202
uuid = true ,
203
+ datetime = true ,
195
204
}
196
205
197
206
if not known_part_types [part_type ] then
@@ -208,6 +217,13 @@ local function check_index_part_type(part_type, index_type)
208
217
)
209
218
end
210
219
220
+ if not db .datetime_allowed () and part_type == ' datetime' then
221
+ return nil , string.format (
222
+ " datetime type isn't allowed in your Tarantool version (%s)" ,
223
+ _TARANTOOL
224
+ )
225
+ end
226
+
211
227
local err_template = " %s field type is unsupported in %s index type"
212
228
213
229
if index_type == ' TREE' or index_type == ' HASH' then
@@ -287,6 +303,7 @@ local function check_index_part(i, index, space)
287
303
varbinary = true ,
288
304
double = true ,
289
305
decimal = true ,
306
+ datetime = true ,
290
307
}
291
308
292
309
do -- check index.part.type equals format.field.type
0 commit comments