'The base table for subscriptions', 'fields' => array( 'sid' => array( 'description' => 'The primary identifier for a subscription', 'type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, ), 'mail' => array( 'description' => 'The e-mail address of the subscription', 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'uid' => array( 'description' => 'The {users}.uid that owns this node; initially, this is the user that created it.', 'type' => 'int', 'default' => 0, ), 'hash' => array( 'description' => 'The hash related to the subscription', 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), 'status' => array( 'description' => 'Boolean indicating whether the subscription is active', 'type' => 'int', 'not null' => TRUE, 'default' => 1, ), 'created' => array( 'description' => 'The Unix timestamp when the subscription created his subscription', 'type' => 'int', 'not null' => TRUE, 'default' => 0, ), 'deleted' => array( 'description' => 'The Unix timestamp when the subscription deleted his subscription', 'type' => 'int', 'not null' => TRUE, 'default' => 0, ), ), 'unique keys' => array( 'sid' => array('sid'), ), 'foreign keys' => array( 'registered_user' => array( 'table' => 'users', 'columns' => array('uid' => 'uid'), ), ), 'primary key' => array('sid'), ); return $schema; } /** * Implementation of hook_uninstall(). */ function simple_subscription_uninstall() { /* * delete the created variable */ variable_del('simple_subscription_config'); }