refactor items table
This commit is contained in:
parent
836fb96f42
commit
8ab469e017
4 changed files with 56 additions and 22 deletions
36
database/migrations/2020_01_18_212520_cleanup_tables.php
Normal file
36
database/migrations/2020_01_18_212520_cleanup_tables.php
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CleanupTables extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('items', function (Blueprint $table) {
|
||||
$table->dropColumn('wo');
|
||||
});
|
||||
Schema::table('items', function (Blueprint $table) {
|
||||
$table->dropColumn('wann');
|
||||
});
|
||||
Schema::table('items', function (Blueprint $table) {
|
||||
$table->renameColumn('item_uid','uid');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue