From 05095a9c8ed75e3660ecce406e7578af426de75d Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sun, 1 Apr 2018 10:41:04 +0200 Subject: [PATCH] DB Migration: 20180401083402_create_activity_log.php --- .../20180401083402_create_activity_log.php | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 app/migrations/20180401083402_create_activity_log.php diff --git a/app/migrations/20180401083402_create_activity_log.php b/app/migrations/20180401083402_create_activity_log.php new file mode 100644 index 0000000..6b49d51 --- /dev/null +++ b/app/migrations/20180401083402_create_activity_log.php @@ -0,0 +1,32 @@ +table('activity_log'); + + $table->addColumn('timestamp', 'datetime', [ + 'default' => 'CURRENT_TIMESTAMP', + 'after' => 'email' + ]); + + $table->addColumn('user_id', 'integer') + ->addForeignKey('user_id', 'user', ['id']); + + $table->addColumn('ip', 'string', [ + 'null' => true, + 'length' => 50, + ]); + + $table->addColumn('message', 'string', [ + 'null' => true, + 'length' => 255, + ]); + + $table->save(); + } +}