<?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: How To: Simple database migrations with Phing and DbDeploy</title>
	<atom:link href="http://www.davedevelopment.co.uk/2008/04/14/how-to-simple-database-migrations-with-phing-and-dbdeploy/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.davedevelopment.co.uk/2008/04/14/how-to-simple-database-migrations-with-phing-and-dbdeploy/</link>
	<description>Dave Marshall</description>
	<lastBuildDate>Sun, 24 Jan 2010 23:46:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ahmed Nuaman — Freelance Designer and Developer — Blog &#8212; Developing And Deploying PHP Apps With Capistrano, Phing And DBDeploy</title>
		<link>http://www.davedevelopment.co.uk/2008/04/14/how-to-simple-database-migrations-with-phing-and-dbdeploy/comment-page-1/#comment-92127</link>
		<dc:creator>Ahmed Nuaman — Freelance Designer and Developer — Blog &#8212; Developing And Deploying PHP Apps With Capistrano, Phing And DBDeploy</dc:creator>
		<pubDate>Fri, 04 Dec 2009 09:40:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.davedevelopment.co.uk/?p=53#comment-92127</guid>
		<description>[...] Here&#8217;s a good tutorial you need to read on how to get you started: http://www.davedevelopment.co.uk/2008/04/14/how-to-simple-database-migrations-with-phing-and-dbdeplo... [...]</description>
		<content:encoded><![CDATA[<p>[...] Here&#8217;s a good tutorial you need to read on how to get you started: <a href="http://www.davedevelopment.co.uk/2008/04/14/how-to-simple-database-migrations-with-phing-and-dbdeplo.." rel="nofollow">http://www.davedevelopment.co.uk/2008/04/14/how-to-simple-database-migrations-with-phing-and-dbdeplo..</a>. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: davedevelopment</title>
		<link>http://www.davedevelopment.co.uk/2008/04/14/how-to-simple-database-migrations-with-phing-and-dbdeploy/comment-page-1/#comment-86180</link>
		<dc:creator>davedevelopment</dc:creator>
		<pubDate>Tue, 28 Jul 2009 14:47:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.davedevelopment.co.uk/?p=53#comment-86180</guid>
		<description>Sorry ;)</description>
		<content:encoded><![CDATA[<p>Sorry ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Garbago Bronft</title>
		<link>http://www.davedevelopment.co.uk/2008/04/14/how-to-simple-database-migrations-with-phing-and-dbdeploy/comment-page-1/#comment-86179</link>
		<dc:creator>Garbago Bronft</dc:creator>
		<pubDate>Tue, 28 Jul 2009 14:15:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.davedevelopment.co.uk/?p=53#comment-86179</guid>
		<description>this is a good example of what is going wrong in the so called &quot;php scene&quot; - totally primitive examples, only the first thought, second thought and consequences NOT even mentioned, imitating good already existing solutions in a bad and primitive way, AND still providing errors in so little and primitive examples - on top of it all this by a so called &quot;certified zend engeneer&quot;... what you do here is bad propaganda on the lowest level - do you understand, that your posting is like a parody of itself?</description>
		<content:encoded><![CDATA[<p>this is a good example of what is going wrong in the so called &#8220;php scene&#8221; &#8211; totally primitive examples, only the first thought, second thought and consequences NOT even mentioned, imitating good already existing solutions in a bad and primitive way, AND still providing errors in so little and primitive examples &#8211; on top of it all this by a so called &#8220;certified zend engeneer&#8221;&#8230; what you do here is bad propaganda on the lowest level &#8211; do you understand, that your posting is like a parody of itself?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: davedevelopment</title>
		<link>http://www.davedevelopment.co.uk/2008/04/14/how-to-simple-database-migrations-with-phing-and-dbdeploy/comment-page-1/#comment-82768</link>
		<dc:creator>davedevelopment</dc:creator>
		<pubDate>Mon, 01 Jun 2009 13:26:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.davedevelopment.co.uk/?p=53#comment-82768</guid>
		<description>@Norm

The standard doens&#039;t specify that at the moment, but it would lose some of it&#039;s benefits if it did. Having executable SQL in the deploy file is good news.</description>
		<content:encoded><![CDATA[<p>@Norm</p>
<p>The standard doens&#8217;t specify that at the moment, but it would lose some of it&#8217;s benefits if it did. Having executable SQL in the deploy file is good news.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Norm Katz</title>
		<link>http://www.davedevelopment.co.uk/2008/04/14/how-to-simple-database-migrations-with-phing-and-dbdeploy/comment-page-1/#comment-80883</link>
		<dc:creator>Norm Katz</dc:creator>
		<pubDate>Fri, 08 May 2009 00:42:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.davedevelopment.co.uk/?p=53#comment-80883</guid>
		<description>Can DBDeploy pass the schema name (database name) that it is working on to the db update scripts that it&#039;s applying?  For mysql, if you want to check if a column exists before adding one to a table you need to query the INFORMATION_SCHEMAS table and filter for the current database in use.  Thanks!

SELECT * FROM information_schema.COLUMNS
	WHERE COLUMN_NAME=&#039;colname&#039; AND TABLE_NAME=&#039;tablename&#039; AND TABLE_SCHEMA=&#039;dbname&#039;</description>
		<content:encoded><![CDATA[<p>Can DBDeploy pass the schema name (database name) that it is working on to the db update scripts that it&#8217;s applying?  For mysql, if you want to check if a column exists before adding one to a table you need to query the INFORMATION_SCHEMAS table and filter for the current database in use.  Thanks!</p>
<p>SELECT * FROM information_schema.COLUMNS<br />
	WHERE COLUMN_NAME=&#8217;colname&#8217; AND TABLE_NAME=&#8217;tablename&#8217; AND TABLE_SCHEMA=&#8217;dbname&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: buck</title>
		<link>http://www.davedevelopment.co.uk/2008/04/14/how-to-simple-database-migrations-with-phing-and-dbdeploy/comment-page-1/#comment-77010</link>
		<dc:creator>buck</dc:creator>
		<pubDate>Tue, 17 Mar 2009 20:40:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.davedevelopment.co.uk/?p=53#comment-77010</guid>
		<description>Thank you, I missed the @DEPLOY in my first attempts.</description>
		<content:encoded><![CDATA[<p>Thank you, I missed the @DEPLOY in my first attempts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Edenburg</title>
		<link>http://www.davedevelopment.co.uk/2008/04/14/how-to-simple-database-migrations-with-phing-and-dbdeploy/comment-page-1/#comment-74102</link>
		<dc:creator>Paul Edenburg</dc:creator>
		<pubDate>Wed, 04 Feb 2009 14:04:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.davedevelopment.co.uk/?p=53#comment-74102</guid>
		<description>In my last reply, there should be two &#039;-&#039; signs in the example SQL, but I guess this is filtered out in one way or the other...</description>
		<content:encoded><![CDATA[<p>In my last reply, there should be two &#8216;-&#8217; signs in the example SQL, but I guess this is filtered out in one way or the other&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Edenburg</title>
		<link>http://www.davedevelopment.co.uk/2008/04/14/how-to-simple-database-migrations-with-phing-and-dbdeploy/comment-page-1/#comment-74100</link>
		<dc:creator>Paul Edenburg</dc:creator>
		<pubDate>Wed, 04 Feb 2009 13:55:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.davedevelopment.co.uk/?p=53#comment-74100</guid>
		<description>Using the example provided, the SQL statements never got parsed. The correct example SQL should be:

-- //@DEPLOY

CREATE TABLE `post` (
    `title` VARCHAR(255),
    `time_created` DATETIME,
    `content` MEDIUMTEXT
);

-- //@UNDO

DROP TABLE `post`;

-- //</description>
		<content:encoded><![CDATA[<p>Using the example provided, the SQL statements never got parsed. The correct example SQL should be:</p>
<p>&#8211; //@DEPLOY</p>
<p>CREATE TABLE `post` (<br />
    `title` VARCHAR(255),<br />
    `time_created` DATETIME,<br />
    `content` MEDIUMTEXT<br />
);</p>
<p>&#8211; //@UNDO</p>
<p>DROP TABLE `post`;</p>
<p>&#8211; //</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: daveyboy</title>
		<link>http://www.davedevelopment.co.uk/2008/04/14/how-to-simple-database-migrations-with-phing-and-dbdeploy/comment-page-1/#comment-72605</link>
		<dc:creator>daveyboy</dc:creator>
		<pubDate>Mon, 12 Jan 2009 22:18:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.davedevelopment.co.uk/?p=53#comment-72605</guid>
		<description>@Kevin

Regarding the space between the dash and the slashes, we learned this the hard way about two months ago! The sql standard says that there should be a space after the double dash, somebody reported it as a bug and gave the phing guys a patch, I think it came in 2.3.2? 

See: http://phing.info/trac/ticket/288

-----

I&#039;m still very happy with phing, even for some very simple tasks, it&#039;s nice and neat.

Some of our tasks:

We have a task that puts our app in and out of maintenance mode.

We have a task to copy our dojo folder to dojo-src, then run the dojo build scripts to create a compact version for quicker downloads
config 

We have a example config file with placeholders, a task then takes the config file and uses the reflexive task to set the values we need.

We fetch our code from subversion, placing it in a release folder and setting symlinks to point to the file data, similar to the way capistrano does things.

PHPDoc, PHPUnit and PHP-Codesniffer run tasks.

-----

For data we tend to only include very base data in the deltas, such as standing lists like job titles.

We&#039;re setup ready to use a second delta set, in the event a maintenance branch needs a delta and the trunk has already created new deltas, but we haven&#039;t done so yet. I&#039;ve tested it and it seems to work well enough, but I wont be 100% till I&#039;ve pushed something into our app with it.

Having the seperate changesets should work well enough for you.

/ddl/01-create-person-table.sql
/dml/01-add-admin-user.sql
/dml-dev/01-add-test-persons.sql

Your production box just doesn&#039;t run the dml-dev folder. I like the idea too, you could really get a nice test dataset in the dml-dev folder, ready for developers to crack on with what they should be doing. We actually have a data masking program, that we run on a copy of the production database to generate test data. It seems to work pretty well, and we get realistic enough data, just with a few strange names ;) 

I *will* get round to writing an updated post on phing!</description>
		<content:encoded><![CDATA[<p>@Kevin</p>
<p>Regarding the space between the dash and the slashes, we learned this the hard way about two months ago! The sql standard says that there should be a space after the double dash, somebody reported it as a bug and gave the phing guys a patch, I think it came in 2.3.2? </p>
<p>See: <a href="http://phing.info/trac/ticket/288" rel="nofollow">http://phing.info/trac/ticket/288</a></p>
<p>&#8212;&#8211;</p>
<p>I&#8217;m still very happy with phing, even for some very simple tasks, it&#8217;s nice and neat.</p>
<p>Some of our tasks:</p>
<p>We have a task that puts our app in and out of maintenance mode.</p>
<p>We have a task to copy our dojo folder to dojo-src, then run the dojo build scripts to create a compact version for quicker downloads<br />
config </p>
<p>We have a example config file with placeholders, a task then takes the config file and uses the reflexive task to set the values we need.</p>
<p>We fetch our code from subversion, placing it in a release folder and setting symlinks to point to the file data, similar to the way capistrano does things.</p>
<p>PHPDoc, PHPUnit and PHP-Codesniffer run tasks.</p>
<p>&#8212;&#8211;</p>
<p>For data we tend to only include very base data in the deltas, such as standing lists like job titles.</p>
<p>We&#8217;re setup ready to use a second delta set, in the event a maintenance branch needs a delta and the trunk has already created new deltas, but we haven&#8217;t done so yet. I&#8217;ve tested it and it seems to work well enough, but I wont be 100% till I&#8217;ve pushed something into our app with it.</p>
<p>Having the seperate changesets should work well enough for you.</p>
<p>/ddl/01-create-person-table.sql<br />
/dml/01-add-admin-user.sql<br />
/dml-dev/01-add-test-persons.sql</p>
<p>Your production box just doesn&#8217;t run the dml-dev folder. I like the idea too, you could really get a nice test dataset in the dml-dev folder, ready for developers to crack on with what they should be doing. We actually have a data masking program, that we run on a copy of the production database to generate test data. It seems to work pretty well, and we get realistic enough data, just with a few strange names ;) </p>
<p>I *will* get round to writing an updated post on phing!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://www.davedevelopment.co.uk/2008/04/14/how-to-simple-database-migrations-with-phing-and-dbdeploy/comment-page-1/#comment-72583</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Mon, 12 Jan 2009 17:39:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.davedevelopment.co.uk/?p=53#comment-72583</guid>
		<description>Dave,

have you been creating any new useful task in your build.xml file? Like an undo task? :)

Also, i wanted to know if you were still satisfied with this dbdeploy task almost a year after writing this post?

And finally, what sort of data do you handle with it? Because i&#039;m about to introduce dbdeploy to my team, but i would like to keep DML (data) and DLL (structure) changes separated so i can have for instance, dev-only deltas, and dev+prod deltas and i&#039;m not sure if there is a best practice for these issues. I&#039;m thinking of using 2 separate directories which would both have a corresponding &quot;deltaSet&quot; (the use of this field is not well documented anywhere though). Any comment/idea would be more than welcome! ;)</description>
		<content:encoded><![CDATA[<p>Dave,</p>
<p>have you been creating any new useful task in your build.xml file? Like an undo task? :)</p>
<p>Also, i wanted to know if you were still satisfied with this dbdeploy task almost a year after writing this post?</p>
<p>And finally, what sort of data do you handle with it? Because i&#8217;m about to introduce dbdeploy to my team, but i would like to keep DML (data) and DLL (structure) changes separated so i can have for instance, dev-only deltas, and dev+prod deltas and i&#8217;m not sure if there is a best practice for these issues. I&#8217;m thinking of using 2 separate directories which would both have a corresponding &#8220;deltaSet&#8221; (the use of this field is not well documented anywhere though). Any comment/idea would be more than welcome! ;)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
