2 // $Id: og_panels.install,v 1.4 2008/10/29 19:59:08 dww Exp $
4 function og_panels_install() {
5 switch ($GLOBALS['db_type']) {
8 db_query("CREATE TABLE {og_panels} (
11 published int NOT NULL,
12 page_title varchar(255) NOT NULL,
13 path varchar(100) NOT NULL,
14 default_page int NULL,
16 weight int(4) NOT NULL DEFAULT 0,
18 ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
21 db_query("CREATE TABLE {og_panels} (
24 published integer NOT NULL,
25 page_title varchar(255) NOT NULL,
26 path varchar(100) NOT NULL,
27 default_page integer NULL,
28 show_blocks integer NULL,
29 weight integer(4) NOT NULL DEFAULT 0,
36 function og_panels_update_5001() {
38 switch ($GLOBALS['db_type']) {
41 $ret[] = update_sql("ALTER TABLE {og_panels} ADD COLUMN weight int(4) NOT NULL DEFAULT 0");
44 db_add_column($ret, 'og_panels', 'weight', 'integer', array('not null' => TRUE, 'default' => 0));
47 return $ret ? $ret : array();
50 function og_panels_uninstall() {
51 db_query('DROP TABLE {og_panels}');
55 foreach ($variables as $variable) {
56 variable_del($variable);