Skip to content

Commit

Permalink
feat: added data to installation
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaile committed Dec 15, 2022
1 parent 21d1391 commit 48035c2
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/Models/Installation.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ class Installation extends Model
'type',
];

/**
* {@inheritdoc}
*/
protected $casts = [
'data' => 'array',
];

/**
* Get the country associated with the Installation
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('installations', function (Blueprint $table) {
$table->json('data')->nullable();
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('installations', function (Blueprint $table) {
$table->dropColumn('data');
});
}
};

0 comments on commit 48035c2

Please sign in to comment.