您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

33 行
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. }