#6205: Invalid default value for datetime/timestamp ---------------------------+------------------------------------------------ Reporter: verbal | Owner: mark_story Type: Test Case | Status: assigned Priority: Medium | Milestone: 1.2.x.x Component: MySQLi | Version: 1.2 Final Severity: Normal | Resolution: Keywords: | Php_version: PHP 5 Cake_version: 1.2.1.8004 | ---------------------------+------------------------------------------------ Comment (by verbal):
I updated mysql from 5.0.37-log to 5.0.67-log and 'svn up' cake to rev 8116. Test with users table having datetime column is OK but there is still issue when there is timestamp column. I have created table: {{{ CREATE TABLE `someapp`.`users` ( `id` int(10) NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT '' NOT NULL, `password` varchar(255) DEFAULT '' NOT NULL, `created` timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, `modified` timestamp DEFAULT '0000-00-00 00:00:00' NOT NULL, PRIMARY KEY (`id`)); }}} and fixture tries to create: {{{ CREATE TABLE `users` ( `id` int(10) NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT '' NOT NULL, `password` varchar(255) DEFAULT '' NOT NULL, `created` timestamp DEFAULT 'CURRENT_TIMESTAMP' NOT NULL, `modified` timestamp DEFAULT '0000-00-00 00:00:00' NOT NULL, PRIMARY KEY (`id`)); }}} 'CURRENT_TIMESTAMP' is with single quotes, and it shouldn't be. -- Ticket URL: <https://trac.cakephp.org/ticket/6205#comment:6> CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/> Cake is a rapid development framework for PHP which uses commonly known design patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "tickets cakephp" group. To post to this group, send email to tickets-cakephp@googlegroups.com To unsubscribe from this group, send email to tickets-cakephp+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/tickets-cakephp?hl=en -~----------~----~----~----~------~----~------~--~---