diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2010-01-02 08:42:14 -0800 |
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-01-02 08:42:14 -0800 |
| commit | 77cabb056faf451e7efcf89579bb168944dfcb99 (patch) | |
| tree | 5f0031d484a485c51f9a3bb3b442807c1828046f /modules/g2_import/helpers/g2_import_installer.php | |
| parent | 1b3d20a0fbb114423bf52ef8fc8b7c7aae150391 (diff) | |
| parent | 0be0111b74c2a971b9c79f1dad29791eabe763b2 (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.php | 15 |
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"); } |
