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

38 行
848B

  1. <?php
  2. use yii\db\Migration;
  3. use yii\db\Schema;
  4. class m161021_073634_table_etablissement extends Migration
  5. {
  6. public function up()
  7. {
  8. $this->createTable('etablissement', [
  9. 'id' => 'pk',
  10. 'nom' => Schema::TYPE_STRING . ' NOT NULL',
  11. 'siret' => Schema::TYPE_STRING . ' NOT NULL',
  12. 'logo' => Schema::TYPE_STRING,
  13. 'photo' => Schema::TYPE_STRING,
  14. 'description' => Schema::TYPE_TEXT,
  15. 'code_postal' => Schema::TYPE_STRING,
  16. 'ville' => Schema::TYPE_STRING,
  17. ]);
  18. }
  19. public function down()
  20. {
  21. $this->dropTable('etablissement') ;
  22. }
  23. /*
  24. // Use safeUp/safeDown to run migration code within a transaction
  25. public function safeUp()
  26. {
  27. }
  28. public function safeDown()
  29. {
  30. }
  31. */
  32. }