Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

43 rindas
1.4KB

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