Adding feature to allow users to choose a syntaxhighlighter theme per project

This commit is contained in:
Nathan Adams
2014-03-12 21:30:54 -05:00
parent 822e107958
commit 7ac8142fc6
8 changed files with 138 additions and 3 deletions

View File

@@ -0,0 +1,36 @@
<?php
function IDF_Migrations_29EnableAds_up()
{
$table = Pluf::factory('IDF_Project')->getSqlTable();
$sql = array();
$sql["MySQL"] = "ALTER TABLE " . $table . " ADD COLUMN `enableads` int(11) NULL AFTER `current_activity`;";
$db = Pluf::db();
$engine = Pluf::f('db_engine');
if (!isset($sql[$engine])) {
throw new Exception('SQLite complex migration not supported.');
}
$db->execute($sql[$engine]);
}
function IDF_Migrations_28OTPKey_down()
{
$table = Pluf::factory('IDF_Project')->getSqlTable();
$sql = array();
$sql["MySQL"] = "ALTER TABLE " . $table . " DROP COLUMN `enableads`;";
$db = Pluf::db();
$engine = Pluf::f('db_engine');
if (!isset($sql[$engine])) {
throw new Exception('SQLite complex migration not supported.');
}
$db->execute($sql[$engine]);
}

View File

@@ -0,0 +1,36 @@
<?php
function IDF_Migrations_30SyntaxHighlightTheme_up()
{
$table = Pluf::factory('IDF_Project')->getSqlTable();
$sql = array();
$sql["MySQL"] = "ALTER TABLE " . $table . " ADD COLUMN `syntaxtheme` VARCHAR(50) NULL AFTER `enableads`;";
$db = Pluf::db();
$engine = Pluf::f('db_engine');
if (!isset($sql[$engine])) {
throw new Exception('SQLite complex migration not supported.');
}
$db->execute($sql[$engine]);
}
function IDF_Migrations_28OTPKey_down()
{
$table = Pluf::factory('IDF_Project')->getSqlTable();
$sql = array();
$sql["MySQL"] = "ALTER TABLE " . $table . " DROP COLUMN `syntaxtheme`;";
$db = Pluf::db();
$engine = Pluf::f('db_engine');
if (!isset($sql[$engine])) {
throw new Exception('SQLite complex migration not supported.');
}
$db->execute($sql[$engine]);
}