feat: add quarter field to company history items with localization support, enhancing data organization and user experience
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?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('company_history_items', function (Blueprint $table) {
|
||||
$table->string('quarter', 2)->default('Q1')->after('year');
|
||||
$table->index(['year', 'quarter']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('company_history_items', function (Blueprint $table) {
|
||||
$table->dropIndex(['year', 'quarter']);
|
||||
$table->dropColumn('quarter');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user