i was studying userpoints databaseschema and found some uncalrity.

The above shows a snippet out of the userpoints.install
Both, pid and uid are 'description' => 'User ID'. I checked my tables and pid != uid. uid is the user id and pid is numers 1,2,3,4,5,6....x (primary key).

Do i get something wrong?

function userpoints_schema() {
  $schema = array();
  $schema['userpoints'] = array(
    'description' => 'Holds the user points',
    'fields' => array(
      'pid' => array(
        'description' => 'User ID',
        'type' => 'serial',
        'not null' => TRUE,
      ),
      'uid' => array(
        'description' => 'User ID',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),

Comments

berdir’s picture

The description is wrong, pid is the primary key.

Anonymous’s picture

Component: Code: userpoints_basic » Code: userpoints

I examined the function userpoints_schema() and found towards the botton of the function the line
'primary key' => array('pid'). I hope this helps that the pid is infact the primary key

Anonymous’s picture

Status: Active » Closed (fixed)

i think since a solution has been reached this can be closed

berdir’s picture

Category: support » task
Priority: Normal » Minor
Status: Closed (fixed) » Active

There is no technical problem, but the description is wrong and should be updated. Changing to a task with minor priority.

manuel.adan’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Closing this as outdated, 6.x version is no longer maintained.