<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Migrations &#8211; the CakePHP way(?)</title>
	<atom:link href="http://cakebaker.42dh.com/2008/04/13/migrations-the-cakephp-way/feed/" rel="self" type="application/rss+xml" />
	<link>http://cakebaker.42dh.com/2008/04/13/migrations-the-cakephp-way/</link>
	<description>baking cakes with CakePHP</description>
	<lastBuildDate>Tue, 16 Mar 2010 00:59:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2008/04/13/migrations-the-cakephp-way/comment-page-1/#comment-136594</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Fri, 18 Sep 2009 15:01:55 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=594#comment-136594</guid>
		<description>@Don: Thanks for the links!</description>
		<content:encoded><![CDATA[<p>@Don: Thanks for the links!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Don Kirkby</title>
		<link>http://cakebaker.42dh.com/2008/04/13/migrations-the-cakephp-way/comment-page-1/#comment-136544</link>
		<dc:creator>Don Kirkby</dc:creator>
		<pubDate>Thu, 17 Sep 2009 17:06:01 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=594#comment-136544</guid>
		<description>The CakePHP documentation now includes a basic description of the schema shell:
http://book.cakephp.org/view/734/Schema-management-and-migrations

I haven&#039;t decided yet whether to use schema shell or migrations. There&#039;s also a descendant of Joel Moss&#039;s migrations that includes YAML generation:
http://bakery.cakephp.org/articles/view/cakephp-yaml-migrations-and-fixtures-without-pear</description>
		<content:encoded><![CDATA[<p>The CakePHP documentation now includes a basic description of the schema shell:<br />
<a href="http://book.cakephp.org/view/734/Schema-management-and-migrations" rel="nofollow">http://book.cakephp.org/view/734/Schema-management-and-migrations</a></p>
<p>I haven&#8217;t decided yet whether to use schema shell or migrations. There&#8217;s also a descendant of Joel Moss&#8217;s migrations that includes YAML generation:<br />
<a href="http://bakery.cakephp.org/articles/view/cakephp-yaml-migrations-and-fixtures-without-pear" rel="nofollow">http://bakery.cakephp.org/articles/view/cakephp-yaml-migrations-and-fixtures-without-pear</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2008/04/13/migrations-the-cakephp-way/comment-page-1/#comment-132050</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Mon, 06 Jul 2009 14:59:55 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=594#comment-132050</guid>
		<description>@atomicguava: I&#039;m sorry, but I don&#039;t have an idea why you get those duplicate column errors. Maybe you will have more luck in the IRC channel or the Google Group...

I&#039;m not sure what you mean with &quot;unless schema can also move rows from tables&quot;, though as far as I know (I don&#039;t use the schema script myself) the schema tool is only about structure and not about data. Maybe you can use the &quot;after&quot;-callback method for this purpose?</description>
		<content:encoded><![CDATA[<p>@atomicguava: I&#8217;m sorry, but I don&#8217;t have an idea why you get those duplicate column errors. Maybe you will have more luck in the IRC channel or the Google Group&#8230;</p>
<p>I&#8217;m not sure what you mean with &#8220;unless schema can also move rows from tables&#8221;, though as far as I know (I don&#8217;t use the schema script myself) the schema tool is only about structure and not about data. Maybe you can use the &#8220;after&#8221;-callback method for this purpose?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: atomicguava</title>
		<link>http://cakebaker.42dh.com/2008/04/13/migrations-the-cakephp-way/comment-page-1/#comment-131951</link>
		<dc:creator>atomicguava</dc:creator>
		<pubDate>Sat, 04 Jul 2009 20:22:13 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=594#comment-131951</guid>
		<description>@cakebaker: Thanks for the advice, this got me over one hurdle - sadly I have another!

When I put the site live, I manually added the SQL data into the database from a PHPMyAdmin dump file.

Now, if I do a schema update, it seems to want to change every column in every database - to an identical field name and type.

Update ends like this:
Updating Database...
activities: 1060: Duplicate column name &#039;id&#039;
...
...
activities: 1060: Duplicate column name &#039;id&#039;

(There is one of these &#039;duplicate column&#039; messages for each DB table)

The question is - should I have used the &#039;schema create&#039; command to put the DB tables onto my production server? If so, that&#039;s all well and good, but I&#039;d still need to have a patch file populate with the initial row data - unless schema can also move rows from tables?</description>
		<content:encoded><![CDATA[<p>@cakebaker: Thanks for the advice, this got me over one hurdle &#8211; sadly I have another!</p>
<p>When I put the site live, I manually added the SQL data into the database from a PHPMyAdmin dump file.</p>
<p>Now, if I do a schema update, it seems to want to change every column in every database &#8211; to an identical field name and type.</p>
<p>Update ends like this:<br />
Updating Database&#8230;<br />
activities: 1060: Duplicate column name &#8216;id&#8217;<br />
&#8230;<br />
&#8230;<br />
activities: 1060: Duplicate column name &#8216;id&#8217;</p>
<p>(There is one of these &#8216;duplicate column&#8217; messages for each DB table)</p>
<p>The question is &#8211; should I have used the &#8217;schema create&#8217; command to put the DB tables onto my production server? If so, that&#8217;s all well and good, but I&#8217;d still need to have a patch file populate with the initial row data &#8211; unless schema can also move rows from tables?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2008/04/13/migrations-the-cakephp-way/comment-page-1/#comment-131921</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Sat, 04 Jul 2009 08:44:30 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=594#comment-131921</guid>
		<description>@atomicguava: Thanks for your comment!

You can provide a schema name when you run &#039;schema run&#039;: &#039;cake schema run update your_schema&#039;

Hope that helps!</description>
		<content:encoded><![CDATA[<p>@atomicguava: Thanks for your comment!</p>
<p>You can provide a schema name when you run &#8217;schema run&#8217;: &#8216;cake schema run update your_schema&#8217;</p>
<p>Hope that helps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: atomicguava</title>
		<link>http://cakebaker.42dh.com/2008/04/13/migrations-the-cakephp-way/comment-page-1/#comment-131838</link>
		<dc:creator>atomicguava</dc:creator>
		<pubDate>Fri, 03 Jul 2009 08:47:51 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=594#comment-131838</guid>
		<description>I got all excited when I read this post about migrating schemas. I followed the instructions to the letter and it works fine on my development server (where I generated the schema.php file).

However, when I add the schema.php to my GIT repository and push to my live server, I get the message: &quot;Error: schema.php could not be loaded&quot;. 

Exploring the problem further, I tried to generate a schema.php file on my live server - this worked fine.

Comparing the two generated files, I think it&#039;s got something to do with the way schema.php is generated - my local schema.php has the class name of &#039;TestAppSchema&#039; whereas the one generated on my live server is &#039;HttpdocsSchema&#039;. Clearly, it&#039;s using the name of the App root folder as the class so my question is:

How can I get the class to be consistent so that the &#039;cake schema run update&#039; command works in different environments?</description>
		<content:encoded><![CDATA[<p>I got all excited when I read this post about migrating schemas. I followed the instructions to the letter and it works fine on my development server (where I generated the schema.php file).</p>
<p>However, when I add the schema.php to my GIT repository and push to my live server, I get the message: &#8220;Error: schema.php could not be loaded&#8221;. </p>
<p>Exploring the problem further, I tried to generate a schema.php file on my live server &#8211; this worked fine.</p>
<p>Comparing the two generated files, I think it&#8217;s got something to do with the way schema.php is generated &#8211; my local schema.php has the class name of &#8216;TestAppSchema&#8217; whereas the one generated on my live server is &#8216;HttpdocsSchema&#8217;. Clearly, it&#8217;s using the name of the App root folder as the class so my question is:</p>
<p>How can I get the class to be consistent so that the &#8216;cake schema run update&#8217; command works in different environments?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2008/04/13/migrations-the-cakephp-way/comment-page-1/#comment-108572</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Wed, 01 Oct 2008 14:49:27 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=594#comment-108572</guid>
		<description>@Aejaz: Thanks for your comment!

As far as I understand the schema script it is only for managing schema changes, and so I think that what you try to accomplish is not supported by the schema script...</description>
		<content:encoded><![CDATA[<p>@Aejaz: Thanks for your comment!</p>
<p>As far as I understand the schema script it is only for managing schema changes, and so I think that what you try to accomplish is not supported by the schema script&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aejaz</title>
		<link>http://cakebaker.42dh.com/2008/04/13/migrations-the-cakephp-way/comment-page-1/#comment-108539</link>
		<dc:creator>Aejaz</dc:creator>
		<pubDate>Wed, 01 Oct 2008 09:23:55 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=594#comment-108539</guid>
		<description>Hi guys,

nice tutorial for cake migrations but is there any way that i can insert some sample data into database with tables using the schema i tried a lot inserting queries in schema.php but no use its creating a table of that query.

i need some default data to be inserted into database when i create the tables using schema.

like in users table it create with name username and passwords as fields and as well as i want to insert data into the table

username              password

xyz                                 123456
abc                                xyz123

like this?how can i do it using schema i know how to perform the above action using YAML file i have done but i want to do it using schema file?how

pls help? i think this is the feature which is lacking in shell??</description>
		<content:encoded><![CDATA[<p>Hi guys,</p>
<p>nice tutorial for cake migrations but is there any way that i can insert some sample data into database with tables using the schema i tried a lot inserting queries in schema.php but no use its creating a table of that query.</p>
<p>i need some default data to be inserted into database when i create the tables using schema.</p>
<p>like in users table it create with name username and passwords as fields and as well as i want to insert data into the table</p>
<p>username              password</p>
<p>xyz                                 123456<br />
abc                                xyz123</p>
<p>like this?how can i do it using schema i know how to perform the above action using YAML file i have done but i want to do it using schema file?how</p>
<p>pls help? i think this is the feature which is lacking in shell??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2008/04/13/migrations-the-cakephp-way/comment-page-1/#comment-97681</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Tue, 08 Jul 2008 15:48:33 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=594#comment-97681</guid>
		<description>@Ziad: I&#039;m glad I could help. Using the non-MySQL drivers is always a bit risky as those drivers are not used that often and so probably contain more bugs than their MySQL counter part.</description>
		<content:encoded><![CDATA[<p>@Ziad: I&#8217;m glad I could help. Using the non-MySQL drivers is always a bit risky as those drivers are not used that often and so probably contain more bugs than their MySQL counter part.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ziad</title>
		<link>http://cakebaker.42dh.com/2008/04/13/migrations-the-cakephp-way/comment-page-1/#comment-97383</link>
		<dc:creator>Ziad</dc:creator>
		<pubDate>Sat, 05 Jul 2008 06:38:12 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=594#comment-97383</guid>
		<description>@cakebaker: Thanks for your suggestion. I tried it in MySQL. I used &#039;mysqli&#039; driver first and got pretty much the same result. Then I tried &#039;mysql&#039; driver and it worked!

Then I did some digging around in the code and found that the problem was that the postgres and mysqli drivers don&#039;t override the alterSchema method which is responsible for generating the SQL for altering the schema.

Maybe I&#039;ll do it, its quite a simple function in the mysql driver so shouldn&#039;t be too difficult to do but for now I&#039;m glad I got to the bottom of that one!</description>
		<content:encoded><![CDATA[<p>@cakebaker: Thanks for your suggestion. I tried it in MySQL. I used &#8216;mysqli&#8217; driver first and got pretty much the same result. Then I tried &#8216;mysql&#8217; driver and it worked!</p>
<p>Then I did some digging around in the code and found that the problem was that the postgres and mysqli drivers don&#8217;t override the alterSchema method which is responsible for generating the SQL for altering the schema.</p>
<p>Maybe I&#8217;ll do it, its quite a simple function in the mysql driver so shouldn&#8217;t be too difficult to do but for now I&#8217;m glad I got to the bottom of that one!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
