system_update_6030
modules/system/system.install, строка 2081
- Версии
- 6
system_update_6030()
Add the tables required by actions.inc.
Связанные темы
Код
<?php
function system_update_6030() {
$ret = array();
// Rename the old contrib actions table if it exists so the contrib version
// of the module can do something with the old data.
if (db_table_exists('actions')) {
db_rename_table($ret, 'actions', 'actions_old_contrib');
}
$schema['actions'] = array(
'fields' => array(
'aid' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '0'),
'type' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
'callback' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
'parameters' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'),
'description' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '0'),
),
'primary key' => array('aid'),
);
$schema['actions_aid'] = array(
'fields' => array(
'aid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
),
'primary key' => array('aid'),
);
db_create_table($ret, 'actions', $schema['actions']);
db_create_table($ret, 'actions_aid', $schema['actions_aid']);
return $ret;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии