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.

32 line
656B

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