From 95887e95947fb4755243d26a5f974df9144526e5 Mon Sep 17 00:00:00 2001 From: drkthunder02 Date: Sun, 17 Nov 2019 09:27:51 -0600 Subject: [PATCH] created first database migration --- app/Library/Timer/TimerHelper.php | 22 +++++++++++++ app/Models/Timers/Timer.php | 33 +++++++++++++++++++ .../2019_11_17_051902_create_timers_table.php | 21 +++++++++--- 3 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 app/Library/Timer/TimerHelper.php create mode 100644 app/Models/Timers/Timer.php diff --git a/app/Library/Timer/TimerHelper.php b/app/Library/Timer/TimerHelper.php new file mode 100644 index 0000000..586d42b --- /dev/null +++ b/app/Library/Timer/TimerHelper.php @@ -0,0 +1,22 @@ +bigIncrements('id'); - $table->timestamps(); - }); + if(!Schema::hasTable('timers')) { + Schema::create('timers', function (Blueprint $table) { + $table->bigIncrements('id'); + $table->string('type'); + $table->string('stage'); + $table->string('region'); + $table->string('sytem'); + $table->string('planet'); + $table->string('moon'); + $table->string('owner'); + $table->unsignedInteger('owner_id'); + $table->dateTime('eveTime'); + $table->text('notes'); + $table->unsignedInteger('character_id'); + $table->timestamps(); + }); + } } /**