summaryrefslogtreecommitdiff
path: root/db/migrations/2018_09_11_000000_create_sessions_table.php
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrations/2018_09_11_000000_create_sessions_table.php')
-rw-r--r--db/migrations/2018_09_11_000000_create_sessions_table.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/db/migrations/2018_09_11_000000_create_sessions_table.php b/db/migrations/2018_09_11_000000_create_sessions_table.php
new file mode 100644
index 00000000..33a9f569
--- /dev/null
+++ b/db/migrations/2018_09_11_000000_create_sessions_table.php
@@ -0,0 +1,27 @@
+<?php
+
+use Engelsystem\Database\Migration\Migration;
+use Illuminate\Database\Schema\Blueprint;
+
+class CreateSessionsTable extends Migration
+{
+ /**
+ * Run the migration
+ */
+ public function up()
+ {
+ $this->schema->create('sessions', function (Blueprint $table) {
+ $table->string('id')->unique();
+ $table->text('payload');
+ $table->dateTime('last_activity')->useCurrent();
+ });
+ }
+
+ /**
+ * Reverse the migration
+ */
+ public function down()
+ {
+ $this->schema->dropIfExists('sessions');
+ }
+}