You are here

function hosting_platform_schema in Hosting 7.4

Same name and namespace in other branches
  1. 6.2 platform/hosting_platform.install \hosting_platform_schema()
  2. 7.3 platform/hosting_platform.install \hosting_platform_schema()

Implements hook_schema().

File

platform/hosting_platform.install, line 10
Define database schema and update functions for the Platforms module.

Code

function hosting_platform_schema() {
  $schema['hosting_platform'] = 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,
      ),
      'git_remote' => array(
        'description' => 'The URL or path of the git repository to use when creating this platform.',
        'type' => 'varchar',
        'length' => 255,
        'default' => NULL,
      ),
      'git_reference' => array(
        'description' => 'The desired git reference. Can be a branch, tag or SHA. Defaults to the git repository default branch.',
        'type' => 'varchar',
        'length' => 255,
        'default' => NULL,
      ),
      'git_reset' => array(
        'description' => 'Reset any changes to this platform when verifying.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => FALSE,
        'default' => 1,
      ),
      'git_root' => array(
        'description' => 'The full path on the server to clone the git repository to.',
        'type' => 'varchar',
        'length' => 255,
        'default' => NULL,
      ),
      'git_docroot' => array(
        'description' => 'The relative path within the git repository to publish to the web.',
        'type' => 'varchar',
        'length' => 255,
        'default' => NULL,
      ),
      'publish_path' => array(
        'type' => 'text',
        'size' => 'big',
      ),
      'makefile' => array(
        'type' => 'text',
        'size' => 'big',
      ),
      'web_server' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'verified' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'status' => array(
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
      ),
      'make_working_copy' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'vid',
    ),
  );
  return $schema;
}