Files
lucent-laravel/src/Database/migrations/2023_10_22_152122_generatedIndexColumn.php
T

39 lines
759 B
PHP
Raw Normal View History

2023-10-22 16:09:36 +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
protected $connection = 'lucentDb';
2023-10-22 16:09:36 +03:00
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('records', function (Blueprint $table) {
$table->text('search')->default("");
$table->index('search');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
2024-08-23 20:58:45 +03:00
public function down()
2023-10-22 16:09:36 +03:00
{
Schema::table('records', function (Blueprint $table) {
$table->dropColumn('search');
$table->dropIndex('search');
});
}
};