2022-05-30 09:07:10 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
|
2023-01-05 17:03:31 +00:00
|
|
|
return new class extends Migration
|
2022-05-30 09:07:10 +00:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
Schema::rename('credit_products', 'shop_products');
|
2023-01-05 17:01:42 +00:00
|
|
|
Schema::table('payments', function (Blueprint $table) {
|
2022-05-30 09:07:10 +00:00
|
|
|
$table->renameColumn('credit_product_id', 'shop_item_product_id');
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::rename('shop_products', 'credit_products');
|
|
|
|
|
2023-01-05 17:01:42 +00:00
|
|
|
Schema::table('payments', function (Blueprint $table) {
|
2022-05-30 09:07:10 +00:00
|
|
|
$table->renameColumn('shop_item_product_id', 'credit_product_id');
|
|
|
|
});
|
|
|
|
}
|
2023-01-05 17:03:31 +00:00
|
|
|
};
|