| 1 |
<?php |
<?php |
| 2 |
// $Id: backup_migrate.install,v 1.1.2.2.2.1.2.8 2009/03/07 17:03:47 ronan Exp $ |
// $Id: backup_migrate.install,v 1.1.2.2.2.1.2.9 2009/04/05 04:18:09 ronan Exp $ |
| 3 |
|
|
| 4 |
|
|
| 5 |
/** |
/** |
| 231 |
'timestamp_format' => variable_get("backup_migrate_timestamp_format", 'Y-m-d\TH-i-s'), |
'timestamp_format' => variable_get("backup_migrate_timestamp_format", 'Y-m-d\TH-i-s'), |
| 232 |
'filters' => array('compression' => variable_get("backup_migrate_compression", "none")), |
'filters' => array('compression' => variable_get("backup_migrate_compression", "none")), |
| 233 |
); |
); |
| 234 |
$settings['name'] = t('Default Profile'); |
$settings['name'] = t('Saved Settings'); |
| 235 |
backup_migrate_profile_save_profile($settings); |
$profile = backup_migrate_profile_save_profile($settings); |
| 236 |
|
variable_set("backup_migrate_profile_id", $profile['profile_id']); |
| 237 |
} |
} |
| 238 |
} |
} |
| 239 |
|
|
| 262 |
*/ |
*/ |
| 263 |
function backup_migrate_update_2001() { |
function backup_migrate_update_2001() { |
| 264 |
$ret = array(); |
$ret = array(); |
| 265 |
|
$schema = drupal_get_schema_unprocessed('backup_migrate', 'backup_migrate_profiles'); |
| 266 |
|
|
| 267 |
// Add the filters field to the db. |
// Add the filters field to the db. |
| 268 |
db_add_field($ret, 'backup_migrate_profiles', 'filters', array('description' => t('The filter settings for the profile.'),'type' => 'text', 'not null' => TRUE)); |
if (!isset($schema['fields']['filters'])) { |
| 269 |
|
db_add_field($ret, 'backup_migrate_profiles', 'filters', array('description' => t('The filter settings for the profile.'),'type' => 'text', 'not null' => TRUE)); |
| 270 |
|
} |
| 271 |
// Add the source field |
// Add the source field |
| 272 |
db_add_field($ret, 'backup_migrate_profiles', 'source_id', array('description' => t('The db source to backup from.'), 'type' => 'varchar', 'length' => 32, 'default' => 'db_url:default', 'not null' => TRUE)); |
if (!isset($schema['fields']['source_id'])) { |
| 273 |
|
db_add_field($ret, 'backup_migrate_profiles', 'source_id', array('description' => t('The db source to backup from.'), 'type' => 'varchar', 'length' => 32, 'default' => 'db_url:default', 'not null' => TRUE)); |
| 274 |
|
} |
| 275 |
// Remove the compression field. |
// Remove the compression field. |
| 276 |
db_drop_field($ret, 'backup_migrate_profiles', 'compression'); |
if (isset($schema['fields']['compression'])) { |
| 277 |
|
db_drop_field($ret, 'backup_migrate_profiles', 'compression'); |
| 278 |
|
} |
| 279 |
return $ret; |
return $ret; |
| 280 |
} |
} |
| 281 |
|
|
| 282 |
|
/** |
| 283 |
|
* Clearing the cache because there was a menu structure change in the dev of 2009-05-31 |
| 284 |
|
*/ |
| 285 |
|
function backup_migrate_update_2002() { |
| 286 |
|
// Cache should clear automatically. Nothing to do here. |
| 287 |
|
return array(); |
| 288 |
|
} |