-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1094 from takeit/bug
fixed bugs related to playlists
- Loading branch information
Showing
3 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
newscoop/install/Resources/sql/upgrade/4.4.x/2015.04.16/data-required.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ALTER TABLE `playlist` CHANGE `notes` `notes` VARCHAR( 1024 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL; | ||
ALTER TABLE `playlist` CHANGE `max_items` `max_items` INT( 11 ) NULL; |
35 changes: 35 additions & 0 deletions
35
newscoop/install/Resources/sql/upgrade/4.4.x/2015.04.16/playlist.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
$newscoopDir = realpath(dirname(__FILE__).'/../../../../../../').'/'; | ||
|
||
require_once $newscoopDir.'vendor/autoload.php'; | ||
require $newscoopDir.'conf/database_conf.php'; | ||
|
||
use Monolog\Logger; | ||
|
||
$upgradeErrors = array(); | ||
$app = new Silex\Application(); | ||
$app->register(new Silex\Provider\MonologServiceProvider(), array( | ||
'monolog.logfile' => $newscoopDir.'log/upgrade.log', | ||
'monolog.level' => Logger::NOTICE, | ||
'monolog.name' => 'upgrade', | ||
)); | ||
|
||
$logger = $app['monolog']; | ||
|
||
$app->register(new Silex\Provider\DoctrineServiceProvider(), array( | ||
'db.options' => array( | ||
'driver' => 'pdo_mysql', | ||
'host' => $Campsite['db']['host'], | ||
'dbname' => $Campsite['db']['name'], | ||
'user' => $Campsite['db']['user'], | ||
'password' => $Campsite['db']['pass'], | ||
'port' => $Campsite['db']['port'], | ||
'charset' => 'utf8', | ||
), | ||
)); | ||
|
||
try { | ||
$app['db']->query('ALTER TABLE playlist ADD themes VARCHAR(255) DEFAULT NULL'); | ||
} catch (\Exception $e) { | ||
} |
1 change: 1 addition & 0 deletions
1
newscoop/install/Resources/sql/upgrade/4.4.x/2015.04.16/tables.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
system php ./playlist.php |