From a4734db4e01bc22eec88b56da3b94e78e16d18d6 Mon Sep 17 00:00:00 2001 From: twinh Date: Tue, 17 Jan 2017 14:22:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0apiLogs=E5=92=8Ctrash?= =?UTF-8?q?=E8=A1=A8=20#2606?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../V20170117120936CreateApiLogsTable.php | 34 +++++++++++++++++++ .../V20170117121751CreateTrashTable.php | 28 +++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 src/Migration/V20170117120936CreateApiLogsTable.php create mode 100644 src/Migration/V20170117121751CreateTrashTable.php diff --git a/src/Migration/V20170117120936CreateApiLogsTable.php b/src/Migration/V20170117120936CreateApiLogsTable.php new file mode 100644 index 00000000..a1a070fb --- /dev/null +++ b/src/Migration/V20170117120936CreateApiLogsTable.php @@ -0,0 +1,34 @@ +schema->table('apiLogs') + ->id() + ->int('appId') + ->mediumInt('code')->comment('HTTP请求或接口返回的状态码') + ->string('url')->comment('请求地址') + ->text('options')->comment('请求参数') + ->mediumText('req') + ->mediumText('res') + ->timestamp('createTime') + ->timestamp('createUser') + ->exec(); + } + + /** + * {@inheritdoc} + */ + public function down() + { + $this->schema->dropIfExists('apiLogs'); + } +} diff --git a/src/Migration/V20170117121751CreateTrashTable.php b/src/Migration/V20170117121751CreateTrashTable.php new file mode 100644 index 00000000..462875c3 --- /dev/null +++ b/src/Migration/V20170117121751CreateTrashTable.php @@ -0,0 +1,28 @@ +schema->table('trash') + ->id() + ->string('tableName', 64) + ->softDeletable() + ->exec(); + } + + /** + * {@inheritdoc} + */ + public function down() + { + $this->schema->dropIfExists('trash'); + } +}