Ver código fonte

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

refactoring
Guillaume Bourgeois 5 anos atrás
pai
commit
c68762a4f1
2 arquivos alterados com 23 adições e 0 exclusões
  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 Ver arquivo

@@ -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 Ver arquivo

@@ -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') ;
}

}

Carregando…
Cancelar
Salvar