openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit d24391bf3fa8a36d61d9712f38bbc27c4083d35e
parent 792e89ea373dce508a723b1a50dd6880ee9845e8
Author: Jan Dankert <devnull@localhost>
Date:   Fri,  3 Aug 2018 23:30:19 +0200

Neue Datenbankspalten für Textfilterung, Veröffentlichungsdatum, Ordnersortierung. Feature 0000003 0000004 0000005

Diffstat:
modules/database-update/DbUpdate.class.php | 2+-
modules/database-update/update/DBVersion000012.class.php | 26++++++++++++++++++++++++++
modules/database-update/update/DBVersion000013.class.php | 24++++++++++++++++++++++++
modules/database-update/update/DBVersion000014.class.php | 25+++++++++++++++++++++++++
modules/database/DbVersion.class.php | 2++
5 files changed, 78 insertions(+), 1 deletion(-)

diff --git a/modules/database-update/DbUpdate.class.php b/modules/database-update/DbUpdate.class.php @@ -2,7 +2,7 @@ use database\Database; -define('OR_DB_SUPPORTED_VERSION',11); +define('OR_DB_SUPPORTED_VERSION',14); define('OR_DB_STATUS_UPDATE_PROGRESS', 0); define('OR_DB_STATUS_UPDATE_SUCCESS' , 1); diff --git a/modules/database-update/update/DBVersion000012.class.php b/modules/database-update/update/DBVersion000012.class.php @@ -0,0 +1,25 @@ +<?php + +use database\DbVersion; +use security\Password; + +/** + * Objects gets new columns for storing the publish date. + * + * @author dankert + * + */ +class DBVersion000012 extends DbVersion +{ + /** + * + */ + public function update() + { + $this->addColumn('object','published_date' ,OR_DB_COLUMN_TYPE_INT,0,null,OR_DB_COLUMN_NULLABLE); + $this->addColumn('object','published_userid',OR_DB_COLUMN_TYPE_INT,0,null,OR_DB_COLUMN_NULLABLE); + $this->addConstraint('object','published_userid','user','id'); + } +} + +?>+ \ No newline at end of file diff --git a/modules/database-update/update/DBVersion000013.class.php b/modules/database-update/update/DBVersion000013.class.php @@ -0,0 +1,23 @@ +<?php + +use database\DbVersion; +use security\Password; + +/** + * Textfiles should able to be filtered. + * + * @author dankert + * + */ +class DBVersion000013 extends DbVersion +{ + /** + * + */ + public function update() + { + $this->addColumn('file','filterid' ,OR_DB_COLUMN_TYPE_INT,0,null,OR_DB_COLUMN_NULLABLE); + } +} + +?>+ \ No newline at end of file diff --git a/modules/database-update/update/DBVersion000014.class.php b/modules/database-update/update/DBVersion000014.class.php @@ -0,0 +1,24 @@ +<?php + +use database\DbVersion; +use security\Password; + +/** + * Objects gets new columns for storing the publish date. + * + * @author dankert + * + */ +class DBVersion000014 extends DbVersion +{ + /** + * + */ + public function update() + { + $this->addColumn('folder','order_by' ,OR_DB_COLUMN_TYPE_INT,0,null,OR_DB_COLUMN_NULLABLE); + $this->addColumn('folder','order_direction',OR_DB_COLUMN_TYPE_INT,0,null,OR_DB_COLUMN_NULLABLE); + } +} + +?>+ \ No newline at end of file diff --git a/modules/database/DbVersion.class.php b/modules/database/DbVersion.class.php @@ -15,6 +15,8 @@ namespace database { define('OR_DB_COLUMN_TYPE_VARCHAR',2); define('OR_DB_COLUMN_TYPE_TEXT',3); define('OR_DB_COLUMN_TYPE_BLOB',4); + define('OR_DB_COLUMN_NULLABLE',true); + define('OR_DB_COLUMN_NOT_NULLABLE',false); use Http;