您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

m190222_090304_ajout_champs_options_credit.php 501B

1234567891011121314151617
  1. <?php
  2. use yii\db\Migration;
  3. use yii\db\mysql\Schema;
  4. class m190222_090304_ajout_champs_options_credit extends Migration {
  5. public function up() {
  6. $this->addColumn('producer', 'credit_limit', Schema::TYPE_FLOAT) ;
  7. $this->addColumn('producer', 'use_credit_checked_default', Schema::TYPE_BOOLEAN.' DEFAULT 1') ;
  8. }
  9. public function down() {
  10. $this->dropColumn('producer', 'credit_limit') ;
  11. $this->dropColumn('producer', 'use_credit_checked_default') ;
  12. }
  13. }