Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

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