sistemazione migrate
This commit is contained in:
@@ -8,16 +8,18 @@ return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('contatti', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('individuo_id')->constrained('individui')->onDelete('cascade');
|
||||
$table->enum('tipo', ['telefono', 'cellulare', 'email', 'fax', 'web', 'telegram', 'whatsapp', 'altro']);
|
||||
$table->string('valore');
|
||||
$table->string('etichetta')->nullable();
|
||||
$table->boolean('is_primary')->default(false);
|
||||
$table->timestamps();
|
||||
$table->index('individuo_id');
|
||||
});
|
||||
if (!Schema::hasTable('contatti')) {
|
||||
Schema::create('contatti', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('individuo_id')->constrained('individui')->onDelete('cascade');
|
||||
$table->enum('tipo', ['telefono', 'cellulare', 'email', 'fax', 'web', 'telegram', 'whatsapp', 'altro']);
|
||||
$table->string('valore');
|
||||
$table->string('etichetta')->nullable();
|
||||
$table->boolean('is_primary')->default(false);
|
||||
$table->timestamps();
|
||||
$table->index('individuo_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
|
||||
Reference in New Issue
Block a user