GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

m150914_140745_youtube_AddHashTable::safeUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 13
rs 9.4285
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
namespace Craft;
3
4
/**
5
 * The class name is the UTC timestamp in the format of mYYMMDD_HHMMSS_pluginHandle_migrationName
6
 */
7
class m150914_140745_youtube_AddHashTable extends BaseMigration
8
{
9
    /**
10
     * Any migration code in here is wrapped inside of a transaction.
11
     *
12
     * @return bool
13
     */
14
    public function safeUp()
15
    {
16
        // Create the craft_youtube_hashes table
17
        craft()->db->createCommand()->createTable('youtube_hashes', array(
18
            'youtubeId' => array('required' => true),
19
            'hash'      => array('required' => true),
20
        ), null, true);
21
22
        // Add indexes to craft_youtube_hashes
23
        craft()->db->createCommand()->createIndex('youtube_hashes', 'hash', true);
24
25
        return true;
26
    }
27
}
28