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