Welcome Guest Login Register Member List
ExpressionEngine Forums
Advanced Search
Username: Password:
Remember Me? forgot password?
You are here: Forum Home  >  Installation  >  Linux  >  Thread
   
 
Error on rake
 
land0
Posted: 13 June 2007 02:06 AM   [ Ignore ]  
Newbie
Rank
Total Posts:  2
Joined  2007-05-07

Hello all,

Let me start by saying that Tracks has saved my life and for sure enabled me to accomplish more than I ever have before in the span of a day. THANK YOU smile

I have been using Tracks online through Tracks.tra.in for a while now and I have wanted to have a local install of tracks that I can work with.

I am using Debian Etch4 ruby 1.8 MySQL 5.x

When I run rake db:migrate inside of the tracks folder I get a partial rake and it fails with

rake aborted!
Mysql::Error: Invalid default value for ‘created’: CREATE TABLE todos (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `context_id` int(11) NOT NULL, `project_id` int(11), `description` varchar(255) NOT NULL, `notes` text, `done` tinyint(1) DEFAULT 0 NOT NULL, `created` datetime DEFAULT ‘0000-01-01 00:00:00’, `due` date, `completed` datetime) ENGINE=InnoDB

I am not a ROR and SQL pro yet wink so I am at a bit of a loss for being able to trouble shoot this error. I searched for a solution online and here I came up blank. :(

If someone could point me in the right direction that would be great.

Thank you again for such a great tool.

Profile
 
bsag
Posted: 14 June 2007 05:28 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  217
Joined  2006-03-05

I think you might have bumped into an issue with the default value of date fields in the migration files which happens with some versions of MySQL. This has been fixed in the trunk, but to fix it for your distribution, you can do the following (instructions by Justin Francis here:

Modify /path/to/tracks-1.043/db/migrate/001_create_tracks_db.rb (due to invalid default date value error):
  - change the default year from ‘0000’ to ‘9999’ in the datetime line for the ‘created’ field in the ‘todo’ table section

Modify /path/to/tracks-1.043/db/migrate/004_notes.rb (same reason as above):
  - change two occurrences of the default year ‘0000’ to ‘9999’

Give that a go and try rake db:migrate again.

Profile
 
land0
Posted: 14 June 2007 05:41 PM   [ Ignore ]   [ # 2 ]  
Newbie
Rank
Total Posts:  2
Joined  2007-05-07

Thank you once again,

That was exactly the issue. Rake went without a hitch after updating the year field. smile

Profile
 
   
 
 
‹‹ My one-line script for fast task entry      Installing latest development version ››

Powered By ExpressionEngine
Template Design By Sonnenvogel.com
Select a theme:

ExpressionEngine Discussion Forum - Version 2.1.1 (20081028)
Script Executed in 0.1134 seconds

Atom Feed
RSS 2.0