瀏覽代碼

Mettre à jour le titre du site

prodstable
keun 8 年之前
父節點
當前提交
5cd1cfa167
共有 2 個文件被更改,包括 32 次插入3 次删除
  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 查看文件

@@ -7,13 +7,11 @@ class m161014_084709_table_user_boulangerie extends Migration
{
public function up()
{
$this->createTable('user_boulangerie', [
'id' => 'pk',
'id_user' => Schema::TYPE_INTEGER . ' NOT NULL',
'id_boulangerie' => Schema::TYPE_INTEGER . ' NOT NULL',
'PRIMARY KEY (`id_user`, `id_boulangerie`)'
]);

}

public function down()

+ 31
- 0
console/migrations/m161020_072119_champs_boulangerie.php 查看文件

@@ -0,0 +1,31 @@
<?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…
取消
儲存