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.

m160223_105614_options_user.php 1.4KB

пре 8 година
123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. use yii\db\Schema;
  3. use yii\db\Migration;
  4. class m160223_105614_options_user extends Migration
  5. {
  6. public function up()
  7. {
  8. $this->addColumn('user', 'no_mail', Schema::TYPE_BOOLEAN) ;
  9. $this->addColumn('user', 'mail_prod_lundi', Schema::TYPE_BOOLEAN) ;
  10. $this->addColumn('user', 'mail_prod_mardi', Schema::TYPE_BOOLEAN) ;
  11. $this->addColumn('user', 'mail_prod_mercredi', Schema::TYPE_BOOLEAN) ;
  12. $this->addColumn('user', 'mail_prod_jeudi', Schema::TYPE_BOOLEAN) ;
  13. $this->addColumn('user', 'mail_prod_vendredi', Schema::TYPE_BOOLEAN) ;
  14. $this->addColumn('user', 'mail_prod_samedi', Schema::TYPE_BOOLEAN) ;
  15. $this->addColumn('user', 'mail_prod_dimanche', Schema::TYPE_BOOLEAN) ;
  16. }
  17. public function down()
  18. {
  19. $this->dropColumn('user', 'no_mail') ;
  20. $this->dropColumn('user', 'mail_prod_lundi') ;
  21. $this->dropColumn('user', 'mail_prod_mardi') ;
  22. $this->dropColumn('user', 'mail_prod_mercredi') ;
  23. $this->dropColumn('user', 'mail_prod_jeudi') ;
  24. $this->dropColumn('user', 'mail_prod_vendredi') ;
  25. $this->dropColumn('user', 'mail_prod_samedi') ;
  26. $this->dropColumn('user', 'mail_prod_dimanche') ;
  27. }
  28. /*
  29. // Use safeUp/safeDown to run migration code within a transaction
  30. public function safeUp()
  31. {
  32. }
  33. public function safeDown()
  34. {
  35. }
  36. */
  37. }