| 1 |
<?php |
<?php |
| 2 |
// $Id: game.install,v 1.3.2.4 2008/11/19 00:11:06 morbus Exp $ |
// $Id: game.install,v 1.3.2.5 2008/11/20 19:58:52 morbus Exp $ |
| 3 |
|
|
| 4 |
|
/** |
| 5 |
|
* @file |
| 6 |
|
* Installation routines for Game. |
| 7 |
|
*/ |
| 8 |
|
|
| 9 |
/** |
/** |
| 10 |
* Implementation of hook_schema(). |
* Implementation of hook_schema(). |
| 40 |
), |
), |
| 41 |
'primary key' => array('uid'), |
'primary key' => array('uid'), |
| 42 |
); |
); |
| 43 |
|
$schema['game_battle'] = array( |
| 44 |
|
'description' => t('Store the entire battle state for an in-progress battle.'), |
| 45 |
|
'fields' => array( |
| 46 |
|
'bid' => array( |
| 47 |
|
'description' => t('The unique ID that represents this in-progress battle.'), |
| 48 |
|
'not null' => TRUE, |
| 49 |
|
'type' => 'serial', |
| 50 |
|
), |
| 51 |
|
'started' => array( |
| 52 |
|
'default' => 0, |
| 53 |
|
'description' => t('The Unix timestamp when the battle started.'), |
| 54 |
|
'not null' => TRUE, |
| 55 |
|
'type' => 'int', |
| 56 |
|
), |
| 57 |
|
'changed' => array( |
| 58 |
|
'default' => 0, |
| 59 |
|
'description' => t('The Unix timestamp when the battle was last modified.'), |
| 60 |
|
'not null' => TRUE, |
| 61 |
|
'type' => 'int', |
| 62 |
|
), |
| 63 |
|
'state' => array( |
| 64 |
|
'description' => t('A serialized object of the entire battle state.'), |
| 65 |
|
'not null' => TRUE, |
| 66 |
|
'size' => 'big', |
| 67 |
|
'type' => 'blob', |
| 68 |
|
), |
| 69 |
|
), |
| 70 |
|
'primary key' => array('bid'), |
| 71 |
|
); |
| 72 |
|
$schema['game_battle_user'] = array( |
| 73 |
|
'description' => t('Associate user IDs with a specific in-progress battles (for shared battles, etc.).'), |
| 74 |
|
'fields' => array( |
| 75 |
|
'bid' => array( |
| 76 |
|
'description' => t('The unique ID that represents this in-progress battle.'), |
| 77 |
|
'not null' => TRUE, |
| 78 |
|
'type' => 'int', |
| 79 |
|
), |
| 80 |
|
'uid' => array( |
| 81 |
|
'default' => 0, |
| 82 |
|
'description' => t('The {users}.uid of the user participating in this battle.'), |
| 83 |
|
'not null' => TRUE, |
| 84 |
|
'type' => 'int', |
| 85 |
|
), |
| 86 |
|
), |
| 87 |
|
'indexes' => array( |
| 88 |
|
'bid' => array('bid'), |
| 89 |
|
'uid' => array('uid'), |
| 90 |
|
), |
| 91 |
|
); |
| 92 |
$schema['game_log'] = array( |
$schema['game_log'] = array( |
| 93 |
'description' => t('Store displayable snippets about the games being played.'), |
'description' => t('Store displayable snippets about the games being played.'), |
| 94 |
'fields' => array( |
'fields' => array( |