-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema-test0.php
More file actions
52 lines (40 loc) · 826 Bytes
/
schema-test0.php
File metadata and controls
52 lines (40 loc) · 826 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use miggi\ddl\ddl;
#set_exception_handler('miggi\\cli_exception_handler');
$test = "
id I AUTO KEY,
ip c(40),
status I1 NOTNULL,
blocked_until T,
created_at T NOTNULL,
modified_at T,
";
$ddl = new ddl('sqlite');
$ddl->parse_columns($test);
print_r($ddl);
print $ddl->create_table("huhu", $test);
print "\n\n###\n\n";
$test = "
rule c(3) KEY max 3,
val c(64) KEY,
status I1 NOTNULL,
blocked_until T,
block_count I,
created_at T NOTNULL,
modified_at T
";
$ddl = new ddl('sqlite');
$ddl->parse_columns($test);
print_r($ddl);
print $ddl->create_table("huhu", $test);
exit;
$schema = new miggi\schema_ddl();
$ddl = $schema->create_table("users", "
id I AUTO KEY,
ip c(40),
blocked_until T,
created_at T NOTNULL,
modified_at T
");
print_r($ddl);