#92 ✓wontfix
Martin Stannard

Fix/report issues with MySQL and migrations

Reported by Martin Stannard | February 16th, 2009 @ 03:33 AM

The query produced by the create_db command is failing when I try to run it.

mysql Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (x86_64) using readline 5.2

The query and error is

/usr/lib/ruby/gems/1.8/gems/dm-core-0.9.10/lib/dm-core/adapters/data_objects_adapter.rb:92:in execute_non_query': (mysql_errno=1064, sql_state=42000) 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 'DEFAULT NULL,branchVARCHAR(50) DEFAULT 'master',commandVARCHAR(50) DEFAU' at line 1 (MysqlError)

Query: CREATE TABLE integrity_projects (id serial PRIMARY KEY, name VARCHAR(50), permalink VARCHAR(50), uri VARCHAR DEFAULT NULL, branch VARCHAR(50) DEFAULT 'master', command VARCHAR(50) DEFAULT 'rake', public TINYINT DEFAULT 1, building TINYINT DEFAULT 0, created_at DATETIME, updated_at DATETIME, build_id INT(11), notifier_id INT(11)) from /usr/lib/ruby/gems/1.8/gems/dm-core-0.9.10/lib/dm-core/adapters/data_objects_adapter.rb:92:in execute'

Running the query on the command line reveals that uri VARCHAR DEFAULT NULL is causing the problem.

Looks like a value is needed for the VARCHAR

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Automated continuous integration server that doesn't suck.

Shared Ticket Bins