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.

34 line
877B

  1. <?php
  2. use yii\db\Schema;
  3. use yii\db\Migration;
  4. class m161012_075736_ajout_ids_boulangerie extends Migration
  5. {
  6. public function up()
  7. {
  8. $this->addColumn('produit', 'id_etablissement', Schema::TYPE_INTEGER) ;
  9. $this->addColumn('production', 'id_etablissement', Schema::TYPE_INTEGER) ;
  10. $this->addColumn('point_vente', 'id_etablissement', Schema::TYPE_INTEGER) ;
  11. $this->addColumn('user', 'id_etablissement', Schema::TYPE_INTEGER) ;
  12. }
  13. public function down()
  14. {
  15. $this->dropColumn('produit', 'id_etablissement') ;
  16. $this->dropColumn('production', 'id_etablissement') ;
  17. $this->dropColumn('point_vente', 'id_etablissement') ;
  18. }
  19. /*
  20. // Use safeUp/safeDown to run migration code within a transaction
  21. public function safeUp()
  22. {
  23. }
  24. public function safeDown()
  25. {
  26. }
  27. */
  28. }