summaryrefslogtreecommitdiff
path: root/modules/g2_import/helpers/g2_import_installer.php
diff options
context:
space:
mode:
authorNathan Kinkade <nkinkade@nkinka.de>2010-01-03 15:51:24 +0000
committerNathan Kinkade <nkinkade@nkinka.de>2010-01-03 15:51:24 +0000
commit399abbc3a754cf5fdcfdff113446e1bc264091e2 (patch)
tree592188568e15325d59e51bf19cfdf667fae8d86d /modules/g2_import/helpers/g2_import_installer.php
parent925a6a2220760cb7daacee1ab80a07b61b3a30a1 (diff)
parent64e5efd57ba1479179c202e1b76b6eeb42d2924c (diff)
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/g2_import/helpers/g2_import_installer.php')
-rw-r--r--modules/g2_import/helpers/g2_import_installer.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/modules/g2_import/helpers/g2_import_installer.php b/modules/g2_import/helpers/g2_import_installer.php
index feacb518..77b61d3e 100644
--- a/modules/g2_import/helpers/g2_import_installer.php
+++ b/modules/g2_import/helpers/g2_import_installer.php
@@ -24,14 +24,27 @@ class g2_import_installer {
`id` int(9) NOT NULL auto_increment,
`g2_id` int(9) NOT NULL,
`g3_id` int(9) NOT NULL,
+ `g2_url` varchar(255) default NULL,
+ `resource_type` varchar(64) default NULL,
PRIMARY KEY (`id`),
- KEY (`g2_id`))
+ KEY `g2_url` (`g2_url`),
+ KEY `g2_id` (`g2_id`))
DEFAULT CHARSET=utf8;");
module::set_version("g2_import", 1);
mkdir(VARPATH . "modules/g2_import");
}
+ static function upgrade($version) {
+ $db = Database::instance();
+ if ($version == 1) {
+ $db->query("ALTER TABLE {g2_maps} ADD COLUMN `g2_url` VARCHAR(255)");
+ $db->query("ALTER TABLE {g2_maps} ADD COLUMN `resource_type` VARCHAR(64)");
+ $db->query("ALTER TABLE {g2_maps} ADD KEY `g2_url` (`g2_url`)");
+ module::set_version("g2_import", $version = 2);
+ }
+ }
+
static function uninstall() {
@dir::unlink(VARPATH . "modules/g2_import");
}