| 1 |
<?php |
<?php |
| 2 |
// $Id: multisite_manager.install,v 1.3 2008/02/08 20:25:25 schuyler1d Exp $ |
// $Id: multisite_manager.install,v 1.3.4.1 2008/03/12 16:47:45 schuyler1d Exp $ |
| 3 |
|
|
| 4 |
function multisite_manager_schema() { |
function multisite_manager_schema() { |
| 5 |
$schema['drupal_site'] = array( |
$schema['drupal_site'] = array( |
| 42 |
// X = Drupal major number (eg 5 = 5.x) |
// X = Drupal major number (eg 5 = 5.x) |
| 43 |
// Y = Module major number (eg 0 = 0.x, 1 = 1.x) |
// Y = Module major number (eg 0 = 0.x, 1 = 1.x) |
| 44 |
// ZZ = increment |
// ZZ = increment |
| 45 |
|
function multisite_manager_update_5000() { |
| 46 |
|
$items = array(); |
| 47 |
|
switch ($GLOBALS['db_type']) { |
| 48 |
|
case 'mysql': |
| 49 |
|
case 'mysqli': |
| 50 |
|
$items[] = update_sql("ALTER TABLE {drupal_site} ADD COLUMN run_cron tinyint NOT NULL default '0' AFTER link"); |
| 51 |
|
break; |
| 52 |
|
case 'pgsql': |
| 53 |
|
$items[] = update_sql("ALTER TABLE {drupal_site} ADD COLUMN run_cron smallint NOT NULL default '0'"); |
| 54 |
|
break; |
| 55 |
|
} // end switch db_type |
| 56 |
|
return $items; |
| 57 |
|
} // end function multisite_manager_update_5000() |
| 58 |
|
|
| 59 |
|
function multisite_manager_update_5001() { |
| 60 |
|
$items = array(); |
| 61 |
|
switch ($GLOBALS['db_type']) { |
| 62 |
|
case 'mysql': |
| 63 |
|
case 'mysqli': |
| 64 |
|
$items[] = update_sql("ALTER TABLE {drupal_site} ADD COLUMN installed tinyint NOT NULL default '0' AFTER link"); |
| 65 |
|
break; |
| 66 |
|
case 'pgsql': |
| 67 |
|
$items[] = update_sql("ALTER TABLE {drupal_site} ADD COLUMN installed smallint NOT NULL default '0'"); |
| 68 |
|
break; |
| 69 |
|
} // end switch db_type |
| 70 |
|
///older configuration meant that all sites were installed |
| 71 |
|
db_query("UPDATE {drupal_site} SET installed=1"); |
| 72 |
|
return $items; |
| 73 |
|
} // end function multisite_manager_update_5000() |
| 74 |
|
|