Files
lucent-laravel/src/Database/migrations/0005_RecordsUpdatedIndex.php
T

38 lines
831 B
PHP
Raw Normal View History

2023-10-23 19:43:59 +03:00
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
2024-08-27 12:24:51 +03:00
2024-08-27 17:42:06 +03:00
protected $connection = 'lucentdb';
2024-08-27 12:24:51 +03:00
2023-10-23 19:43:59 +03:00
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('records', function (Blueprint $table) {
$table->dropIndex(['schema', 'status']);
2024-08-27 12:24:51 +03:00
$table->index(['schema', '_sys->updatedAt', 'status']);
2023-10-23 19:43:59 +03:00
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('records', function (Blueprint $table) {
2024-08-27 12:24:51 +03:00
$table->dropIndex(['schema', '_sys->updatedAt', 'status']);
2023-10-23 19:43:59 +03:00
$table->index(['schema', 'status']);
});
}
};