openrat-cms

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

DBVersion000012.class.php (571B)


      1 <?php
      2 
      3 namespace cms\update\version;
      4 
      5 use database\DbVersion;
      6 use database\Column;
      7 
      8 /**
      9  * Objects gets new columns for storing the publish date.
     10  *
     11  * @author dankert
     12  *
     13  */
     14 class DBVersion000012 extends DbVersion
     15 {
     16     /**
     17      *
     18      */
     19     public function update()
     20     {
     21     	$table = $this->table('object');
     22         $table->column('published_date'  )->type(Column::TYPE_INT)->size(0)->nullable()->add();
     23         $table->column('published_userid')->type(Column::TYPE_INT)->size(0)->nullable()->add();
     24         $table->addConstraint('published_userid', 'user');
     25     }
     26 }