1
0
This repository has been archived on 2021-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
gallery3-contrib/modules/user_homes/helpers/user_homes_installer.php

36 lines
764 B
PHP
Raw Normal View History

2009-07-24 23:11:02 +00:00
<?php defined("SYSPATH") or die("No direct script access.");
class user_homes_installer
{
static function install()
{
module::set_version("user_homes", 1);
}
/**
* installs the the table of user homes when the
2009-07-24 23:11:02 +00:00
* module is installed
*/
static function activate()
{
$db = Database::instance();
$db->query("CREATE TABLE IF NOT EXISTS {user_homes} (
`id` int(9) NOT NULL,
`home` int(9) default NULL,
PRIMARY KEY (`id`),
UNIQUE KEY(`id`))
ENGINE=InnoDB DEFAULT CHARSET=utf8;");
2009-07-24 23:11:02 +00:00
}
/**
* drops the table of user homes when the
2009-07-24 23:11:02 +00:00
* module is uninstalled
*/
static function deactivate()
{
$db = Database::instance();
$db->query("DROP TABLE IF EXISTS {user_homes};");
2009-07-24 23:11:02 +00:00
}
}