Gentics Portal.Node PHP API
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
All
Classes
Namespaces
Functions
Variables
Pages
common
modules
fg
migrations
m121210_211931_main.php
1
<?php
2
3
class
m121210_211931_main
extends
CDbMigration
4
{
5
public
function
up()
6
{
7
$this->createTable(
8
'formdata'
,
9
array(
10
'id'
=>
'pk'
,
11
'form_id'
=>
'int(11) NOT NULL'
,
12
'created_at'
=>
'timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'
,
13
'referer'
=>
'varchar(2083) NOT NULL DEFAULT \'\''
,
14
'ip'
=>
'char(15) NOT NULL DEFAULT \'\''
,
15
'json'
=>
'text NOT NULL'
16
)
17
//,'ENGINE=MyISAM DEFAULT CHARSET=utf8'
18
);
19
$this->createTable(
20
'forms'
,
21
array(
22
'id'
=>
'pk'
,
23
'name'
=>
'varchar(255) NOT NULL DEFAULT \'\''
,
24
'json'
=>
'text'
,
25
'html'
=>
'text'
,
26
'creator_email'
=>
'varchar(255) NOT NULL DEFAULT \'\''
,
27
'user'
=>
'varchar(255) NOT NULL DEFAULT \'\''
,
28
'salt'
=>
'char(32) DEFAULT NULL'
29
)
30
//,'ENGINE=MyISAM DEFAULT CHARSET=utf8'
31
);
32
$this->createTable(
33
'templates'
,
34
array(
35
'id'
=>
'pk'
,
36
'name'
=>
'varchar(255) NOT NULL DEFAULT \'\''
,
37
'json'
=>
'text NOT NULL'
,
38
'user'
=>
'varchar(255) NOT NULL DEFAULT \'\''
,
39
'global'
=>
'tinyint(1) NOT NULL DEFAULT \'0\''
,
40
)
41
//'ENGINE=MyISAM DEFAULT CHARSET=utf8'
42
);
43
/*$this->execute("CREATE TABLE IF NOT EXISTS `formdata` (
44
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
45
`form_id` int(11) unsigned NOT NULL,
46
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
47
`referer` varchar(2083) NOT NULL DEFAULT '',
48
`ip` char(15) NOT NULL DEFAULT '',
49
`json` text NOT NULL,
50
PRIMARY KEY (`id`)
51
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");*/
52
}
53
54
public
function
down()
55
{
56
echo
"m121210_211931_main does not support migration down.\n"
;
57
return
false
;
58
}
59
60
/*
61
// Use safeUp/safeDown to do migration with transaction
62
public function safeUp()
63
{
64
}
65
66
public function safeDown()
67
{
68
}
69
*/
70
}
Generated on Thu Feb 6 2014 15:47:54 for Gentics Portal.Node PHP API by
1.8.1.2