You are here

function hosting_platform_update_7400 in Hosting 7.4

Create new columns for git properties.

File

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

Code

function hosting_platform_update_7400() {
  $spec = array(
    '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,
    ),
  );
  foreach ($spec as $field => $field_spec) {
    db_add_field('hosting_platform', $field, $field_spec);
  }
}