1.0.6 fix modifica install.php
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -14,8 +14,8 @@ return new class extends Migration
|
||||
$table->string('nome_file');
|
||||
$table->string('file_path');
|
||||
$table->string('tipo')->nullable();
|
||||
$table->string('tipologia', 50)->default('documento');
|
||||
$table->string('visibilita', 50)->default('gruppo');
|
||||
$table->enum('tipologia', ['avatar', 'galleria', 'documento', 'statuto', 'altro'])->default('documento');
|
||||
$table->enum('visibilita', ['pubblico', 'gruppo', 'individuo', 'associazione', 'federazione'])->default('gruppo');
|
||||
$table->unsignedBigInteger('visibilita_target_id')->nullable();
|
||||
$table->string('visibilita_target_type')->nullable();
|
||||
$table->string('mime_type')->nullable();
|
||||
|
||||
@@ -9,14 +9,14 @@ return new class extends Migration
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('documenti', function (Blueprint $table) {
|
||||
$table->string('visibilita', 50)->default('gruppo')->change();
|
||||
$table->enum('visibilita', ['pubblico', 'gruppo', 'individuo', 'associazione', 'federazione', 'evento'])->default('gruppo')->change();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('documenti', function (Blueprint $table) {
|
||||
$table->string('visibilita', 50)->default('gruppo')->change();
|
||||
$table->enum('visibilita', ['pubblico', 'gruppo', 'individuo', 'associazione', 'federazione'])->default('gruppo')->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -9,14 +9,14 @@ return new class extends Migration
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('documenti', function (Blueprint $table) {
|
||||
$table->string('tipologia', 50)->default('documento')->change();
|
||||
$table->enum('tipologia', ['avatar', 'galleria', 'documento', 'statuto', 'altro', 'email_attachment'])->default('documento')->change();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('documenti', function (Blueprint $table) {
|
||||
$table->string('tipologia', 50)->default('documento')->change();
|
||||
$table->enum('tipologia', ['avatar', 'galleria', 'documento', 'statuto', 'altro'])->default('documento')->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -12,7 +12,7 @@ return new class extends Migration
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('documenti', function (Blueprint $table) {
|
||||
$table->string('visibilita', 50)->nullable()->change();
|
||||
$table->enum('visibilita', ['pubblico', 'gruppo', 'individuo', 'associazione', 'federazione'])->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ return new class extends Migration
|
||||
{
|
||||
Schema::table('gruppo_individuo', function (Blueprint $table) {
|
||||
$table->dropForeign(['ruolo_id']);
|
||||
$table->dropIndex('gruppo_individuo_ruolo_id_index');
|
||||
$table->dropColumn('ruolo_id');
|
||||
});
|
||||
|
||||
|
||||
@@ -1,22 +1,17 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('documenti', function (Blueprint $table) {
|
||||
$table->string('tipologia', 50)->default('documento')->change();
|
||||
});
|
||||
DB::statement("ALTER TABLE documenti MODIFY COLUMN tipologia ENUM('avatar', 'galleria', 'documento', 'statuto', 'altro', 'programma', 'locandina') DEFAULT 'documento'");
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('documenti', function (Blueprint $table) {
|
||||
$table->string('tipologia', 50)->default('documento')->change();
|
||||
});
|
||||
DB::statement("ALTER TABLE documenti MODIFY COLUMN tipologia ENUM('avatar', 'galleria', 'documento', 'statuto', 'altro') DEFAULT 'documento'");
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user