3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00

Add database table for linking entities to considerations (possibly many-to-one).

This commit is contained in:
Michael Stenta 2018-02-27 14:47:10 -05:00
parent 7fb00fc1ed
commit 666720b5de

View file

@ -80,34 +80,5 @@ function farm_plan_consideration_schema() {
'entity_id' => array('entity_id'),
),
);
$schema['farm_plan_consideration_entity'] = array(
'description' => 'Links plan considerations to specific entities.',
'fields' => array(
'consideration_id' => array(
'description' => 'Consideration ID.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'entity_type' => array(
'description' => 'The entity type to link to.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
),
'entity_id' => array(
'description' => 'The entity ID to link to.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
),
'primary key' => array('consideration_id', 'entity_type', 'entity_id'),
'indexes' => array(
'consideration_id' => array('consideration_id'),
'entity_type' => array('entity_type'),
'entity_id' => array('entity_id'),
),
);
return $schema;
}