BUB-7 Automobili: Creato funzionalità principali. TODO: Visualizzazione lista operazioni e Implementazione importi in movimenti
This commit is contained in:
@@ -17,7 +17,7 @@ class CreateOperazionesTable extends Migration
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->unsignedBigInteger('fk_auto_id');
|
||||
$table->foreign('fk_auto_id')->references('id')->on('autos');
|
||||
$table->foreign('fk_auto_id')->references('id')->on('autos')->cascadeOnDelete();
|
||||
$table->date('data');
|
||||
$table->bigInteger('km');
|
||||
$table->double('importo',10,2);
|
||||
@@ -19,8 +19,8 @@ class CreateRifornimentosTable extends Migration
|
||||
$table->double('eurolitro',10,2);
|
||||
$table->double('litri',10,2);
|
||||
$table->string('distributore',255);
|
||||
$table->unsignedBigInteger('fk_operazione');
|
||||
$table->foreign('fk_operazione')->references('id')->on('operaziones');
|
||||
$table->unsignedBigInteger('fk_operazione_id');
|
||||
$table->foreign('fk_operazione_id')->references('id')->on('operaziones')->cascadeOnDelete();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,9 @@ class CreateManutenzionesTable extends Migration
|
||||
Schema::create('manutenziones', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->longText('descrizione');
|
||||
$table->unsignedBigInteger('fk_operazione_id');
|
||||
$table->foreign('fk_operazione_id')->references('id')->on('operaziones')->cascadeOnDelete();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,12 @@ class CreateRevisionesTable extends Migration
|
||||
Schema::create('revisiones', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->unsignedBigInteger('fk_operazione_id');
|
||||
$table->foreign('fk_operazione_id')->references('id')->on('operaziones')->cascadeOnDelete();
|
||||
$table->longText('descrizione');
|
||||
$table->string('centrorevisione',255);
|
||||
$table->boolean('superata');
|
||||
$table->date('dataproxrevisione');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,9 @@ class CreateAccessorisTable extends Migration
|
||||
Schema::create('accessoris', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->unsignedBigInteger('fk_operazione_id');
|
||||
$table->foreign('fk_operazione_id')->references('id')->on('operaziones')->cascadeOnDelete();
|
||||
$table->longText('descrizione');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user