Skip to content

Commit 860e4bd

Browse files
author
Paweł Mikołajczuk
committed
Merge pull request #1094 from takeit/bug
fixed bugs related to playlists
2 parents 70e7193 + 9f919b1 commit 860e4bd

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE `playlist` CHANGE `notes` `notes` VARCHAR( 1024 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;
2+
ALTER TABLE `playlist` CHANGE `max_items` `max_items` INT( 11 ) NULL;
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
$newscoopDir = realpath(dirname(__FILE__).'/../../../../../../').'/';
4+
5+
require_once $newscoopDir.'vendor/autoload.php';
6+
require $newscoopDir.'conf/database_conf.php';
7+
8+
use Monolog\Logger;
9+
10+
$upgradeErrors = array();
11+
$app = new Silex\Application();
12+
$app->register(new Silex\Provider\MonologServiceProvider(), array(
13+
'monolog.logfile' => $newscoopDir.'log/upgrade.log',
14+
'monolog.level' => Logger::NOTICE,
15+
'monolog.name' => 'upgrade',
16+
));
17+
18+
$logger = $app['monolog'];
19+
20+
$app->register(new Silex\Provider\DoctrineServiceProvider(), array(
21+
'db.options' => array(
22+
'driver' => 'pdo_mysql',
23+
'host' => $Campsite['db']['host'],
24+
'dbname' => $Campsite['db']['name'],
25+
'user' => $Campsite['db']['user'],
26+
'password' => $Campsite['db']['pass'],
27+
'port' => $Campsite['db']['port'],
28+
'charset' => 'utf8',
29+
),
30+
));
31+
32+
try {
33+
$app['db']->query('ALTER TABLE playlist ADD themes VARCHAR(255) DEFAULT NULL');
34+
} catch (\Exception $e) {
35+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
system php ./playlist.php

0 commit comments

Comments
 (0)