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.

38 line
855B

  1. <?php
  2. use yii\db\Migration;
  3. use yii\db\Schema;
  4. /**
  5. * Class m231114_085352_create_table_setting
  6. */
  7. class m231114_085352_create_table_setting extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $this->createTable('setting', [
  15. 'id' => 'pk',
  16. 'name' => Schema::TYPE_STRING.' NOT NULL',
  17. 'id_producer' => Schema::TYPE_INTEGER,
  18. 'string' => Schema::TYPE_STRING,
  19. 'text' => Schema::TYPE_TEXT,
  20. 'date' => Schema::TYPE_DATE,
  21. 'integer' => Schema::TYPE_INTEGER,
  22. 'float' => Schema::TYPE_FLOAT,
  23. 'double' => Schema::TYPE_DOUBLE,
  24. 'boolean' => Schema::TYPE_BOOLEAN,
  25. ]);
  26. }
  27. /**
  28. * {@inheritdoc}
  29. */
  30. public function safeDown()
  31. {
  32. $this->dropTable('setting');
  33. }
  34. }