query("CREATE TABLE IF NOT EXISTS {items_albumpasswords} ( `id` int(9) NOT NULL auto_increment, `album_id` int(9) NOT NULL, `password` varchar(64) NOT NULL, PRIMARY KEY (`id`)) DEFAULT CHARSET=utf8;"); // Set the default value for this module's behavior. module::set_var("albumpassword", "hideonly", true); // Set the module's version number. module::set_version("albumpassword", 2); } static function upgrade($version) { // Set the default value for this module's behavior. module::set_var("albumpassword", "hideonly", true); // Set the module's version number. module::set_version("albumpassword", 2); } static function uninstall() { // Delete the password table before uninstalling. $db = Database::instance(); $db->query("DROP TABLE IF EXISTS {items_albumpassword};"); module::delete("albumpassword"); } }