setup viste
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
<?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('viste_report', function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('viste_report', 'colonne_larghezze')) {
|
||||
$table->json('colonne_larghezze')->nullable()->after('colonne_visibili');
|
||||
}
|
||||
if (!Schema::hasColumn('viste_report', 'colonne_ordine')) {
|
||||
$table->json('colonne_ordine')->nullable()->after('colonne_larghezze');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('viste_report', function (Blueprint $table) {
|
||||
if (Schema::hasColumn('viste_report', 'colonne_larghezze')) {
|
||||
$table->dropColumn('colonne_larghezze');
|
||||
}
|
||||
if (Schema::hasColumn('viste_report', 'colonne_ordine')) {
|
||||
$table->dropColumn('colonne_ordine');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user