Bläddra i källkod

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

refactoring
Guillaume Bourgeois 5 år sedan
förälder
incheckning
c68762a4f1
2 ändrade filer med 23 tillägg och 0 borttagningar
  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 Visa fil

@@ -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 Visa fil

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

}

Laddar…
Avbryt
Spara