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

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