function context_ui_install in Context 5
Same name and namespace in other branches
- 6 context_ui/context_ui.install \context_ui_install()
File
- context_ui/
context_ui.install, line 3
Code
function context_ui_install() {
switch ($GLOBALS['db_type']) {
case 'mysqli':
case 'mysql':
db_query("CREATE TABLE {context_ui} (\n cid INT(10) NOT NULL,\n system INT(1) NOT NULL,\n status INT(1) NOT NULL,\n namespace VARCHAR(64) NOT NULL,\n attribute VARCHAR(64) NOT NULL,\n value VARCHAR(64),\n PRIMARY KEY(cid),\n KEY (system, namespace, attribute, value)\n ) /*!40100 DEFAULT CHARACTER SET UTF8 */");
db_query("CREATE TABLE {context_ui_item} (\n type VARCHAR(32) NOT NULL,\n id VARCHAR(255) NOT NULL,\n cid INT(10) NOT NULL,\n KEY(id, type, cid)\n ) /*!40100 DEFAULT CHARACTER SET UTF8 */");
db_query("CREATE TABLE {context_ui_block} (\n module VARCHAR(64) NOT NULL,\n delta VARCHAR(32) NOT NULL,\n region VARCHAR(64) NOT NULL,\n weight TINYINT(4) NOT NULL,\n cid INT(10) NOT NULL, \n KEY(module, delta, region, cid)\n ) /*!40100 DEFAULT CHARACTER SET UTF8 */");
break;
}
}