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.
Completed
Pull Request — integration (#2604)
by Brendan
04:35
created

migration_260   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 45
rs 10
wmc 6
lcom 0
cbo 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getVersion() 0 4 1
A getReleaseNotes() 0 4 1
1
<?php
2
namespace SymphonyCms\Installer\Migrations;
3
4
use SymphonyCms\Installer\Lib\Migration;
5
use Symphony;
6
use Exception;
7
8
class migration_260 extends Migration
9
{
10
    public static function getVersion()
11
    {
12
        return '2.6.0';
13
    }
14
15
    public static function getReleaseNotes()
16
    {
17
        return 'http://getsymphony.com/download/releases/version/2.6.0/';
18
    }
19
20
    public static function upgrade()
21
    {
22
        // Add date field options
23
        try {
24
            Symphony::Database()->query('
25
                ALTER TABLE `tbl_fields_date`
26
                ADD `calendar` ENUM("yes","no") COLLATE utf8_unicode_ci NOT NULL DEFAULT "no",
27
                ADD `time` ENUM("yes","no") COLLATE utf8_unicode_ci NOT NULL DEFAULT "yes";
28
            ');
29
        } catch (Exception $ex) {
30
        }
31
32
        // Add namespace field to the cache table. RE: #2162
33
        try {
34
            Symphony::Database()->query('
35
                ALTER TABLE `tbl_cache` ADD `namespace` VARCHAR(255) COLLATE utf8_unicode_ci;
36
            ');
37
        } catch (Exception $ex) {
38
        }
39
40
        // Add UNIQUE key constraint to the `hash` RE: #2163
41
        try {
42
            Symphony::Database()->import('
43
                ALTER TABLE `tbl_cache` DROP INDEX `hash`;
44
                ALTER TABLE `tbl_cache` ADD UNIQUE INDEX `hash` (`hash`)
45
            ');
46
        } catch (Exception $ex) {
47
        }
48
49
        // Update the version information
50
        return parent::upgrade();
51
    }
52
}
53