From 26873a2db49a2bd0a5c704da52ce7a2d4ac83f41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kv=C3=A1=C4=8Dek?= Date: Thu, 28 Jan 2016 22:42:06 +0100 Subject: [PATCH] FEATURE: add string id for action log types. This string ID will be used in each logger for better readability (we will use string identifier except the "magical" integer constant) --- ...01_28_213204_AddStringIdForActionTypes.php | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 database/migrations/2016_01_28_213204_AddStringIdForActionTypes.php diff --git a/database/migrations/2016_01_28_213204_AddStringIdForActionTypes.php b/database/migrations/2016_01_28_213204_AddStringIdForActionTypes.php new file mode 100644 index 00000000..bb02c3cc --- /dev/null +++ b/database/migrations/2016_01_28_213204_AddStringIdForActionTypes.php @@ -0,0 +1,33 @@ +string('string_id', 64) + ->after('id') + ->unique()->comment = 'String ID used for better readability in loggers'; + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('action_log_types', function (Blueprint $table) { + $table->dropColumn('string_id'); + }); + } +}