Added settings table

This commit is contained in:
Henry Whitaker
2020-05-18 22:49:58 +01:00
parent 815003cf0c
commit e889a4f487
7 changed files with 158 additions and 2 deletions

View File

@@ -0,0 +1,37 @@
<?php
use App\Helpers\SettingsHelper;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSettingsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('settings', function (Blueprint $table) {
$table->id();
$table->string('name')->unique();
$table->string('value');
$table->timestamps();
});
SettingsHelper::set('schedule', '0 * * * *');
SettingsHelper::set('server', '');
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('settings');
}
}