|
12345678910111213141516171819202122232425262728293031323334 |
- <?php
-
- use yii\db\Migration;
- use yii\db\Schema;
-
- /**
- * Class m240912_075936_add_columns_automatic_email
- */
- class m240912_075936_add_columns_automatic_email extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $this->addColumn('automatic_email', 'id_point_sale', Schema::TYPE_INTEGER);
- $this->addColumn('automatic_email', 'sending_day', Schema::TYPE_INTEGER);
- $this->addColumn('automatic_email', 'sending_hour', Schema::TYPE_INTEGER);
- $this->addForeignKey('automatic_email_fk_id_point_sale', 'automatic_email', 'id_point_sale', 'point_sale', 'id');
-
- $this->alterColumn('automatic_email', 'day', Schema::TYPE_INTEGER);
- $this->alterColumn('automatic_email', 'delay_before_distribution', Schema::TYPE_INTEGER);
- }
-
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- $this->dropColumn('automatic_email', 'id_point_sale');
- $this->dropColumn('automatic_email', 'sending_day');
- $this->dropColumn('automatic_email', 'sending_hour');
- }
- }
|