BUB-7 Automobili: Creato funzionalità principali. TODO: Visualizzazione lista operazioni e Implementazione importi in movimenti
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateOperazionesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('operaziones', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->unsignedBigInteger('fk_auto_id');
|
||||
$table->foreign('fk_auto_id')->references('id')->on('autos')->cascadeOnDelete();
|
||||
$table->date('data');
|
||||
$table->bigInteger('km');
|
||||
$table->double('importo',10,2);
|
||||
$table->string('type',100);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('operaziones');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user