feat(social-media): add 'orden' field to social media pivot table and update related functionality

This commit is contained in:
2026-07-23 15:19:17 -03:00
parent 25891cefbc
commit 217f86f624
7 changed files with 70 additions and 7 deletions

View File

@@ -0,0 +1,24 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('tenant_social_media', function (Blueprint $table): void {
$table->unsignedInteger('orden')->default(0)->after('url');
$table->index(['tenant_code', 'orden']);
});
}
public function down(): void
{
Schema::table('tenant_social_media', function (Blueprint $table): void {
$table->dropIndex(['tenant_code', 'orden']);
$table->dropColumn('orden');
});
}
};