File modules/cms/update/version/DBVersion000036.class.php

Last commit: Sun Dec 8 20:56:47 2024 +0100	Jan Dankert	New: Users are now able to store bookmarks.
1 <?php 2 3 namespace cms\update\version; 4 5 use database\Column; 6 use database\DbVersion; 7 8 /** 9 * Add Bookmarks. 10 * 11 * @author dankert 12 * 13 */ 14 class DBVersion000036 extends DbVersion 15 { 16 /** 17 * Creates the 'bookmark'-table. 18 */ 19 public function update() 20 { 21 $bookmarkTable = $this->table('bookmark')->add(); 22 $bookmarkTable->addPrimaryKey(); 23 $bookmarkTable->column('objectid')->type( Column::TYPE_INT)->add(); 24 $bookmarkTable->column('userid' )->type( Column::TYPE_INT)->add(); 25 $bookmarkTable->addConstraint('objectid', 'object' ); 26 $bookmarkTable->addConstraint('userid' , 'user' ); 27 28 $bookmarkTable->addUniqueIndex( ['objectid','userid'] ); 29 } 30 } 31
Download modules/cms/update/version/DBVersion000036.class.php
History Sun, 8 Dec 2024 20:56:47 +0100 Jan Dankert New: Users are now able to store bookmarks.