소스 검색

Modifier la structure de la base de données pour intégrer les boulangeries

prodstable
keun 8 년 전
부모
커밋
c34e5111c8
2개의 변경된 파일64개의 추가작업 그리고 0개의 파일을 삭제
  1. +32
    -0
      console/migrations/m161012_074719_infos_boulanger.php
  2. +32
    -0
      console/migrations/m161012_075736_ajout_ids_boulangerie.php

+ 32
- 0
console/migrations/m161012_074719_infos_boulanger.php 파일 보기

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

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

class m161012_074719_infos_boulanger extends Migration
{
public function up()
{
$this->addColumn('user', 'is_boulanger', Schema::TYPE_BOOLEAN) ;
$this->addColumn('user', 'nom_magasin', Schema::TYPE_STRING) ;
$this->addColumn('user', 'siret', Schema::TYPE_STRING) ;
}

public function down()
{
$this->dropColumn('user', 'is_boulanger') ;
$this->dropColumn('user', 'nom_magasin') ;
$this->dropColumn('user', 'siret') ;
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}

+ 32
- 0
console/migrations/m161012_075736_ajout_ids_boulangerie.php 파일 보기

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

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

class m161012_075736_ajout_ids_boulangerie extends Migration
{
public function up()
{
$this->addColumn('produit', 'id_boulangerie', Schema::TYPE_INTEGER) ;
$this->addColumn('production', 'id_boulangerie', Schema::TYPE_INTEGER) ;
$this->addColumn('point_vente', 'id_boulangerie', Schema::TYPE_INTEGER) ;
}

public function down()
{
$this->dropColumn('produit', 'id_boulangerie') ;
$this->dropColumn('production', 'id_boulangerie') ;
$this->dropColumn('point_vente', 'id_boulangerie') ;
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}

Loading…
취소
저장