function _backup_migreate_install_tables in Backup and Migrate 5.2
2 calls to _backup_migreate_install_tables()
- backup_migrate_install in ./
backup_migrate.install - backup_migrate_update_2000 in ./
backup_migrate.install - Update from 1.x to 2.x.
File
- ./
backup_migrate.install, line 22 - Install hooks for Backup and Migrate.
Code
function _backup_migreate_install_tables() {
if ($GLOBALS['db_type'] == 'mysqli' || $GLOBALS['db_type'] == 'mysql') {
drupal_set_message("Creating required backup_migrate.module MySQL tables for first install");
db_query("CREATE TABLE {backup_migrate_profiles} (\n profile_id int(10) UNSIGNED NOT NULL PRIMARY KEY,\n name varchar(255) NOT NULL default '',\n source_id varchar(32) NOT NULL default 'db_url:default',\n exclude_tables text NOT NULL,\n nodata_tables text NOT NULL,\n filename varchar(50) NOT NULL default '',\n append_timestamp tinyint(1),\n timestamp_format varchar(14) NOT NULL default '',\n compression varchar(8) NOT NULL default '',\n destination_id varchar(32) NOT NULL default ''\n ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
db_query("CREATE TABLE {backup_migrate_destinations} (\n destination_id int(10) UNSIGNED NOT NULL PRIMARY KEY,\n name varchar(255) NOT NULL default '',\n type varchar(32) NOT NULL default '',\n location text NOT NULL,\n username varchar(255) NOT NULL default '',\n password varchar(255) NOT NULL default '',\n settings text default ''\n ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
db_query("CREATE TABLE {backup_migrate_schedules} (\n schedule_id int(10) UNSIGNED NOT NULL PRIMARY KEY,\n name varchar(255) NOT NULL default '',\n destination_id varchar(32) NOT NULL default '',\n profile_id varchar(32) NOT NULL default '',\n keep int(10) unsigned NOT NULL default '0',\n period int(10) unsigned NOT NULL default '0',\n last_run int(10) unsigned NOT NULL default '0',\n enabled tinyint(1) default 1,\n cron tinyint(1) default 1\n ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
}
}