array( 'type' => 'int', 'not null' => TRUE, 'description' => 'id of the referenced region', ), ); break; } return array( 'columns' => $columns ); } function jsmap_schema() { $schema = array(); $schema['jsmap_map'] = array( 'description' => 'Stores information about defined maps.', 'fields' => array( 'id' => array( 'type' => 'serial', 'not null' => TRUE, 'description' => 'Primary Key: Unique map identifier.', ), 'map' => array( 'description' => 'The machine-readable name of this map.', 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, ), 'label' => array( 'description' => 'The human-readable name of this map.', 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'status' => array( 'type' => 'int', 'not null' => TRUE, 'default' => 0x01, 'size' => 'tiny', 'description' => 'The exportable status of the entity.', ), 'module' => array( 'description' => 'The name of the providing module if the entity has been defined in code.', 'type' => 'varchar', 'length' => 255, 'not null' => FALSE, ), ), 'primary key' => array('id'), 'unique keys' => array( 'map' => array('map'), ), ); $schema['jsmap_region'] = array( 'description' => 'Stores information about map regions.', 'fields' => array( 'id' => array( 'type' => 'serial', 'not null' => TRUE, 'description' => 'Primary Key: Unique map identifier.', ), 'external_id_type' => array( 'type' => 'varchar', 'length' => 255, 'not null' => FALSE, ), 'external_id_value' => array( 'type' => 'varchar', 'length' => 255, 'not null' => FALSE, ), 'map' => array( 'description' => 'The machine-readable name of the map to which this belongs.', 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, ), 'name' => array( 'description' => 'The human-readable name of this region.', 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'svg_path' => array( 'type' => 'text', 'size' => 'big', 'not null' => TRUE, 'description' => 'SVG path data in Raphael JS format', ), 'interactive' => array( 'type' => 'int', 'size' => 'tiny', 'not null' => TRUE, 'default' => MAP_VALUE_YES, 'description' => 'Whether a region should be interactive, not, or follow the global setting (interactive = respond to mouse hover, click, at all)', ), 'name_display' => array( 'type' => 'int', 'size' => 'tiny', 'not null' => TRUE, 'default' => MAP_VALUE_YES, 'description' => 'Whether to display the region name, not display it, or use the global setting', ), 'name_offset' => array( 'type' => 'varchar', 'length' => '32', 'not null' => TRUE, 'default' => '', 'description' => 'name x y offset from region center as a percentage of the map width / height', ), 'name_use_line' => array( 'type' => 'int', 'size' => 'tiny', 'not null' => TRUE, 'default' => MAP_VALUE_NO, 'description' => 'Whether to draw a line from text to center of province', ), 'name_line_offset' => array( 'type' => 'varchar', 'length' => '32', 'not null' => TRUE, 'default' => '', 'description' => 'name line x y offset from region center as a percentage of the map width / height', ), 'created' => array( 'description' => 'The Unix timestamp when the region was created.', 'type' => 'int', 'not null' => TRUE, 'default' => 0, ), 'changed' => array( 'description' => 'The Unix timestamp when the region was most recently saved.', 'type' => 'int', 'not null' => TRUE, 'default' => 0, ), 'status' => array( 'type' => 'int', 'not null' => TRUE, 'default' => 0x01, 'size' => 'tiny', 'description' => 'The exportable status of the entity.', ), 'module' => array( 'description' => 'The name of the providing module if the entity has been defined in code.', 'type' => 'varchar', 'length' => 255, 'not null' => FALSE, ), ), 'primary key' => array('id'), 'indexes' => array( 'map' => array('map'), ), ); return $schema; }