beginning of migrations

This commit is contained in:
akemidx 2023-08-24 14:32:37 -04:00
parent c9fcc906fb
commit 78d589fe78
2 changed files with 16 additions and 0 deletions

View file

@ -8,4 +8,16 @@ use Illuminate\Database\Eloquent\Model;
class SavedReport extends Model
{
use HasFactory;
here be really sexy dragons
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'options' => 'array',
];
}

View file

@ -15,7 +15,11 @@ class CreateSavedReportsTable extends Migration
{
Schema::create('saved_reports', function (Blueprint $table) {
$table->id();
$table->integer('user_id')->nullable();
$table->string('name');
$table->json('options');
$table->timestamps();
$table->index('user_id');
});
}