You are here

function party_simplenews_update_7003 in Party 8.2

Add table for settings Entity and tweak out relation table to be CORRECT

File

modules/party_simplenews/party_simplenews.install, line 84
Install information for Party Simplenews module

Code

function party_simplenews_update_7003() {
  db_change_field('party_simplenews_subscriber', 'snid', 'snid', array(
    'description' => 'Primary key: Unique subscriber ID.',
    'type' => 'int',
    'not null' => TRUE,
    'default' => 0,
  ), array(
    'primary key' => array(
      'snid',
    ),
  ));
  $table = array(
    'description' => 'Entity table to store subscription settings against',
    'fields' => array(
      'subscription_settings_id' => array(
        'description' => 'Primary key: Unique subscriber ID.',
        'type' => 'serial',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'subscription_settings_id',
    ),
  );
  db_create_table('party_subscription_settings', $table);
}