commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-new / librejs / librejs.install
1 <?php
2
3 /**
4 * Implements hook_schema().
5 */
6 function librejs_schema() {
7 $schema['librejs'] = array(
8 'description' => 'Stores the license and source of each JavaScript file.',
9 'fields' => array(
10 'id' => array(
11 'description' => 'Identifier.',
12 'type' => 'serial',
13 'not null' => TRUE,
14 ),
15 'data' => array(
16 'description' => 'The JavaScript file path or external URL.',
17 'type' => 'varchar',
18 'length' => 255,
19 'not null' => TRUE,
20 ),
21 'license' => array(
22 'description' => 'The license.',
23 'type' => 'varchar',
24 'length' => 255,
25 ),
26 'source' => array(
27 'description' => 'The source code URL.',
28 'type' => 'varchar',
29 'length' => 255,
30 ),
31 'version' => array(
32 'description' => 'The JavaScript version.',
33 'type' => 'varchar',
34 'length' => 32,
35 ),
36 'type' => array(
37 'description' => 'The JavaScript type.',
38 'type' => 'varchar',
39 'length' => 32,
40 ),
41 ),
42 'primary key' => array('id'),
43 'unique keys' => array('data' => array('data')),
44 );
45 return $schema;
46 }
47
48 /**
49 * Migrate URL for the Modified-BSD license.
50 */
51 function librejs_update_7100() {
52 // The URL for Modified-BSD at http://www.gnu.org/licenses/javascript-labels.html
53 // was changed sometime in November 2013.
54 db_update('librejs')->fields(array('license' => 'http://directory.fsf.org/wiki/License:BSD_3Clause'))->condition('license', 'http://www.xfree86.org/3.3.6/COPYRIGHT2.html#5')->execute();
55 }