瀏覽代碼

Migration : champs relatif au fonctionnement du crédit (paramètres généraux & au niveau de chaque point de vente)

dev
Guillaume Bourgeois 5 年之前
父節點
當前提交
c68762a4f1
共有 2 個檔案被更改,包括 23 行新增0 行删除
  1. +3
    -0
      common/models/Producer.php
  2. +20
    -0
      console/migrations/m190206_135142_ajout_champs_gestion_credit_avancee.php

+ 3
- 0
common/models/Producer.php 查看文件

@@ -62,6 +62,9 @@ use yii\helpers\Html;
*/
class Producer extends ActiveRecordCommon
{
const CREDIT_FUNCTIONING_MANDATORY = 'mandatory' ;
const CREDIT_FUNCTIONING_OPTIONAL = 'optional' ;
var $secret_key_payplug ;
/**

+ 20
- 0
console/migrations/m190206_135142_ajout_champs_gestion_credit_avancee.php 查看文件

@@ -0,0 +1,20 @@
<?php

use yii\db\Migration;
use yii\db\mysql\Schema;

use common\models\Producer ;

class m190206_135142_ajout_champs_gestion_credit_avancee extends Migration {

public function up() {
$this->addColumn('producer', 'credit_functioning', Schema::TYPE_STRING.' DEFAULT \''.Producer::CREDIT_FUNCTIONING_OPTIONAL.'\'') ;
$this->addColumn('point_sale', 'credit_functioning', Schema::TYPE_STRING) ;
}

public function down() {
$this->dropColumn('producer', 'credit_functioning') ;
$this->dropColumn('point_sale', 'credit_functioning') ;
}

}

Loading…
取消
儲存