feat(settings): Aggiunta tabella impostazioni

This commit is contained in:
Maicol Battistini 2021-12-13 19:31:19 +01:00
parent d99b5d3014
commit 09c0375415
No known key found for this signature in database
GPG Key ID: 4FDB0F87CDB1D34A
1 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,41 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSettingsTable extends Migration
{
/**
* Set up the options.
*/
public function __construct()
{
$this->table = config('setting.database.table');
$this->key = config('setting.database.key');
$this->value = config('setting.database.value');
}
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create($this->table, function (Blueprint $table) {
$table->increments('id');
$table->string($this->key)->index();
$table->text($this->value);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop($this->table);
}
}