summaryrefslogtreecommitdiff
path: root/modules/g2_import/helpers/g2_import_installer.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-04-18 04:27:04 +0000
committerBharat Mediratta <bharat@menalto.com>2009-04-18 04:27:04 +0000
commita3e8818449677d08444cd30613603440e6529c5a (patch)
tree7030d4825316819d3894570a7923cc9304844add /modules/g2_import/helpers/g2_import_installer.php
parent1a332009c7ac59984e627678ecc91dbaf267ae57 (diff)
Track what we've already imported in the G2_Map_Model and keep it
around in the task so that on subsequent import runs we don't try to reimport stuff we've already pulled in. This also gives us a mapping so that we will be able to translate old G2 urls into the hot new G3 urls.
Diffstat (limited to 'modules/g2_import/helpers/g2_import_installer.php')
-rw-r--r--modules/g2_import/helpers/g2_import_installer.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/g2_import/helpers/g2_import_installer.php b/modules/g2_import/helpers/g2_import_installer.php
index db25e3a7..22aa76c4 100644
--- a/modules/g2_import/helpers/g2_import_installer.php
+++ b/modules/g2_import/helpers/g2_import_installer.php
@@ -19,8 +19,16 @@
*/
class g2_import_installer {
static function install() {
+ $db = Database::instance();
$version = module::get_version("g2_import");
if ($version == 0) {
+ $db->query("CREATE TABLE IF NOT EXISTS {g2_maps} (
+ `id` int(9) NOT NULL,
+ `g2_id` int(9) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY (`g2_id`))
+ ENGINE=InnoDB DEFAULT CHARSET=utf8;");
+
module::set_version("g2_import", 1);
}
}