client_applications_install

Versions
mediamosa-174
client_applications_install()

Implementation of hook_install().

Code

client_applications/client_applications.install, line 35

<?php
function client_applications_install() {
  // Install the database schema.
  drupal_install_schema('client_applications');

  // Enum is not supported in schema, so we create them here
  $ret[] = update_sql("ALTER TABLE {client_applications} ADD COLUMN always_hint_mp4 ENUM('TRUE', 'FALSE') DEFAULT 'TRUE' AFTER still_url");
  $ret[] = update_sql("ALTER TABLE {client_applications} ADD COLUMN always_insert_md ENUM('TRUE', 'FALSE') DEFAULT 'TRUE' AFTER always_hint_mp4");
  $ret[] = update_sql("ALTER TABLE {client_applications} ADD COLUMN is_metadata_public ENUM('TRUE', 'FALSE') DEFAULT 'TRUE' AFTER always_insert_md");
  $ret[] = update_sql("ALTER TABLE {client_applications} ADD COLUMN show_external_assets ENUM('TRUE', 'FALSE') DEFAULT 'TRUE' AFTER is_metadata_public");
  $ret[] = update_sql("ALTER TABLE {client_applications} ADD `transcoding_max_slots` int(4) default 5");

  db_query("INSERT INTO {client_applications} VALUES
    (1, 0, 'testapp', 1, -10, -10, 'STABLE', 100, 0, '', 1, 'Test application', '', 'a', 'a', 'a', 'b', 'b', 'b', '', '', 2, 'test', 'test', NULL, 'TRUE', 'TRUE', 'TRUE', 'FALSE', '1.1.0', 1, 5),
    (2, 0, 'Simpletest3 - Drupal unit test', 9997, 0, 10, 'Testing', 9999, 0, '', 1, '0', '', '', '', '', '', '', '', '', '', 5, '', '', NULL, 'TRUE', 'TRUE', 'FALSE', 'TRUE', '1.1.0', 1, 5),
    (3, 0, 'Simpletest - Drupal unit tests', 9999, -10, -10, 'STABLE', 10, 0, '', 1, '', '', '1', '2', '3', '4', '5', '6', '', '', 1, '', '', NULL, 'TRUE', 'TRUE', 'FALSE', 'TRUE', '1.1.0', 1, 5),
    (4, 0, 'Simpletest2 - Drupal unit test', 9998, -10, -10, 'STABLE', 1, 0, '', 1, '', '', '', '', '', '', '', '', '', '', 1, '', '', NULL, 'TRUE', 'TRUE', 'FALSE', 'TRUE', '1.1.0', 1, 5)");

  // Enum is not supported in schema, so we create them here
  $ret[] = update_sql("ALTER TABLE {webservice_management_capp} ADD COLUMN status ENUM('TRUE', 'FALSE') NOT NULL");

  db_query("INSERT INTO {webservice_management_capp} VALUES
    (1, 'batch_upload', 1, 'TRUE'),
    (2, 'jobs', 1, 'TRUE'),
    (3, 'media_management', 1, 'TRUE'),
    (4, 'media_upload', 1, 'TRUE'),
    (5, 'transcoding', 1, 'TRUE')");

}
?>