Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
systems:yii2:migrations [2018/04/19 10:03]
smayr [New Notation]
systems:yii2:migrations [2018/04/19 10:07] (current)
smayr [New Notation]
Line 267: Line 267:
 class m160601_220000_skeleton extends Migration class m160601_220000_skeleton extends Migration
 { {
-    private $useExtendedUserProfile = false;+    private $useExtendedUserProfile = false;  // set it to your needs
          
     public function up()     public function up()
     {     {
         // Create tables with foreign keys last         // Create tables with foreign keys last
 +        $this->create_table_entry();
 +        $this->create_table_product_hash();
 +
         if ($this->useExtendedUserProfile) {         if ($this->useExtendedUserProfile) {
             $this->alter_user_table();             $this->alter_user_table();
         }         }
-        $this->create_table_entry(); 
-        $this->create_table_product_hash(); 
     }     }
  
Line 333: Line 334:
         // $this->addColumn('{{%user}}', 'company_name', $this->string());         // $this->addColumn('{{%user}}', 'company_name', $this->string());
         // $this->addColumn('{{%user}}', 'organization_name', $this->string());         // $this->addColumn('{{%user}}', 'organization_name', $this->string());
-        $this->addColumn('{{%user}}', 'school_name', $this->string());+        // $this->addColumn('{{%user}}', 'school_name', $this->string());
         // $this->addColumn('{{%user}}', 'job_title', $this->string());         // $this->addColumn('{{%user}}', 'job_title', $this->string());
         $this->addColumn('{{%user}}', 'receive_newsletter', $this->tinyInteger()->notNull()->defaultValue(1));         $this->addColumn('{{%user}}', 'receive_newsletter', $this->tinyInteger()->notNull()->defaultValue(1));