Mercurial > hg > rr-repo
comparison sites/all/modules/relation/relation_endpoint.install @ 4:ce11bbd8f642
added modules
author | danieleb <danielebarchiesi@me.com> |
---|---|
date | Thu, 19 Sep 2013 10:38:44 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
3:b28be78d8160 | 4:ce11bbd8f642 |
---|---|
1 <?php | |
2 | |
3 /** | |
4 * @file | |
5 * Installation functions for Relation Endpoint field type module. | |
6 */ | |
7 | |
8 /** | |
9 * Implements hook_field_schema(). | |
10 */ | |
11 function relation_endpoint_field_schema() { | |
12 $columns = array( | |
13 'entity_type' => array( | |
14 'type' => 'varchar', | |
15 'length' => 255, | |
16 'not null' => TRUE, | |
17 'default' => '', | |
18 'description' => 'Entity_type of this relation end-point.', | |
19 ), | |
20 'entity_id' => array( | |
21 'type' => 'int', | |
22 'unsigned' => TRUE, | |
23 'not null' => TRUE, | |
24 'default' => 0, | |
25 'description' => 'Entity_id of this relation end-point.', | |
26 ), | |
27 'r_index' => array( | |
28 'type' => 'int', | |
29 'unsigned' => TRUE, | |
30 'not null' => TRUE, | |
31 'default' => 0, | |
32 'description' => 'The index of this row in this relation. The highest index in the relation is stored as "arity" in the relation table.', | |
33 ), | |
34 ); | |
35 return array( | |
36 'columns' => $columns, | |
37 'indexes' => array( | |
38 'relation' => array('entity_type', 'entity_id', 'r_index'), | |
39 ), | |
40 ); | |
41 } |