File modules/cms/update/version/DBVersion000020.class.php
Last commit: Wed Jul 7 22:29:06 2021 +0200 Jan Dankert Refactoring: Split values and content, new table "content".
1 <?php 2 3 namespace cms\update\version; 4 5 use database\DbVersion; 6 use database\Column; 7 8 /** 9 * Aliases for node objects. 10 * 11 * @author dankert 12 * 13 */ 14 class DBVersion000020 extends DbVersion 15 { 16 /** 17 * 18 */ 19 public function update() 20 { 21 $table = $this->table('alias')->add(); 22 23 $table->column('objectid' )->type(Column::TYPE_INT)->add(); 24 $table->column('languageid' )->type(Column::TYPE_INT)->nullable()->add(); 25 $table->column('link_objectid')->type(Column::TYPE_INT)->add(); 26 27 28 $table->addPrimaryKey (); 29 30 $table->addConstraint ('objectid', 'object'); 31 $table->addConstraint ('languageid', 'language'); 32 $table->addConstraint ('link_objectid', 'object'); 33 34 $table->addUniqueIndex('objectid'); 35 $table->addUniqueIndex(['link_objectid','languageid']); 36 $table->addIndex ('link_objectid'); 37 } 38 } 39
Downloadmodules/cms/update/version/DBVersion000020.class.php
History Wed, 7 Jul 2021 22:29:06 +0200 Jan Dankert Refactoring: Split values and content, new table "content". Fri, 25 Sep 2020 01:00:58 +0200 Jan Dankert Refactoring: More OO in the database updater :) Sun, 23 Feb 2020 00:30:10 +0100 Jan Dankert Refactoring: Namespacing for module 'database-update', now called 'cms\update'.