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.

m150608_082455_add_champs_gestion_commandes.php 816B

преди 8 години
12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. use yii\db\Schema;
  3. use yii\db\Migration;
  4. class m150608_082455_add_champs_gestion_commandes extends Migration
  5. {
  6. public function up()
  7. {
  8. // nom/prénom de l'utilisateur (saisie commande à la volée)
  9. $this->addColumn('commande', 'username', Schema::TYPE_STRING) ;
  10. // quantité max
  11. $this->addColumn('produit', 'quantite_max', Schema::TYPE_INTEGER) ;
  12. $this->addColumn('production_produit', 'quantite_max', Schema::TYPE_INTEGER) ;
  13. }
  14. public function down()
  15. {
  16. $this->dropColumn('commande', 'username') ;
  17. $this->dropColumn('production_produit', 'quantite_max') ;
  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. }