mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
beginning of migrations
This commit is contained in:
parent
c9fcc906fb
commit
78d589fe78
|
@ -8,4 +8,16 @@ use Illuminate\Database\Eloquent\Model;
|
||||||
class SavedReport extends Model
|
class SavedReport extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
|
here be really sexy dragons
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that should be cast.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $casts = [
|
||||||
|
'options' => 'array',
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,11 @@ class CreateSavedReportsTable extends Migration
|
||||||
{
|
{
|
||||||
Schema::create('saved_reports', function (Blueprint $table) {
|
Schema::create('saved_reports', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
|
$table->integer('user_id')->nullable();
|
||||||
|
$table->string('name');
|
||||||
|
$table->json('options');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
|
$table->index('user_id');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue