From fa28202a2c6714ad2b799237edc202f34b409d00 Mon Sep 17 00:00:00 2001 From: Gregorio Chiko Date: Sat, 23 Sep 2017 01:24:35 +0700 Subject: [PATCH] Fixed timestamp default value, and igonre Config.php but still update Config.php.example --- .gitignore | 1 + App/Models/Post.php | 2 +- lepisi.sql | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6b074f7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +App/Config.php diff --git a/App/Models/Post.php b/App/Models/Post.php index 2038a2f..03a8d0d 100644 --- a/App/Models/Post.php +++ b/App/Models/Post.php @@ -14,7 +14,7 @@ class Post extends \Core\Model 'valid_at timestamp NOT NULL DEFAULT "00-00-00 00:00:00"', 'expired_at timestamp NOT NULL DEFAULT "00-00-00 00:00:00"', 'creator int(3) NOT NULL', - 'edited_at timestamp', + 'edited_at timestamp DEFAULT 0', 'editor int(3)', 'content varchar(255) NOT NULL', 'status tinyint(1) NOT NULL DEFAULT 1', diff --git a/lepisi.sql b/lepisi.sql index b3daf01..f51d0a7 100644 --- a/lepisi.sql +++ b/lepisi.sql @@ -28,7 +28,7 @@ CREATE TABLE `pengumuman` ( `valid_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `expired_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `creator` int(3) NOT NULL, - `edited_at` timestamp NULL DEFAULT NULL, + `edited_at` timestamp DEFAULT 0, `editor` int(3) DEFAULT NULL, `content` varchar(255) NOT NULL, `status` tinyint(1) NOT NULL DEFAULT 1,