<?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: A table that should exist in all projects with a database</title>
	<atom:link href="http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/</link>
	<description>software engineering for beginners</description>
	<lastBuildDate>Wed, 30 May 2012 07:02:56 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
	<item>
		<title>By: Gary</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-2/#comment-5469</link>
		<dc:creator>Gary</dc:creator>
		<pubDate>Mon, 28 Nov 2011 00:38:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-5469</guid>
		<description><![CDATA[You may want to have a look at &#039;chd version&#039; with &lt;a href=&quot;http://chronicdb.com&quot; rel=&quot;nofollow&quot;&gt;ChronicDB&lt;/a&gt;]]></description>
		<content:encoded><![CDATA[<p>You may want to have a look at &#8216;chd version&#8217; with <a href="http://chronicdb.com" rel="nofollow">ChronicDB</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Future-Proof Your Database Change Log &#124; Language Hacker &#124; Robert Elwell&#039;s Blog</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-2/#comment-5401</link>
		<dc:creator>Future-Proof Your Database Change Log &#124; Language Hacker &#124; Robert Elwell&#039;s Blog</dc:creator>
		<pubDate>Tue, 31 May 2011 23:54:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-5401</guid>
		<description><![CDATA[[...] a big believer in using some kind of database change log for any project you&#8217;re working on. As someone firmly entrenched in the PHP world, I&#8217;m [...]]]></description>
		<content:encoded><![CDATA[<p>[...] a big believer in using some kind of database change log for any project you&#8217;re working on. As someone firmly entrenched in the PHP world, I&#8217;m [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Dingwall &#187; The road to automated database deployment</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-2/#comment-4788</link>
		<dc:creator>Richard Dingwall &#187; The road to automated database deployment</dc:creator>
		<pubDate>Tue, 15 Feb 2011 22:03:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-4788</guid>
		<description><![CDATA[[...] Given a live database and a stack of SQL scripts, how do you know which ones need to be run? You could start reading going through them, statement by statement, until you find a change that doesn&#8217;t appear to be applied and start there &#8212; or you could simply have each script write a row to the end of a changelog table like this: [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Given a live database and a stack of SQL scripts, how do you know which ones need to be run? You could start reading going through them, statement by statement, until you find a change that doesn&#8217;t appear to be applied and start there &#8212; or you could simply have each script write a row to the end of a changelog table like this: [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stuart Grimshaw</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-2/#comment-2060</link>
		<dc:creator>Stuart Grimshaw</dc:creator>
		<pubDate>Fri, 10 Dec 2010 17:02:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-2060</guid>
		<description><![CDATA[@cody I can see how it avoids the problem of conflicting integers, but not conflicting changes. 1 branch could last a month, but during that month another branch could be created &amp; rolled live.

6 months down the line how do I know which order to apply those changes?]]></description>
		<content:encoded><![CDATA[<p>@cody I can see how it avoids the problem of conflicting integers, but not conflicting changes. 1 branch could last a month, but during that month another branch could be created &amp; rolled live.</p>
<p>6 months down the line how do I know which order to apply those changes?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shashi Velur</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-2/#comment-1999</link>
		<dc:creator>Shashi Velur</dc:creator>
		<pubDate>Fri, 10 Dec 2010 05:29:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1999</guid>
		<description><![CDATA[Good post..! 

I wrote a blog post last year on the very same topic: http://shashivelur.com/blog/2008/07/hibernate-db-migration]]></description>
		<content:encoded><![CDATA[<p>Good post..! </p>
<p>I wrote a blog post last year on the very same topic: <a href="http://shashivelur.com/blog/2008/07/hibernate-db-migration" rel="nofollow">http://shashivelur.com/blog/2008/07/hibernate-db-migration</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2010-12-09</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-2/#comment-1967</link>
		<dc:creator>links for 2010-12-09</dc:creator>
		<pubDate>Thu, 09 Dec 2010 20:13:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1967</guid>
		<description><![CDATA[[...] A table that should exist in all projects with a database (tags: database) [...]]]></description>
		<content:encoded><![CDATA[<p>[...] A table that should exist in all projects with a database (tags: database) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1966</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Thu, 09 Dec 2010 20:04:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1966</guid>
		<description><![CDATA[Take a look at MyBatis Migrations application. It is incredibly simple and just fantastic.]]></description>
		<content:encoded><![CDATA[<p>Take a look at MyBatis Migrations application. It is incredibly simple and just fantastic.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cherouvim</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1909</link>
		<dc:creator>cherouvim</dc:creator>
		<pubDate>Thu, 09 Dec 2010 10:03:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1909</guid>
		<description><![CDATA[@Paul Keeble: Thanks for the links, will definitely research.

@Jeroen: Haha. Nice one :)

@Eggsy84: If you are really serious you can include undo scripts for each migration. A database backup before applying the changes is helpful too, although that depends on the size of the database.]]></description>
		<content:encoded><![CDATA[<p>@Paul Keeble: Thanks for the links, will definitely research.</p>
<p>@Jeroen: Haha. Nice one :)</p>
<p>@Eggsy84: If you are really serious you can include undo scripts for each migration. A database backup before applying the changes is helpful too, although that depends on the size of the database.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eggsy84</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1901</link>
		<dc:creator>Eggsy84</dc:creator>
		<pubDate>Thu, 09 Dec 2010 09:39:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1901</guid>
		<description><![CDATA[Hi all,

We have implemented this way tracking our SQL changes. Currently up to over 130 ;)

One thing we have noticed is that it become very hard to roll back the changes after you have applied them.

If (and lets face it when) an install goes wrong and you have already performed your SQL update what do people tend to do?

You can of course take a DB backup before the update but for large databases this might not be feasible due to restore times.

Any other suggestions?

Eggsy]]></description>
		<content:encoded><![CDATA[<p>Hi all,</p>
<p>We have implemented this way tracking our SQL changes. Currently up to over 130 ;)</p>
<p>One thing we have noticed is that it become very hard to roll back the changes after you have applied them.</p>
<p>If (and lets face it when) an install goes wrong and you have already performed your SQL update what do people tend to do?</p>
<p>You can of course take a DB backup before the update but for large databases this might not be feasible due to restore times.</p>
<p>Any other suggestions?</p>
<p>Eggsy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeroen</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1873</link>
		<dc:creator>Jeroen</dc:creator>
		<pubDate>Thu, 09 Dec 2010 07:30:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1873</guid>
		<description><![CDATA[You also want to include a column to identify the changer. You&#039;ll want to know in some point in the future who&#039;s ass you want to kick because of some unwanted changes.]]></description>
		<content:encoded><![CDATA[<p>You also want to include a column to identify the changer. You&#8217;ll want to know in some point in the future who&#8217;s ass you want to kick because of some unwanted changes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ma Diga</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1852</link>
		<dc:creator>Ma Diga</dc:creator>
		<pubDate>Thu, 09 Dec 2010 06:05:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1852</guid>
		<description><![CDATA[I hadn&#039;t thought of doing something like this.  I keep track of DB schema changes or migrations on an internal wiki site by date and etc.  Will try this in the near future as well...]]></description>
		<content:encoded><![CDATA[<p>I hadn&#8217;t thought of doing something like this.  I keep track of DB schema changes or migrations on an internal wiki site by date and etc.  Will try this in the near future as well&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anon</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1840</link>
		<dc:creator>anon</dc:creator>
		<pubDate>Thu, 09 Dec 2010 05:30:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1840</guid>
		<description><![CDATA[I simply use a PHP script which reads table columns (and even data) and applies schema changes accordingly (it&#039;s ran automatically on update). I just add changes to the end of the script. Even if a straight-up SQL migration script failed in mid-process, you can run the update script as many times as you like.]]></description>
		<content:encoded><![CDATA[<p>I simply use a PHP script which reads table columns (and even data) and applies schema changes accordingly (it&#8217;s ran automatically on update). I just add changes to the end of the script. Even if a straight-up SQL migration script failed in mid-process, you can run the update script as many times as you like.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1819</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Thu, 09 Dec 2010 04:38:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1819</guid>
		<description><![CDATA[Previously I&#039;ve dumped the database schema nightly and (after stripping out cruft like comments and blank lines) compared it against the latest in a svn repository. If there are differences, store the new one in the repository and create a change control record which gets written to a CC database.

It needs the organisation to mandate and enforce proper change control where every change to a production system gets handled formally and creates a log record. Really, structural changes should only be doable from a controlled admin user and preferably on the machine hosting the database. Of course, this may not work with all RDBMSs :(]]></description>
		<content:encoded><![CDATA[<p>Previously I&#8217;ve dumped the database schema nightly and (after stripping out cruft like comments and blank lines) compared it against the latest in a svn repository. If there are differences, store the new one in the repository and create a change control record which gets written to a CC database.</p>
<p>It needs the organisation to mandate and enforce proper change control where every change to a production system gets handled formally and creates a log record. Really, structural changes should only be doable from a controlled admin user and preferably on the machine hosting the database. Of course, this may not work with all RDBMSs :(</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Keeble</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1803</link>
		<dc:creator>Paul Keeble</dc:creator>
		<pubDate>Thu, 09 Dec 2010 03:26:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1803</guid>
		<description><![CDATA[There are two good tools for doing database versioning and reliable releasing that every developer should know about.

1) www.Liquibase.org
2) http://dbdeploy.com

Both use more information in their table than this to spot other types of errors and don&#039;t require you to produce a custom solution. Liquibase is especially good as it can deal with the going backwards in time problem found when doing branching and automated database releases.]]></description>
		<content:encoded><![CDATA[<p>There are two good tools for doing database versioning and reliable releasing that every developer should know about.</p>
<p>1) <a href="http://www.Liquibase.org" rel="nofollow">http://www.Liquibase.org</a><br />
2) <a href="http://dbdeploy.com" rel="nofollow">http://dbdeploy.com</a></p>
<p>Both use more information in their table than this to spot other types of errors and don&#8217;t require you to produce a custom solution. Liquibase is especially good as it can deal with the going backwards in time problem found when doing branching and automated database releases.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cherouvim</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1796</link>
		<dc:creator>cherouvim</dc:creator>
		<pubDate>Thu, 09 Dec 2010 03:10:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1796</guid>
		<description><![CDATA[@Dantheta: Agreed. You can adapt it to your needs, and yes, I&#039;d never run any alter statements via application code as well.

@Mike Marcos: OK, that works until you release your software and you enter the next development cycle. You need a new script then.

@Rob: Not sure how GIT solves the problem.

@Tiago Albineli Motta: Thanks for the info, will definitelly try it out. My proposal has 0 learning curve though.

@The B.: Interesting addition in case your environment requires it.]]></description>
		<content:encoded><![CDATA[<p>@Dantheta: Agreed. You can adapt it to your needs, and yes, I&#8217;d never run any alter statements via application code as well.</p>
<p>@Mike Marcos: OK, that works until you release your software and you enter the next development cycle. You need a new script then.</p>
<p>@Rob: Not sure how GIT solves the problem.</p>
<p>@Tiago Albineli Motta: Thanks for the info, will definitelly try it out. My proposal has 0 learning curve though.</p>
<p>@The B.: Interesting addition in case your environment requires it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The B.</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1795</link>
		<dc:creator>The B.</dc:creator>
		<pubDate>Thu, 09 Dec 2010 03:00:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1795</guid>
		<description><![CDATA[All good, what I do in addition to that is also add an MD5 field to the table. The tool that we wrote to do the database migration checks the md5 for each file, and will warn you when a SQL script has been changed (which it really should not, once it&#039;s pushed upstream).]]></description>
		<content:encoded><![CDATA[<p>All good, what I do in addition to that is also add an MD5 field to the table. The tool that we wrote to do the database migration checks the md5 for each file, and will warn you when a SQL script has been changed (which it really should not, once it&#8217;s pushed upstream).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tiago Albineli Motta</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1772</link>
		<dc:creator>Tiago Albineli Motta</dc:creator>
		<pubDate>Thu, 09 Dec 2010 01:26:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1772</guid>
		<description><![CDATA[you can use

rake db:migrate]]></description>
		<content:encoded><![CDATA[<p>you can use</p>
<p>rake db:migrate</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1754</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Thu, 09 Dec 2010 00:50:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1754</guid>
		<description><![CDATA[fuck it, just GIT it]]></description>
		<content:encoded><![CDATA[<p>fuck it, just GIT it</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Marcos</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1750</link>
		<dc:creator>Mike Marcos</dc:creator>
		<pubDate>Thu, 09 Dec 2010 00:40:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1750</guid>
		<description><![CDATA[When I was working with a few people on a project, we just kept one database build script in the SVN repo.  This worked really well - 

You make changes to the db?  Commit that build script.

You sit down to start working? Update your project.

Uh, oh, merge conflict?  Oh, look, we both tried to change this table, let&#039;s figure out how to change it to both our advantages.]]></description>
		<content:encoded><![CDATA[<p>When I was working with a few people on a project, we just kept one database build script in the SVN repo.  This worked really well &#8211; </p>
<p>You make changes to the db?  Commit that build script.</p>
<p>You sit down to start working? Update your project.</p>
<p>Uh, oh, merge conflict?  Oh, look, we both tried to change this table, let&#8217;s figure out how to change it to both our advantages.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dantheta</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1740</link>
		<dc:creator>Dantheta</dc:creator>
		<pubDate>Wed, 08 Dec 2010 23:44:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1740</guid>
		<description><![CDATA[My only change to this would be to use an int field (instead of a varchar) for the version number and not to use a reserved word (&#039;key&#039; in some DBMS) as a column name.  

A sound strategy it is, though.  I personally wouldn&#039;t be comfortable with the application being able to run ALTER commands (that is what we have DBAs and DBA automation for), but that&#039;s as much personal preference as anything else.

Cheers!]]></description>
		<content:encoded><![CDATA[<p>My only change to this would be to use an int field (instead of a varchar) for the version number and not to use a reserved word (&#8216;key&#8217; in some DBMS) as a column name.  </p>
<p>A sound strategy it is, though.  I personally wouldn&#8217;t be comfortable with the application being able to run ALTER commands (that is what we have DBAs and DBA automation for), but that&#8217;s as much personal preference as anything else.</p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: the jackol&#8217;s den &#187; Blog Archive &#187; A table that should exist in all projects with a database</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1736</link>
		<dc:creator>the jackol&#8217;s den &#187; Blog Archive &#187; A table that should exist in all projects with a database</dc:creator>
		<pubDate>Wed, 08 Dec 2010 23:03:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1736</guid>
		<description><![CDATA[[...] Read more    By Mikhail Esteves &#124; December 9th, 2010 in Links [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Read more    By Mikhail Esteves | December 9th, 2010 in Links [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stepan</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1727</link>
		<dc:creator>Stepan</dc:creator>
		<pubDate>Wed, 08 Dec 2010 22:27:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1727</guid>
		<description><![CDATA[Incremental update scripts are very hard to maintain. We use

http://bitbucket.org/stepancheg/mysql-diff/

to compare database schemas. It outputs difference as sequence of ALTER TABLE statements. It is not always reliable, but very helpful.]]></description>
		<content:encoded><![CDATA[<p>Incremental update scripts are very hard to maintain. We use</p>
<p><a href="http://bitbucket.org/stepancheg/mysql-diff/" rel="nofollow">http://bitbucket.org/stepancheg/mysql-diff/</a></p>
<p>to compare database schemas. It outputs difference as sequence of ALTER TABLE statements. It is not always reliable, but very helpful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joshua Simeon Narins</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1724</link>
		<dc:creator>Joshua Simeon Narins</dc:creator>
		<pubDate>Wed, 08 Dec 2010 22:22:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1724</guid>
		<description><![CDATA[I integrated RT (our ticket system) with SVN and came up with a similar, but different, solution.

Each ticket (read: project) has associated files and revisions. Some of these files are in the /schema_updates/ directory. We can push, or pull, tickets from production using a script I wrote. One of the steps is to apply the schema_update. To avoid name collisions we use the format [ticket_number]_up.sql for the code to apply the schema, and [ticket_number]_down.sql if the ticket needs to be pulled from production (or QA, for that matter, which has its own database).

The same push/pull (well, mostly push) script will also tell you the status of a ticket (is it in QA? production? not even that far? in between?) so it can tell you if any particular schema update has been applied.]]></description>
		<content:encoded><![CDATA[<p>I integrated RT (our ticket system) with SVN and came up with a similar, but different, solution.</p>
<p>Each ticket (read: project) has associated files and revisions. Some of these files are in the /schema_updates/ directory. We can push, or pull, tickets from production using a script I wrote. One of the steps is to apply the schema_update. To avoid name collisions we use the format [ticket_number]_up.sql for the code to apply the schema, and [ticket_number]_down.sql if the ticket needs to be pulled from production (or QA, for that matter, which has its own database).</p>
<p>The same push/pull (well, mostly push) script will also tell you the status of a ticket (is it in QA? production? not even that far? in between?) so it can tell you if any particular schema update has been applied.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Udi</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1723</link>
		<dc:creator>Udi</dc:creator>
		<pubDate>Wed, 08 Dec 2010 22:18:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1723</guid>
		<description><![CDATA[Why not just keep this info in a text file that you update and check into source control?  Why does it need to be in the db?]]></description>
		<content:encoded><![CDATA[<p>Why not just keep this info in a text file that you update and check into source control?  Why does it need to be in the db?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nirk</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1719</link>
		<dc:creator>nirk</dc:creator>
		<pubDate>Wed, 08 Dec 2010 21:54:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1719</guid>
		<description><![CDATA[@dude

We were doing API version tracking when I was working in S/390 assembler using fixed-width flat files with a header and a footer. Everything old is new again.]]></description>
		<content:encoded><![CDATA[<p>@dude</p>
<p>We were doing API version tracking when I was working in S/390 assembler using fixed-width flat files with a header and a footer. Everything old is new again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mikeJ</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1716</link>
		<dc:creator>mikeJ</dc:creator>
		<pubDate>Wed, 08 Dec 2010 21:40:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1716</guid>
		<description><![CDATA[we go one more. keep a version on each table, sP etc. we then keep a script that does the migration for each object to the next version.  we are able to migrate each individual customer from any release version to the current version in set of transformations. we have to put this data into the schema because extended properties are non standard or non-existant across the various backends we support - oracle, db2, msql, firebird and mysql.]]></description>
		<content:encoded><![CDATA[<p>we go one more. keep a version on each table, sP etc. we then keep a script that does the migration for each object to the next version.  we are able to migrate each individual customer from any release version to the current version in set of transformations. we have to put this data into the schema because extended properties are non standard or non-existant across the various backends we support &#8211; oracle, db2, msql, firebird and mysql.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cody</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1715</link>
		<dc:creator>Cody</dc:creator>
		<pubDate>Wed, 08 Dec 2010 21:39:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1715</guid>
		<description><![CDATA[@Stuart Grimshaw To get around your problem of multiple developers creating an &quot;008&quot; migration at the same time - dont use serial integers but timestamps of when the migration was created. Thus, you have uniqueness down to the second instead of an information-less integer. Your migrations should look like

201012081445_CreateSomeTable
201012081617_AddIndexToFoo

Rails got away from integer organization a long time ago and its my preferred method on my PHP migrations framework: https://github.com/ruckus/ruckusing-migrations]]></description>
		<content:encoded><![CDATA[<p>@Stuart Grimshaw To get around your problem of multiple developers creating an &#8220;008&#8243; migration at the same time &#8211; dont use serial integers but timestamps of when the migration was created. Thus, you have uniqueness down to the second instead of an information-less integer. Your migrations should look like</p>
<p>201012081445_CreateSomeTable<br />
201012081617_AddIndexToFoo</p>
<p>Rails got away from integer organization a long time ago and its my preferred method on my PHP migrations framework: <a href="https://github.com/ruckus/ruckusing-migrations" rel="nofollow">https://github.com/ruckus/ruckusing-migrations</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Soeder</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1713</link>
		<dc:creator>Jonathan Soeder</dc:creator>
		<pubDate>Wed, 08 Dec 2010 21:35:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1713</guid>
		<description><![CDATA[It is possible to get all of this functionality for very cheap just by using ruby&#039;s rake, and activerecord.  Just because you&#039;re not developing your app in the rails framework doesn&#039;t mean you can&#039;t use ruby to do development and deployment automation.

I also like to use vlad the deployer inside non-rails projects, to handle automating ssh for deploying my app to multiple servers / environments from source control.  this can run the migrations for you automatically.]]></description>
		<content:encoded><![CDATA[<p>It is possible to get all of this functionality for very cheap just by using ruby&#8217;s rake, and activerecord.  Just because you&#8217;re not developing your app in the rails framework doesn&#8217;t mean you can&#8217;t use ruby to do development and deployment automation.</p>
<p>I also like to use vlad the deployer inside non-rails projects, to handle automating ssh for deploying my app to multiple servers / environments from source control.  this can run the migrations for you automatically.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cherouvim</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1712</link>
		<dc:creator>cherouvim</dc:creator>
		<pubDate>Wed, 08 Dec 2010 21:27:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1712</guid>
		<description><![CDATA[@Adam Żochowski: Interesting. My proposal has no learning curve and works on any database version. In fact I today use it for projects using MySQL, SQL Server and Oracle.]]></description>
		<content:encoded><![CDATA[<p>@Adam Żochowski: Interesting. My proposal has no learning curve and works on any database version. In fact I today use it for projects using MySQL, SQL Server and Oracle.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Żochowski</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1711</link>
		<dc:creator>Adam Żochowski</dc:creator>
		<pubDate>Wed, 08 Dec 2010 21:25:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1711</guid>
		<description><![CDATA[Instead of polluting your system with an additional table, please use sql extended properties.  I am sure ms-sql has them:

http://msdn.microsoft.com/en-us/library/ms180047.aspx

Use these extended properties on the schema level, with property name matching your schema migration script that has been applied.  Use the value to track when schema migration was applied.

Cheers

Adam Żochowski]]></description>
		<content:encoded><![CDATA[<p>Instead of polluting your system with an additional table, please use sql extended properties.  I am sure ms-sql has them:</p>
<p><a href="http://msdn.microsoft.com/en-us/library/ms180047.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms180047.aspx</a></p>
<p>Use these extended properties on the schema level, with property name matching your schema migration script that has been applied.  Use the value to track when schema migration was applied.</p>
<p>Cheers</p>
<p>Adam Żochowski</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cherouvim</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1710</link>
		<dc:creator>cherouvim</dc:creator>
		<pubDate>Wed, 08 Dec 2010 21:23:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1710</guid>
		<description><![CDATA[@Alan Pinstein: Thanks for the offer. Will consider as soon as I got some free time in my hands :)

@Stuart Grimshaw: Great question. We usually work on trunk, and db changes on branches or local dev experiments do not go into the migration script. Although I didn&#039;t mention it in the post, the migration is a 1:1 match of a releasable project version. So if something is only exists in a branch then it&#039;s sql delta scripts do not (yet) belong into the version migration script.]]></description>
		<content:encoded><![CDATA[<p>@Alan Pinstein: Thanks for the offer. Will consider as soon as I got some free time in my hands :)</p>
<p>@Stuart Grimshaw: Great question. We usually work on trunk, and db changes on branches or local dev experiments do not go into the migration script. Although I didn&#8217;t mention it in the post, the migration is a 1:1 match of a releasable project version. So if something is only exists in a branch then it&#8217;s sql delta scripts do not (yet) belong into the version migration script.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stuart Grimshaw</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1708</link>
		<dc:creator>Stuart Grimshaw</dc:creator>
		<pubDate>Wed, 08 Dec 2010 21:19:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1708</guid>
		<description><![CDATA[How do you handle the case where, after schema change 007 I create a new branch of the code to work on my new feature &amp; someone else creates their branch to work on their new feature.

I create 008-create-this-table.sql and someone else creates 008-create-that-table.sql it&#039;s fairly simple I guess to rename one of them to 009 when the first hits the master branch, but at our company we can have 3 or 4 projects on the go, not to mention branches for bug fixes too. With that much going on, it would quickly become unmanageable.

We&#039;ve been looking for a solution to this problem for a long time, and it&#039;s not easy :-)]]></description>
		<content:encoded><![CDATA[<p>How do you handle the case where, after schema change 007 I create a new branch of the code to work on my new feature &amp; someone else creates their branch to work on their new feature.</p>
<p>I create 008-create-this-table.sql and someone else creates 008-create-that-table.sql it&#8217;s fairly simple I guess to rename one of them to 009 when the first hits the master branch, but at our company we can have 3 or 4 projects on the go, not to mention branches for bug fixes too. With that much going on, it would quickly become unmanageable.</p>
<p>We&#8217;ve been looking for a solution to this problem for a long time, and it&#8217;s not easy :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan Pinstein</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1707</link>
		<dc:creator>Alan Pinstein</dc:creator>
		<pubDate>Wed, 08 Dec 2010 21:17:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1707</guid>
		<description><![CDATA[Great post. I wrote MP, a generic migrations framework for PHP. It works very similarly but I would love to update it to record audit trails as well. 

If you&#039;re interested in helping to make your process available to anyone and would like to improve MP as well, we&#039;d love to have your help with the project!]]></description>
		<content:encoded><![CDATA[<p>Great post. I wrote MP, a generic migrations framework for PHP. It works very similarly but I would love to update it to record audit trails as well. </p>
<p>If you&#8217;re interested in helping to make your process available to anyone and would like to improve MP as well, we&#8217;d love to have your help with the project!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cherouvim</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1705</link>
		<dc:creator>cherouvim</dc:creator>
		<pubDate>Wed, 08 Dec 2010 21:10:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1705</guid>
		<description><![CDATA[@Mujtaba Hussain: That is correct, but I mainly use Java and PHP. I&#039;m aware of liquibase and I will assess in the future. My proposal though is just a simple convention which works on any environment without any learning curve.

@Price: I keep in a folder all sql scripts which take my database from point A to point B.
Regarding rollback, yes I could have undo scripts as well but it&#039;s an overhead. I know (from a podcast) that Amazon does that. I will usually grab a database backup just before running those on production. Of course anything that will be run on production has already been tested on staging.]]></description>
		<content:encoded><![CDATA[<p>@Mujtaba Hussain: That is correct, but I mainly use Java and PHP. I&#8217;m aware of liquibase and I will assess in the future. My proposal though is just a simple convention which works on any environment without any learning curve.</p>
<p>@Price: I keep in a folder all sql scripts which take my database from point A to point B.<br />
Regarding rollback, yes I could have undo scripts as well but it&#8217;s an overhead. I know (from a podcast) that Amazon does that. I will usually grab a database backup just before running those on production. Of course anything that will be run on production has already been tested on staging.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Price</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1702</link>
		<dc:creator>Price</dc:creator>
		<pubDate>Wed, 08 Dec 2010 20:47:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1702</guid>
		<description><![CDATA[Thanks for the post.

I recently took over a database which has no versioning whatsoever. All changes take place directly on production. This will help in finding a good way of stopping this madness :)

A couple of questions:

- Barry Coughlan mentioned keeping the ALTER TABLE scripts in a seperate folder. Why would you want to do that? I can&#039;t think of any scenario where that would help...

- How do you handle rollback actions in case something goes wrong and the new version must be rolled back to the previous one?]]></description>
		<content:encoded><![CDATA[<p>Thanks for the post.</p>
<p>I recently took over a database which has no versioning whatsoever. All changes take place directly on production. This will help in finding a good way of stopping this madness :)</p>
<p>A couple of questions:</p>
<p>- Barry Coughlan mentioned keeping the ALTER TABLE scripts in a seperate folder. Why would you want to do that? I can&#8217;t think of any scenario where that would help&#8230;</p>
<p>- How do you handle rollback actions in case something goes wrong and the new version must be rolled back to the previous one?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mujtaba Hussain</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1701</link>
		<dc:creator>Mujtaba Hussain</dc:creator>
		<pubDate>Wed, 08 Dec 2010 20:47:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1701</guid>
		<description><![CDATA[Hi

ActiveRecord in Rails and LiquiBase both do that with schema_information and DATABASECHANGELOG tables respectively. Why not utilise that instead of creating your own?]]></description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>ActiveRecord in Rails and LiquiBase both do that with schema_information and DATABASECHANGELOG tables respectively. Why not utilise that instead of creating your own?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Björn Nilsson</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1700</link>
		<dc:creator>Björn Nilsson</dc:creator>
		<pubDate>Wed, 08 Dec 2010 20:34:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1700</guid>
		<description><![CDATA[This is great, I have been using a similar but less structured way of keeping track of schema changes. For a larger team something like this is mandatory to keep track.

Another improvement that could be done is to do a check in th ebeginning of the script that it is applying to the correct version. eg 007 refuses to run if current version is not 006.]]></description>
		<content:encoded><![CDATA[<p>This is great, I have been using a similar but less structured way of keeping track of schema changes. For a larger team something like this is mandatory to keep track.</p>
<p>Another improvement that could be done is to do a check in th ebeginning of the script that it is applying to the correct version. eg 007 refuses to run if current version is not 006.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: salvador</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1698</link>
		<dc:creator>salvador</dc:creator>
		<pubDate>Wed, 08 Dec 2010 20:19:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1698</guid>
		<description><![CDATA[We&#039;ve been using this migrations plugin for maven to execute and keep track of all our schema migrations.  It&#039;s awesome!  Check it out.

http://code.google.com/p/c5-db-migration/]]></description>
		<content:encoded><![CDATA[<p>We&#8217;ve been using this migrations plugin for maven to execute and keep track of all our schema migrations.  It&#8217;s awesome!  Check it out.</p>
<p><a href="http://code.google.com/p/c5-db-migration/" rel="nofollow">http://code.google.com/p/c5-db-migration/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cherouvim</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1697</link>
		<dc:creator>cherouvim</dc:creator>
		<pubDate>Wed, 08 Dec 2010 20:17:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1697</guid>
		<description><![CDATA[@IGnatius T Foobar: A single integer is what I used to use but having all that extra data is sometimes useful, especially when the sysadmin forgot to run an intermediate script.

Automatic upgrade of the schema via the application is out of the question in large and high traffic projects where the schema migration (with its 3 phases: expand, release, cleanup) may last days do to alters and data fixes on huge tables.]]></description>
		<content:encoded><![CDATA[<p>@IGnatius T Foobar: A single integer is what I used to use but having all that extra data is sometimes useful, especially when the sysadmin forgot to run an intermediate script.</p>
<p>Automatic upgrade of the schema via the application is out of the question in large and high traffic projects where the schema migration (with its 3 phases: expand, release, cleanup) may last days do to alters and data fixes on huge tables.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Moshe</title>
		<link>http://blog.cherouvim.com/a-table-that-should-exist-in-all-projects-with-a-database/comment-page-1/#comment-1696</link>
		<dc:creator>Moshe</dc:creator>
		<pubDate>Wed, 08 Dec 2010 20:16:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cherouvim.com/?p=250#comment-1696</guid>
		<description><![CDATA[@IGnatius: Agree. 
In Magento we use core_resource table to synchronize db structure with currently installed code, keep only the current version of the schema for each module, and automatically run PHP upgrade files whenever needed.]]></description>
		<content:encoded><![CDATA[<p>@IGnatius: Agree.<br />
In Magento we use core_resource table to synchronize db structure with currently installed code, keep only the current version of the schema for each module, and automatically run PHP upgrade files whenever needed.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
