/[drupal]/contributions/modules/migrator/migrator.install
ViewVC logotype

Contents of /contributions/modules/migrator/migrator.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Mon Apr 14 05:43:41 2008 UTC (19 months, 2 weeks ago) by sun
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/x-php
Initial commit of Migrator module.  Work on Joomla! 1.0.x support in progress; user import already working, yay!
1 <?php
2 // $Id: migrator.install 142 2008-04-12 02:29:41Z sun $
3
4 /**
5 * Implementation of hook_install().
6 */
7 function migrator_install() {
8 switch ($GLOBALS['db_type']) {
9 case 'mysql':
10 case 'mysqli':
11 db_query("CREATE TABLE {migrator_map} (
12 object varchar(50) NOT NULL default '',
13 id_old int unsigned NOT NULL default '0',
14 id_new int unsigned NOT NULL default '0',
15 custom tinyint unsigned NOT NULL default '0',
16 PRIMARY KEY (object, id_old)
17 ) /*!40100 DEFAULT CHARACTER SET UTF8 */");
18 break;
19 }
20 }
21
22 /**
23 * Implementation of hook_uninstall().
24 */
25 function migrator_uninstall() {
26 db_query('DROP TABLE {migrator_map}');
27 variable_del('migrator_db');
28 }

  ViewVC Help
Powered by ViewVC 1.1.2