More Info:
I just tested with latest version of the 1.3-dev branch and I have the same
issue.
Here are my fixtures and db schema:
'bad_words', 'connection'=>'default',
'records'=>true);
}
?>
'likes', 'connection'=>'default',
'records'=>false);
var $records = array(
array(
'id' => 1,
'fbid' => 234567, //This is Mariluz Gonzalez
'suggestion_id' => 1
),
array(
'id' => 2,
'fbid' => 234567, //This is Mariluz Gonzalez
'suggestion_id' => 2
),
array(
'id' => 3,
'fbid' => 234567, //This is Mariluz Gonzalez
'suggestion_id' => 5
),
array(
'id' => 4,
'fbid' => 234567, //This is Mariluz Gonzalez
'suggestion_id' => 6
)
);
}
?>
'suggestions', 'connection'=>'default',
'records'=>false);
var $records = array(
array(
'id' => 1,
'fbid' => 123456,
'user_name' => 'Rafael Vega',
'song_name' => 'Lasso by Wolfgang Amadeus Phoenix',
'created' => '2010-05-18 11:58:58',
'flavor' => 'Coffee',
'picture_url' => 'http://some.url.com/an_image.jpg'
),
array(
'id' => 2,
'fbid' => 123456,
'user_name' => 'Rafael Vega',
'song_name' => 'Electric Feel by MGMT',
'created' => '2010-05-18 15:58:58',
'flavor' => 'Chocolate',
'picture_url' => 'http://some.url.com/an_image.jpg'
),
array(
'id' => 3,
'fbid' => 234567,
'user_name' => 'Mariluz Gonzalez',
'song_name' => 'Lady by Fela Kuti',
'created' => '2010-05-21 11:28:58',
'flavor' => 'Strawberry',
'picture_url' => 'http://some.url.com/an_image.jpg'
),
array(
'id' => 4,
'fbid' => 234567,
'user_name' => 'Mariluz Gonzalez',
'song_name' => 'Zombie by Fela Kuti',
'created' => '2010-05-22 09:20:02',
'flavor' => 'Vanilla',
'picture_url' => 'http://some.url.com/an_image.jpg'
),
array(
'id' => 5,
'fbid' => 567890,
'user_name' => 'John Doe',
'song_name' => 'Bad by Michael Jackson',
'created' => '2010-05-19 11:58:58',
'flavor' => 'Coffee',
'picture_url' => 'http://some.url.com/an_image.jpg'
),
array(
'id' => 6,
'fbid' => 678901,
'user_name' => 'Cheetah-Ra',
'song_name' => 'Love Cats by the Cure',
'created' => '2010-05-19 15:58:58',
'flavor' => 'Chocolate',
'picture_url' => 'http://some.url.com/an_image.jpg'
),
array(
'id' => 7,
'fbid' => 789012,
'user_name' => 'Leon-Oh',
'song_name' => 'Mas allá de lo evidente by Leo Dan',
'created' => '2010-05-21 11:28:58',
'flavor' => 'Strawberry',
'picture_url' => 'http://some.url.com/an_image.jpg'
),
array(
'id' => 8,
'fbid' => 890123,
'user_name' => 'Jane Tarzan',
'song_name' => 'Welcome to the Jungle by Guns n\' Roses',
'created' => '2010-05-22 09:20:02',
'flavor' => 'Coconut',
'picture_url' => 'http://some.url.com/an_image.jpg'
)
);
}
?>
array('type' => 'integer', 'null' => false, 'default' => NULL,
'key' => 'primary'),
'api_key' => array('type' => 'string', 'null' => false, 'default' => ' ',
'key' => 'unique'),
'secret' => array('type' => 'string', 'null' => false, 'default' => ' '),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1),
'unique_api_key' => array('column' => 'api_key', 'unique' => 1)),
'tableParameters' => array('charset' => 'utf8', 'collate' =>
'utf8_general_ci', 'engine' => 'MyISAM')
);
var $bad_words = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key'
=> 'primary'),
'bad_word' => array('type' => 'string', 'null' => false, 'default' => ' '),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)),
'tableParameters' => array('charset' => 'utf8', 'collate' =>
'utf8_general_ci', 'engine' => 'InnoDB')
);
var $likes = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key'
=> 'primary'),
'fbid' => array('type' => 'integer', 'null' => false, 'default' => NULL,
'length' => 20),
'suggestion_id' => array('type' => 'integer', 'null' => false, 'default' =>
NULL, 'key' => 'index'),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1),
'suggestion_id' => array('column' => 'suggestion_id', 'unique' => 0)),
'tableParameters' => array('charset' => 'utf8', 'collate' =>
'utf8_general_ci', 'engine' => 'InnoDB')
);
var $suggestions = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key'
=> 'primary'),
'fbid' => array('type' => 'integer', 'null' => false, 'default' => NULL,
'length' => 20),
'user_name' => array('type' => 'string', 'null' => true, 'default' =>
NULL),
'song_name' => array('type' => 'string', 'null' => true, 'default' => NULL),
'picture_url' => array('type' => 'string', 'null' => true, 'default' =>
NULL),
'flavor' => array('type' => 'string', 'null' => true, 'default' => NULL),
'created' => array('type' => 'datetime', 'null' => true, 'default' =>
NULL),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)),
'tableParameters' => array('charset' => 'utf8', 'collate' =>
'utf8_general_ci', 'engine' => 'InnoDB')
);
}
?>
2010/5/21 Rafael Vega
>
> Hello.
> I am using cake 1.3.0 and php 5.2.13. I'm trying to test a controller
> (code is below) using fixtures and a subclass of CakeTestCase.
>
> When I run the test, I get a SQL error: "Table