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

m220914_091112_add_table_producer_price_range.php 656B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. use yii\db\Migration;
  3. use yii\db\Schema;
  4. /**
  5. * Class m220914_091112_add_table_producer_price_range
  6. */
  7. class m220914_091112_add_table_producer_price_range extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $this->createTable('producer_price_range', [
  15. 'id' => 'pk',
  16. 'range_begin' => Schema::TYPE_DOUBLE . ' NOT NULL',
  17. 'range_end' => Schema::TYPE_DOUBLE,
  18. 'price' => Schema::TYPE_DOUBLE . ' NOT NULL',
  19. ]);
  20. }
  21. /**
  22. * {@inheritdoc}
  23. */
  24. public function safeDown()
  25. {
  26. $this->dropTable('producer_price_range');
  27. }
  28. }