title: How to create mysql table with column timestamp default current_date?
body: <p>I need to create mysql table with default value on column CURRENT_DATE()</p>
  
  <p>I try</p>
  
  <pre><code>DROP TABLE IF EXISTS `visitors`;
  CREATE TABLE `visitors` (
    `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
    `ip` VARCHAR(32) NOT NULL,
    `browser` VARCHAR(500) NOT NULL,
    `version` VARCHAR(500) NOT NULL,
    `platform` ENUM('w','l','m') NOT NULL,
    `date` TIMESTAMP NOT NULL DEFAULT CURRENT_DATE(),
    PRIMARY KEY (`id`),
    UNIQUE KEY `person` (`ip`,`date`)
  ) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
  </code></pre>
  
  <p>but it is writting an error</p>
  
  <pre><code>Query: CREATE TABLE `visitors` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `ip` VARCHAR(32) NOT NULL, `browser` VARCHAR(500) NO...
  
  Error Code: 1064
  You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURRENT_DATE() NOT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `person` (`ip`,`date`)
  ) ENGINE=INNODB AUTO_INCREMENT=1' at line 7
  
  Execution Time : 0 sec
  Transfer Time  : 0 sec
  Total Time     : 0.063 sec
  </code></pre>
  
  <p>what is the problem?</p>
  
  <p>I need to uniques only date 
  not with full time info...</p>
  
  <p>can you help me?</p>