From 20e294eedafcbb059c2e8402ccb0fd7ee621031d Mon Sep 17 00:00:00 2001 From: moodler Date: Wed, 29 Mar 2006 17:42:42 +0000 Subject: [PATCH] Added field for CSS for database templates --- mod/data/db/mysql.php | 4 ++++ mod/data/db/mysql.sql | 5 +++-- mod/data/db/postgres7.php | 4 ++++ mod/data/db/postgres7.sql | 5 +++-- mod/data/version.php | 4 ++-- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/mod/data/db/mysql.php b/mod/data/db/mysql.php index a31afddb3b..edcd727723 100644 --- a/mod/data/db/mysql.php +++ b/mod/data/db/mysql.php @@ -44,6 +44,10 @@ function data_upgrade($oldversion) { table_column('data', '', 'defaultsortdir', 'tinyint', '4', 'unsigned', '0', 'not null', 'defaultsort'); table_column('data', '', 'editany', 'tinyint', '4', 'unsigned', '0', 'not null', 'defaultsortdir'); } + + if ($oldversion < 2006032900) { + table_column('data', '', 'csstemplate', 'text', '', '', '', 'not null', 'rsstemplate'); + } return true; } diff --git a/mod/data/db/mysql.sql b/mod/data/db/mysql.sql index 7f52fc4824..99e5a886ba 100755 --- a/mod/data/db/mysql.sql +++ b/mod/data/db/mysql.sql @@ -28,10 +28,11 @@ CREATE TABLE prefix_data ( rssarticles int(4) unsigned NOT NULL default '0', singletemplate text NOT NULL default '', listtemplate text NOT NULL default '', - addtemplate text NOT NULL default '', - rsstemplate text NOT NULL default '', listtemplateheader text NOT NULL default '', listtemplatefooter text NOT NULL default '', + addtemplate text NOT NULL default '', + rsstemplate text NOT NULL default '', + csstemplate text NOT NULL default '', approval tinyint(4) unsigned NOT NULL default '0', scale int(10) NOT NULL default '0', assessed int(10) unsigned NOT NULL default '0', diff --git a/mod/data/db/postgres7.php b/mod/data/db/postgres7.php index 2add8d6e49..a4d67dfe29 100644 --- a/mod/data/db/postgres7.php +++ b/mod/data/db/postgres7.php @@ -45,6 +45,10 @@ function data_upgrade($oldversion) { table_column('data', '', 'defaultsortdir', 'tinyint', '4', 'unsigned', '0', 'not null', 'defaultsort'); table_column('data', '', 'editany', 'tinyint', '4', 'unsigned', '0', 'not null', 'defaultsortdir'); } + + if ($oldversion < 2006032900) { + table_column('data', '', 'csstemplate', 'text', '', '', '', 'not null', 'rsstemplate'); + } return true; } diff --git a/mod/data/db/postgres7.sql b/mod/data/db/postgres7.sql index 372400b7dd..77395b7aea 100755 --- a/mod/data/db/postgres7.sql +++ b/mod/data/db/postgres7.sql @@ -14,10 +14,11 @@ CREATE TABLE prefix_data ( rssarticles integer NOT NULL default '0', singletemplate text NOT NULL default '', listtemplate text NOT NULL default '', - addtemplate text NOT NULL default '', - rsstemplate text NOT NULL default '', listtemplateheader text NOT NULL default '', listtemplatefooter text NOT NULL default '', + addtemplate text NOT NULL default '', + rsstemplate text NOT NULL default '', + csstemplate text NOT NULL default '', approval int NOT NULL default '0', scale integer NOT NULL default '0', assessed integer NOT NULL default '0', diff --git a/mod/data/version.php b/mod/data/version.php index 020ea832c9..7b981325ef 100644 --- a/mod/data/version.php +++ b/mod/data/version.php @@ -5,8 +5,8 @@ // This fragment is called by /admin/index.php //////////////////////////////////////////////////////////////////////////////// -$module->version = 2006032700; -$module->requires = 2005060223; // Requires this Moodle version +$module->version = 2006032900; +$module->requires = 2005060230; // Requires this Moodle version $module->cron = 60; ?> -- 2.39.5