You are here

function hosting_site_schema in Hosting 6.2

Same name and namespace in other branches
  1. 7.4 site/hosting_site.install \hosting_site_schema()
  2. 7.3 site/hosting_site.install \hosting_site_schema()

Implementation of hook_schema().

File

site/hosting_site.install, line 6

Code

function hosting_site_schema() {
  $schema['hosting_site'] = array(
    'fields' => array(
      'vid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'client' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'db_server' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'db_name' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ),
      'platform' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'profile' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'language' => array(
        'type' => 'varchar',
        'length' => 10,
        'not null' => TRUE,
        'default' => 'en',
      ),
      'last_cron' => array(
        'type' => 'int',
        'not null' => FALSE,
      ),
      'cron_key' => array(
        'type' => 'varchar',
        'not null' => FALSE,
        'length' => 80,
        'default' => '',
      ),
      'verified' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'status' => array(
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'vid',
    ),
  );
  $schema['hosting_site_backups'] = array(
    'fields' => array(
      'bid' => array(
        'type' => 'serial',
        'not null' => TRUE,
      ),
      'site' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'web_server' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'description' => array(
        'type' => 'text',
        'size' => 'big',
        'not null' => FALSE,
      ),
      'filename' => array(
        'type' => 'text',
        'size' => 'big',
        'not null' => FALSE,
      ),
      'size' => array(
        'type' => 'int',
        'not null' => FALSE,
      ),
      'timestamp' => array(
        'type' => 'int',
        'not null' => FALSE,
      ),
    ),
    'primary key' => array(
      'bid',
    ),
  );
  return $schema;
}