function eck_update_7002 in Entity Construction Kit (ECK) 7
Same name and namespace in other branches
- 7.3 eck.install \eck_update_7002()
- 7.2 eck.install \eck_update_7002()
File
- ./eck.install, line 234
- This install file creates a table for the this module to store information
about entities. Well, the only information that it needs to store is a name
and a label for each entity created, the rest of the information is generated
by the functions.
Code
function eck_update_7002() {
$results = db_select('eck', 't')
->fields('t')
->execute();
foreach ($results as $record) {
db_add_field("eck_{$record->name}", 'state', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => 'The state of the entity',
));
}
}