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(); + } +}