From 3d2345c7527bc82e54d35e3b4a1f640707d49523 Mon Sep 17 00:00:00 2001 From: Gregorio Chiko Putra Date: Wed, 13 Sep 2017 11:19:35 +0700 Subject: [PATCH] Fix database issue --- App/Models/Access.php | 2 +- App/Models/Post.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/App/Models/Access.php b/App/Models/Access.php index e238295..a1c90fd 100644 --- a/App/Models/Access.php +++ b/App/Models/Access.php @@ -12,7 +12,7 @@ class Access extends \Core\Model 'password char(13) NOT NULL', 'salt char(23) NOT NULL', 'full_name varchar(50) NOT NULL', - 'registered_at date NOT NULL DEFAULT CURRENT_TIMESTAMP', + 'registered_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP', 'privilage tinyint(1) NOT NULL DEFAULT 0', 'status tinyint(1) NOT NULL DEFAULT 0', 'max_user int(1) NOT NULL DEFAULT 5', diff --git a/App/Models/Post.php b/App/Models/Post.php index 7870c2d..2836ceb 100644 --- a/App/Models/Post.php +++ b/App/Models/Post.php @@ -10,11 +10,11 @@ class Post extends \Core\Model [ 'id int(3) NOT NULL AUTO_INCREMENT', 'category int(3) NOT NULL', - 'created_at date NOT NULL DEFAULT CURRENT_TIMESTAMP', - 'valid_at date NOT NULL DEFAULT CURRENT_TIMESTAMP', - 'expired_at date NOT NULL', + 'created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP', + 'valid_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP', + 'expired_at timestamp NOT NULL', 'creator int(3) NOT NULL', - 'edited_at date', + 'edited_at timestamp', 'editor int(3)', 'content varchar(255) NOT NULL', 'status tinyint(1) NOT NULL DEFAULT 1',