BUB-19 - Aggiunto tabella gestione Progetti e prime funzioni nel model

This commit is contained in:
2023-04-12 16:16:26 +02:00
parent e95f5b2e14
commit 6d759ffacd
5 changed files with 158 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateProgettisTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('progettis', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->string('nome',255);
$table->longText('descrizione');
$table->date('data_creazione');
$table->date('data_inizio')->nullable();
$table->date('data_fine')->nullable();
$table->foreignId('fk_user')->constrained('users');
$table->decimal('budget',10,2)->nullable();
$table->enum('stato', ['aperto','bloccato','chiuso']);
$table->longtext('note')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('progettis');
}
}