<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: How to keep your database under version control?</title>
	<link>http://www.gigapromoters.com/blog/2008/10/30/how-to-keep-your-database-under-version-control/</link>
	<description>News, Developments and Best practices for programming</description>
	<pubDate>Fri, 30 Jul 2010 06:48:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: admin</title>
		<link>http://www.gigapromoters.com/blog/2008/10/30/how-to-keep-your-database-under-version-control/#comment-327</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Wed, 27 Jan 2010 23:41:38 +0000</pubDate>
		<guid>http://www.gigapromoters.com/blog/2008/10/30/how-to-keep-your-database-under-version-control/#comment-327</guid>
		<description>@mugafuga We use our own shell for this nowadays which is called giga_schema shell. This is how we've solved the caching problem:

GigaSchema extends the startup() function of Schema shell like this:

	function startup() 
	{
		Utility::cleanDir(TMP.'cache'.DS.'models'.DS); // delete BS
		parent::startup();
	}

And here's the code of cleanDir() in Utility class

	function cleanDir($path) 
	{
        $folder=&#038; new Folder($path);
        $tree=$folder-&gt;tree($path, false);
        foreach ($tree as $files) {
            foreach ($files as $file) {
                if (!is_dir($file)) {
                    $file=&#038; new File($file);
                    $file-&gt;delete();
                }
            }
        }
        return;
    }   

Hope it helps.</description>
		<content:encoded><![CDATA[<p>@mugafuga We use our own shell for this nowadays which is called giga_schema shell. This is how we&#8217;ve solved the caching problem:</p>
<p>GigaSchema extends the startup() function of Schema shell like this:</p>
<p>	function startup()<br />
	{<br />
		Utility::cleanDir(TMP.&#8217;cache&#8217;.DS.&#8217;models&#8217;.DS); // delete BS<br />
		parent::startup();<br />
	}</p>
<p>And here&#8217;s the code of cleanDir() in Utility class</p>
<p>	function cleanDir($path)<br />
	{<br />
        $folder=&#038; new Folder($path);<br />
        $tree=$folder->tree($path, false);<br />
        foreach ($tree as $files) {<br />
            foreach ($files as $file) {<br />
                if (!is_dir($file)) {<br />
                    $file=&#038; new File($file);<br />
                    $file->delete();<br />
                }<br />
            }<br />
        }<br />
        return;<br />
    }   </p>
<p>Hope it helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mugafuga</title>
		<link>http://www.gigapromoters.com/blog/2008/10/30/how-to-keep-your-database-under-version-control/#comment-326</link>
		<dc:creator>mugafuga</dc:creator>
		<pubDate>Wed, 27 Jan 2010 19:46:24 +0000</pubDate>
		<guid>http://www.gigapromoters.com/blog/2008/10/30/how-to-keep-your-database-under-version-control/#comment-326</guid>
		<description>wouldn't it be nice if there were a command line switch to blow out your model cache. 

like ignore cache could be i 
...cake schema generate -fi

or delete cache could be d
...cake schema generate -fd

Or just make it so that -f blows out the cache. That would like make sense instead of searching and searching and searching and searching because the generate command doesn't seem to see whats in the database ever. 

Or i could just svn:ignore my tmp/cache.</description>
		<content:encoded><![CDATA[<p>wouldn&#8217;t it be nice if there were a command line switch to blow out your model cache. </p>
<p>like ignore cache could be i<br />
&#8230;cake schema generate -fi</p>
<p>or delete cache could be d<br />
&#8230;cake schema generate -fd</p>
<p>Or just make it so that -f blows out the cache. That would like make sense instead of searching and searching and searching and searching because the generate command doesn&#8217;t seem to see whats in the database ever. </p>
<p>Or i could just svn:ignore my tmp/cache.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.gigapromoters.com/blog/2008/10/30/how-to-keep-your-database-under-version-control/#comment-311</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Tue, 20 Oct 2009 17:55:37 +0000</pubDate>
		<guid>http://www.gigapromoters.com/blog/2008/10/30/how-to-keep-your-database-under-version-control/#comment-311</guid>
		<description>Thanks, fixed it longtime back.</description>
		<content:encoded><![CDATA[<p>Thanks, fixed it longtime back.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joebert</title>
		<link>http://www.gigapromoters.com/blog/2008/10/30/how-to-keep-your-database-under-version-control/#comment-310</link>
		<dc:creator>joebert</dc:creator>
		<pubDate>Tue, 20 Oct 2009 14:45:31 +0000</pubDate>
		<guid>http://www.gigapromoters.com/blog/2008/10/30/how-to-keep-your-database-under-version-control/#comment-310</guid>
		<description>I couldn't help but notice the xdebug zend extension warning in your command prompt. :)
http://develobert.blogspot.com/2008/06/xdebug-must-be-loaded-as-zend-extension.html</description>
		<content:encoded><![CDATA[<p>I couldn&#8217;t help but notice the xdebug zend extension warning in your command prompt. <img src='http://www.gigapromoters.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<a href="http://develobert.blogspot.com/2008/06/xdebug-must-be-loaded-as-zend-extension.html" rel="nofollow">http://develobert.blogspot.com/2008/06/xdebug-must-be-loaded-as-zend-extension.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bram</title>
		<link>http://www.gigapromoters.com/blog/2008/10/30/how-to-keep-your-database-under-version-control/#comment-309</link>
		<dc:creator>bram</dc:creator>
		<pubDate>Wed, 14 Oct 2009 12:00:40 +0000</pubDate>
		<guid>http://www.gigapromoters.com/blog/2008/10/30/how-to-keep-your-database-under-version-control/#comment-309</guid>
		<description>If you modified the database that you want to update, make sure you remove all files in /app/tmp/cache/models before running a schema update!!

While the shell clearly states: "Comparing Database to Schema...", it actually compares the model cache to the schema. By removing the model cache, it will be regenerated before the comparison takes place.</description>
		<content:encoded><![CDATA[<p>If you modified the database that you want to update, make sure you remove all files in /app/tmp/cache/models before running a schema update!!</p>
<p>While the shell clearly states: &#8220;Comparing Database to Schema&#8230;&#8221;, it actually compares the model cache to the schema. By removing the model cache, it will be regenerated before the comparison takes place.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.gigapromoters.com/blog/2008/10/30/how-to-keep-your-database-under-version-control/#comment-299</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 18 Jun 2009 04:21:02 +0000</pubDate>
		<guid>http://www.gigapromoters.com/blog/2008/10/30/how-to-keep-your-database-under-version-control/#comment-299</guid>
		<description>@Silver Knight: Fixed the broken images.</description>
		<content:encoded><![CDATA[<p>@Silver Knight: Fixed the broken images.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Silver Knight</title>
		<link>http://www.gigapromoters.com/blog/2008/10/30/how-to-keep-your-database-under-version-control/#comment-298</link>
		<dc:creator>Silver Knight</dc:creator>
		<pubDate>Wed, 17 Jun 2009 18:47:23 +0000</pubDate>
		<guid>http://www.gigapromoters.com/blog/2008/10/30/how-to-keep-your-database-under-version-control/#comment-298</guid>
		<description>Thank you for the useful information.  One detail that tripped me up is at the end of the post:

Here's what you'll do:

(I'm not seeing anything at this point in the article, where I assume that there was at one time an explanation about using the schema exported earlier in the post?)

And done, our database is now synced.</description>
		<content:encoded><![CDATA[<p>Thank you for the useful information.  One detail that tripped me up is at the end of the post:</p>
<p>Here&#8217;s what you&#8217;ll do:</p>
<p>(I&#8217;m not seeing anything at this point in the article, where I assume that there was at one time an explanation about using the schema exported earlier in the post?)</p>
<p>And done, our database is now synced.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madsheep</title>
		<link>http://www.gigapromoters.com/blog/2008/10/30/how-to-keep-your-database-under-version-control/#comment-250</link>
		<dc:creator>madsheep</dc:creator>
		<pubDate>Sun, 14 Dec 2008 07:49:33 +0000</pubDate>
		<guid>http://www.gigapromoters.com/blog/2008/10/30/how-to-keep-your-database-under-version-control/#comment-250</guid>
		<description>Well i was sure that cakephp has a feature do keep database in order, same like RoR migrations - just couldn't find it. Now i know i was right - thx for the article.</description>
		<content:encoded><![CDATA[<p>Well i was sure that cakephp has a feature do keep database in order, same like RoR migrations - just couldn&#8217;t find it. Now i know i was right - thx for the article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Signets remarquables du 21/11/2008 au 24/11/2008 &#124; Cherry on the...</title>
		<link>http://www.gigapromoters.com/blog/2008/10/30/how-to-keep-your-database-under-version-control/#comment-244</link>
		<dc:creator>Signets remarquables du 21/11/2008 au 24/11/2008 &#124; Cherry on the...</dc:creator>
		<pubDate>Mon, 24 Nov 2008 13:02:42 +0000</pubDate>
		<guid>http://www.gigapromoters.com/blog/2008/10/30/how-to-keep-your-database-under-version-control/#comment-244</guid>
		<description>[...] How to keep your database under version control? - Giga Promoters Blog [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] How to keep your database under version control? - Giga Promoters Blog [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.gigapromoters.com/blog/2008/10/30/how-to-keep-your-database-under-version-control/#comment-236</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 31 Oct 2008 10:45:05 +0000</pubDate>
		<guid>http://www.gigapromoters.com/blog/2008/10/30/how-to-keep-your-database-under-version-control/#comment-236</guid>
		<description>@rafaelbandeira3 Thanks for your comment. Hope it'll prove helpful.</description>
		<content:encoded><![CDATA[<p>@rafaelbandeira3 Thanks for your comment. Hope it&#8217;ll prove helpful.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
