Browse Source

Mettre à jour le titre du site

master
keun 8 years ago
parent
commit
5cd1cfa167
2 changed files with 32 additions and 3 deletions
  1. +1
    -3
      console/migrations/m161014_084709_table_user_boulangerie.php
  2. +31
    -0
      console/migrations/m161020_072119_champs_boulangerie.php

+ 1
- 3
console/migrations/m161014_084709_table_user_boulangerie.php View File

{ {
public function up() public function up()
{ {
$this->createTable('user_boulangerie', [ $this->createTable('user_boulangerie', [
'id' => 'pk',
'id_user' => Schema::TYPE_INTEGER . ' NOT NULL', 'id_user' => Schema::TYPE_INTEGER . ' NOT NULL',
'id_boulangerie' => Schema::TYPE_INTEGER . ' NOT NULL', 'id_boulangerie' => Schema::TYPE_INTEGER . ' NOT NULL',
'PRIMARY KEY (`id_user`, `id_boulangerie`)'
]); ]);

} }


public function down() public function down()

+ 31
- 0
console/migrations/m161020_072119_champs_boulangerie.php View File

<?php

use yii\db\Migration;

class m161020_072119_champs_boulangerie extends Migration
{
public function up()
{
$this->addColumn('user', 'logo', Schema::TYPE_STRING) ;
$this->addColumn('user', 'photo', Schema::TYPE_STRING) ;
$this->addColumn('user', 'description', Schema::TYPE_TEXT) ;
}

public function down()
{
$this->dropColumn('user', 'logo');
$this->dropColumn('user', 'photo');
$this->dropColumn('user', 'description');
}

/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}

public function safeDown()
{
}
*/
}

Loading…
Cancel
Save