I'm using RC3 with mysql (experienced coder but first time using
cakephp), and I have a schema:
class TestSchema extends CakeSchema {
var $name = 'Plans';
function before($event = array()) {
return false;
}
function after($event = array()) {
}
var $xUsers = array(
'uid' => array('type'=>'integer', 'null' => false,
'default' =>
NULL, 'key' => 'primary'),
'email' => array('type'=>'string', 'null' => true,
'length' => 50,
'default' => NULL),
'password' => array('type'=>'string', 'null' => true,
'length' =>
50,'default' => NULL),
'admin' => array('type'=>'boolean', 'null' => false,
'default' =>
false),
'indexes' => array('PRIMARY' => array('column' =>
'uid', 'unique'
=> 1))
);
}
when I run ./cake schema run create Test all runs fine:
Welcome to CakePHP v1.2.0.7692 RC3 Console
---------------------------------------------------------------
App : app
Path: /Library/WebServer/Documents/app
---------------------------------------------------------------
Cake Schema Shell
---------------------------------------------------------------
The following table(s) will be dropped.
xUsers
Are you sure you want to drop the table(s)? (y/n)
[n] > y
Dropping table(s).
xUsers updated.
The following table(s) will be created.
xUsers
Are you sure you want to create the table(s)? (y/n)
[y] > y
Creating table(s).
xUsers updated.
End create.
All good, but when I run ./cake schema run update Test, I get the
following:
Welcome to CakePHP v1.2.0.7692 RC3 Console
---------------------------------------------------------------
App : app
Path: /Library/WebServer/Documents/app
---------------------------------------------------------------
Cake Schema Shell
---------------------------------------------------------------
Comparing Database to Schema...
Warning: Column name or type not defined in schema in /Library/
WebServer/Documents/cake/libs/model/datasources/dbo_source.php on line
2293
The following statements will run.
ALTER TABLE `dev_xUsers`
ADD `uid` int(11) NOT NULL AUTO_INCREMENT,
ADD `email` varchar(50) DEFAULT NULL,
ADD `password` varchar(50) DEFAULT NULL,
ADD `admin` tinyint(1) DEFAULT 0 NOT NULL,
ADD ;
Are you sure you want to alter the tables? (y/n)
[n] > n
End update.
This appears even when I make no changes to the schema. Anybody seen
this? Could it be related to my version of mysql?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---