goodsnotices/database/migrations/2024_05_25_135703_modify_goods_table.php

29 lines
598 B
PHP
Raw Normal View History

2024-05-25 14:06:58 +00:00
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('goods', function (Blueprint $table) {
$table->renameColumn('itemid','id');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('goods', function (Blueprint $table) {
$table->renameColumn('id','itemid');
});
}
};