You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 line
919B

  1. <?php
  2. use yii\db\Migration;
  3. use yii\db\Schema;
  4. /**
  5. * Class m231006_084312_add_columns_subscription_created_updated
  6. */
  7. class m231006_084312_add_columns_subscription_created_updated extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $this->addColumn('subscription', 'id_created_by', Schema::TYPE_INTEGER);
  15. $this->addColumn('subscription', 'created_at', Schema::TYPE_DATETIME);
  16. $this->addColumn('subscription', 'id_updated_by', Schema::TYPE_INTEGER);
  17. $this->addColumn('subscription', 'updated_at', Schema::TYPE_DATETIME);
  18. }
  19. /**
  20. * {@inheritdoc}
  21. */
  22. public function safeDown()
  23. {
  24. $this->dropColumn('subscription', 'id_created_by');
  25. $this->dropColumn('subscription', 'created_at');
  26. $this->dropColumn('subscription', 'id_updated_by');
  27. $this->dropColumn('subscription', 'updated_at');
  28. }
  29. }