<?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: Resolved: Should schema.rb be included in your source control?</title>
	<atom:link href="http://www.pathf.com/blogs/2008/07/resolved-should-schemarb-be-included-in-your-source-control/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pathf.com/blogs/2008/07/resolved-should-schemarb-be-included-in-your-source-control/</link>
	<description>Running commentary about agile development, user experience design and Ajax.</description>
	<lastBuildDate>Fri, 05 Mar 2010 19:33:43 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: 室內設計</title>
		<link>http://www.pathf.com/blogs/2008/07/resolved-should-schemarb-be-included-in-your-source-control/comment-page-1/#comment-4358</link>
		<dc:creator>室內設計</dc:creator>
		<pubDate>Wed, 03 Dec 2008 10:46:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1046#comment-4358</guid>
		<description>We needed this because we do a lot of our experimental development in branches and therefore development database can contain things you don’t want to make their way to production right away.</description>
		<content:encoded><![CDATA[<p>We needed this because we do a lot of our experimental development in branches and therefore development database can contain things you don’t want to make their way to production right away.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lar Van Der Jagt</title>
		<link>http://www.pathf.com/blogs/2008/07/resolved-should-schemarb-be-included-in-your-source-control/comment-page-1/#comment-3331</link>
		<dc:creator>Lar Van Der Jagt</dc:creator>
		<pubDate>Sat, 06 Sep 2008 17:21:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1046#comment-3331</guid>
		<description>In the early stages of development while things are still fairly volatile I like to be able to blow out and rebuild my database on demand. Until the app goes into production I usually give each model it&#039;s own migration and just update that as the schema evolves, dropping &amp; recreating the db as I go.

I use Michael Bleigh&#039;s seed_fu to manage my seed data (can be found on github). True I need to keep seed data in synch with schema changes, but unlike using fixtures for this purpose the seed data comes from ruby scripts so you can get around the more common issues with careful scripting.

Of course this strategy won&#039;t work for production, once I&#039;ve got some more experience deploying my own apps I may have to reassess this method.</description>
		<content:encoded><![CDATA[<p>In the early stages of development while things are still fairly volatile I like to be able to blow out and rebuild my database on demand. Until the app goes into production I usually give each model it&#8217;s own migration and just update that as the schema evolves, dropping &amp; recreating the db as I go.</p>
<p>I use Michael Bleigh&#8217;s seed_fu to manage my seed data (can be found on github). True I need to keep seed data in synch with schema changes, but unlike using fixtures for this purpose the seed data comes from ruby scripts so you can get around the more common issues with careful scripting.</p>
<p>Of course this strategy won&#8217;t work for production, once I&#8217;ve got some more experience deploying my own apps I may have to reassess this method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Antares Traders Blog » The schema.rb Source Control Debate</title>
		<link>http://www.pathf.com/blogs/2008/07/resolved-should-schemarb-be-included-in-your-source-control/comment-page-1/#comment-2598</link>
		<dc:creator>Antares Traders Blog » The schema.rb Source Control Debate</dc:creator>
		<pubDate>Wed, 23 Jul 2008 19:40:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1046#comment-2598</guid>
		<description>[...] Rappin has written a post at Pathfinder about whether or not schema.rb belongs in source control.  I&#8217;m going to put my two cents in and say it does.  The debate centers on the role of [...]</description>
		<content:encoded><![CDATA[<p>[...] Rappin has written a post at Pathfinder about whether or not schema.rb belongs in source control.  I&#8217;m going to put my two cents in and say it does.  The debate centers on the role of [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthony Caliendo</title>
		<link>http://www.pathf.com/blogs/2008/07/resolved-should-schemarb-be-included-in-your-source-control/comment-page-1/#comment-2569</link>
		<dc:creator>Anthony Caliendo</dc:creator>
		<pubDate>Mon, 21 Jul 2008 22:29:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1046#comment-2569</guid>
		<description>For those of you who mention that your migrations will fail after modifying the model/removing models, I have two comments:

1) In order to maintain that your migrations work with a clean DB, you can setup cruise to always start with a clean DB.  I always configure cruise to run &quot;rake db:migrate:reset&quot; before it runs the tests.  If the migrations have been broken, cruise breaks and you can fix the migrations.

2) I do not think that you should be doing any sort of manipulation in the migrations which would break if the model changes.  That means that loading fixtures or what-not in the migration should be avoided; the only data manipulation should be when you need to massage data to fit into the new schema (i.e. migrating existing data in your DB to fit the new schema).  Make sure that your &#039;down&#039; does this migration in reverse!  If you really need to load up fixtures or something outside of pure data migration (loading up default values is NOT data migration!), then create separate rake tasks to do this.  You can then customize your build to run these rake tasks as needed.

I&#039;ve seen far too many migrations break because there wasn&#039;t proper separation of concerns in the migrations.</description>
		<content:encoded><![CDATA[<p>For those of you who mention that your migrations will fail after modifying the model/removing models, I have two comments:</p>
<p>1) In order to maintain that your migrations work with a clean DB, you can setup cruise to always start with a clean DB.  I always configure cruise to run &#8220;rake db:migrate:reset&#8221; before it runs the tests.  If the migrations have been broken, cruise breaks and you can fix the migrations.</p>
<p>2) I do not think that you should be doing any sort of manipulation in the migrations which would break if the model changes.  That means that loading fixtures or what-not in the migration should be avoided; the only data manipulation should be when you need to massage data to fit into the new schema (i.e. migrating existing data in your DB to fit the new schema).  Make sure that your &#8216;down&#8217; does this migration in reverse!  If you really need to load up fixtures or something outside of pure data migration (loading up default values is NOT data migration!), then create separate rake tasks to do this.  You can then customize your build to run these rake tasks as needed.</p>
<p>I&#8217;ve seen far too many migrations break because there wasn&#8217;t proper separation of concerns in the migrations.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://www.pathf.com/blogs/2008/07/resolved-should-schemarb-be-included-in-your-source-control/comment-page-1/#comment-2563</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Mon, 21 Jul 2008 15:20:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1046#comment-2563</guid>
		<description>I consider the db/schema.rb to be the the official database structure, however, I also verify that my migrations can execute properly with an empty database. It is not that difficult to keep the migrations working even when removing models from your code.</description>
		<content:encoded><![CDATA[<p>I consider the db/schema.rb to be the the official database structure, however, I also verify that my migrations can execute properly with an empty database. It is not that difficult to keep the migrations working even when removing models from your code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xavier Shay</title>
		<link>http://www.pathf.com/blogs/2008/07/resolved-should-schemarb-be-included-in-your-source-control/comment-page-1/#comment-2552</link>
		<dc:creator>Xavier Shay</dc:creator>
		<pubDate>Mon, 21 Jul 2008 04:45:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1046#comment-2552</guid>
		<description>We do what Justin does - recreate from production DB.
Migrations aren&#039;t feasible to keep clean (or even restore from if they were) once you have 700 of them.
schema.rb would then seem appropriate, but 
- it doesn&#039;t include static data (a separate rake task would need to be kept up to date for this)
- more often than not it results in conflicts. Ideally every developer should have exactly the same DB but in practice this does not work for us. Copying tables for back up purposes, quickly switching on to a branch with migrations, subtlely different encoding settings/MySQL revisions, etc.

For a long time we tried keeping schema.rb in source control, but we never once restored from it, and it was the #1 source of conflicts when commiting, so now we&#039;ve ignored it.</description>
		<content:encoded><![CDATA[<p>We do what Justin does &#8211; recreate from production DB.<br />
Migrations aren&#8217;t feasible to keep clean (or even restore from if they were) once you have 700 of them.<br />
schema.rb would then seem appropriate, but<br />
- it doesn&#8217;t include static data (a separate rake task would need to be kept up to date for this)<br />
- more often than not it results in conflicts. Ideally every developer should have exactly the same DB but in practice this does not work for us. Copying tables for back up purposes, quickly switching on to a branch with migrations, subtlely different encoding settings/MySQL revisions, etc.</p>
<p>For a long time we tried keeping schema.rb in source control, but we never once restored from it, and it was the #1 source of conflicts when commiting, so now we&#8217;ve ignored it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brennan</title>
		<link>http://www.pathf.com/blogs/2008/07/resolved-should-schemarb-be-included-in-your-source-control/comment-page-1/#comment-2549</link>
		<dc:creator>Brennan</dc:creator>
		<pubDate>Mon, 21 Jul 2008 00:32:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1046#comment-2549</guid>
		<description>I&#039;m a fan of auto-migrations. http://errtheblog.com/posts/65-automatically

As for being able to see the progression of the DB, isn&#039;t that what source control is for?</description>
		<content:encoded><![CDATA[<p>I&#8217;m a fan of auto-migrations. <a href="http://errtheblog.com/posts/65-automatically" rel="nofollow">http://errtheblog.com/posts/65-automatically</a></p>
<p>As for being able to see the progression of the DB, isn&#8217;t that what source control is for?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Veit</title>
		<link>http://www.pathf.com/blogs/2008/07/resolved-should-schemarb-be-included-in-your-source-control/comment-page-1/#comment-2540</link>
		<dc:creator>Stephen Veit</dc:creator>
		<pubDate>Sun, 20 Jul 2008 13:31:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1046#comment-2540</guid>
		<description>@Darren: We never use an external model class from inside a migration because of the fact that it might go away. If we need to access a model, we define the model class inside of the migration class where is is used. This allows to always be able to run our migrations from scratch, even if an old model has gone away. I treat schema.rb as a generated file.</description>
		<content:encoded><![CDATA[<p>@Darren: We never use an external model class from inside a migration because of the fact that it might go away. If we need to access a model, we define the model class inside of the migration class where is is used. This allows to always be able to run our migrations from scratch, even if an old model has gone away. I treat schema.rb as a generated file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: darkstego</title>
		<link>http://www.pathf.com/blogs/2008/07/resolved-should-schemarb-be-included-in-your-source-control/comment-page-1/#comment-2533</link>
		<dc:creator>darkstego</dc:creator>
		<pubDate>Sat, 19 Jul 2008 20:40:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1046#comment-2533</guid>
		<description>One of the things that I found frustrating about rails is trying to get a good grasp of the database schema by figuring out multiple migration files. Which is why I found the plugin automigrations to be so useful. 

I believe the incremental nature of migrations has some advantages but it kinda falls in an area of &quot;should be handled by SCM&quot;. Looking at increments makes it very difficult to grasp the whole picture, and as development grows a lot of defunct migrations get piled up which serve no purpose other than causing errors during migrations.

It would be interesting to see if one could come up with a solution that provided several of the advantages of migrations (data entry, raw SQL) into a solution that does not pile up incremental files.

Maybe if migrations could be flushed at certain stable points. And the schema.rb becomes a single migration file at that point.</description>
		<content:encoded><![CDATA[<p>One of the things that I found frustrating about rails is trying to get a good grasp of the database schema by figuring out multiple migration files. Which is why I found the plugin automigrations to be so useful. </p>
<p>I believe the incremental nature of migrations has some advantages but it kinda falls in an area of &#8220;should be handled by SCM&#8221;. Looking at increments makes it very difficult to grasp the whole picture, and as development grows a lot of defunct migrations get piled up which serve no purpose other than causing errors during migrations.</p>
<p>It would be interesting to see if one could come up with a solution that provided several of the advantages of migrations (data entry, raw SQL) into a solution that does not pile up incremental files.</p>
<p>Maybe if migrations could be flushed at certain stable points. And the schema.rb becomes a single migration file at that point.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Priit</title>
		<link>http://www.pathf.com/blogs/2008/07/resolved-should-schemarb-be-included-in-your-source-control/comment-page-1/#comment-2527</link>
		<dc:creator>Priit</dc:creator>
		<pubDate>Sat, 19 Jul 2008 10:57:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1046#comment-2527</guid>
		<description>I&#039;ve written really simple rake task to build schema.rb file from migrations. It creates temporary database, runs all migrations in it and dumps the database schema back into schema.rb

We needed this because we do a lot of our experimental development in branches and therefore development database can contain things you don&#039;t want to make their way to production right away.

We have a system where each new client get&#039;s its own database schema and we don&#039;t want the user wait while migrations are building up their schema on registration. This is where schema.rb really pays off.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve written really simple rake task to build schema.rb file from migrations. It creates temporary database, runs all migrations in it and dumps the database schema back into schema.rb</p>
<p>We needed this because we do a lot of our experimental development in branches and therefore development database can contain things you don&#8217;t want to make their way to production right away.</p>
<p>We have a system where each new client get&#8217;s its own database schema and we don&#8217;t want the user wait while migrations are building up their schema on registration. This is where schema.rb really pays off.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jared</title>
		<link>http://www.pathf.com/blogs/2008/07/resolved-should-schemarb-be-included-in-your-source-control/comment-page-1/#comment-2518</link>
		<dc:creator>Jared</dc:creator>
		<pubDate>Sat, 19 Jul 2008 00:21:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1046#comment-2518</guid>
		<description>One argument in favor of migrations over schema.rb, raw SQL statements called with execute don&#039;t seem to maintain their special arguments when they travel from migration form to schema form.

For example, we have a database that uses memory tables to hold data that only needs to persist for about 10 minutes, but if we were to do a db:schema:load, the tables would be created as standard INNODB tables that live on the file system.</description>
		<content:encoded><![CDATA[<p>One argument in favor of migrations over schema.rb, raw SQL statements called with execute don&#8217;t seem to maintain their special arguments when they travel from migration form to schema form.</p>
<p>For example, we have a database that uses memory tables to hold data that only needs to persist for about 10 minutes, but if we were to do a db:schema:load, the tables would be created as standard INNODB tables that live on the file system.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Wood</title>
		<link>http://www.pathf.com/blogs/2008/07/resolved-should-schemarb-be-included-in-your-source-control/comment-page-1/#comment-2517</link>
		<dc:creator>Jon Wood</dc:creator>
		<pubDate>Fri, 18 Jul 2008 23:59:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1046#comment-2517</guid>
		<description>Bernard, to move a production box between versions of your schema, you would run migrations like anywhere else, but as a tool to get a new production box deployed the schema:load task is a very useful tool.

When it comes to seeding your database, I tend to use take tasks, since they can be more easily be maintained, and don&#039;t depend on a nine month old migration still working with what may be radically different models. I just don&#039;t see the value in making sure tour migrattions still run long after the purpose they were written for has passed.

Apologies for any typos - it seems my iPod doesn&#039;t want me to be able to see what I&#039;m typing

Jon</description>
		<content:encoded><![CDATA[<p>Bernard, to move a production box between versions of your schema, you would run migrations like anywhere else, but as a tool to get a new production box deployed the schema:load task is a very useful tool.</p>
<p>When it comes to seeding your database, I tend to use take tasks, since they can be more easily be maintained, and don&#8217;t depend on a nine month old migration still working with what may be radically different models. I just don&#8217;t see the value in making sure tour migrattions still run long after the purpose they were written for has passed.</p>
<p>Apologies for any typos &#8211; it seems my iPod doesn&#8217;t want me to be able to see what I&#8217;m typing</p>
<p>Jon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin Weiss</title>
		<link>http://www.pathf.com/blogs/2008/07/resolved-should-schemarb-be-included-in-your-source-control/comment-page-1/#comment-2516</link>
		<dc:creator>Justin Weiss</dc:creator>
		<pubDate>Fri, 18 Jul 2008 23:51:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1046#comment-2516</guid>
		<description>I don&#039;t really think either are definitive, but the migrations are more important than the schema.rb. For us, at least, the data is the most important part. We use the production backups to restore the &#039;current&#039; state of the database, including the base database structure, and migrations to move that &#039;current&#039; state into the state the branch we are working in expects. I would never consider using schema.rb or migrations to recreate a database from scratch, because it&#039;d be missing the most important part -- the data.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t really think either are definitive, but the migrations are more important than the schema.rb. For us, at least, the data is the most important part. We use the production backups to restore the &#8216;current&#8217; state of the database, including the base database structure, and migrations to move that &#8216;current&#8217; state into the state the branch we are working in expects. I would never consider using schema.rb or migrations to recreate a database from scratch, because it&#8217;d be missing the most important part &#8212; the data.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Darren</title>
		<link>http://www.pathf.com/blogs/2008/07/resolved-should-schemarb-be-included-in-your-source-control/comment-page-1/#comment-2514</link>
		<dc:creator>Darren</dc:creator>
		<pubDate>Fri, 18 Jul 2008 22:26:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1046#comment-2514</guid>
		<description>We ran into the situation where a migration used a model class directly (to change the data).  Eventually, we deleted that model, which made that migration fail.  At that point, schema.rb was the only way to &#039;create&#039; the database.

Migrations are meant to be run over time, as your code changes.  That is, a migration should be run with the same source set that it was intended to be run with.  Be very careful running them with newer code (i.e., running old migrations with a fresh up to date copy of source).</description>
		<content:encoded><![CDATA[<p>We ran into the situation where a migration used a model class directly (to change the data).  Eventually, we deleted that model, which made that migration fail.  At that point, schema.rb was the only way to &#8216;create&#8217; the database.</p>
<p>Migrations are meant to be run over time, as your code changes.  That is, a migration should be run with the same source set that it was intended to be run with.  Be very careful running them with newer code (i.e., running old migrations with a fresh up to date copy of source).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allen</title>
		<link>http://www.pathf.com/blogs/2008/07/resolved-should-schemarb-be-included-in-your-source-control/comment-page-1/#comment-2513</link>
		<dc:creator>Allen</dc:creator>
		<pubDate>Fri, 18 Jul 2008 22:13:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1046#comment-2513</guid>
		<description>I think the schema.db is like a database test. 

The database after the migrations should == schema.db. Any descripencies could be the result of some improper migrations, or changes made to the deployed database not reflected in the development schema.

That being said, I don&#039;t employ this as a test currently. :-)</description>
		<content:encoded><![CDATA[<p>I think the schema.db is like a database test. </p>
<p>The database after the migrations should == schema.db. Any descripencies could be the result of some improper migrations, or changes made to the deployed database not reflected in the development schema.</p>
<p>That being said, I don&#8217;t employ this as a test currently. <img src='http://www.pathf.com/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pete</title>
		<link>http://www.pathf.com/blogs/2008/07/resolved-should-schemarb-be-included-in-your-source-control/comment-page-1/#comment-2510</link>
		<dc:creator>pete</dc:creator>
		<pubDate>Fri, 18 Jul 2008 20:31:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1046#comment-2510</guid>
		<description>The other developers I work with don&#039;t even want database.yml checked into source control. Oh, and we don&#039;t have migrations either.</description>
		<content:encoded><![CDATA[<p>The other developers I work with don&#8217;t even want database.yml checked into source control. Oh, and we don&#8217;t have migrations either.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Waits</title>
		<link>http://www.pathf.com/blogs/2008/07/resolved-should-schemarb-be-included-in-your-source-control/comment-page-1/#comment-2508</link>
		<dc:creator>Stephen Waits</dc:creator>
		<pubDate>Fri, 18 Jul 2008 19:21:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1046#comment-2508</guid>
		<description>Seriously, why is this an argument?  Do whatever works for you or your team.  The customers, folks using your site, will never know the difference.</description>
		<content:encoded><![CDATA[<p>Seriously, why is this an argument?  Do whatever works for you or your team.  The customers, folks using your site, will never know the difference.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://www.pathf.com/blogs/2008/07/resolved-should-schemarb-be-included-in-your-source-control/comment-page-1/#comment-2507</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Fri, 18 Jul 2008 19:09:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1046#comment-2507</guid>
		<description>@Bernard: schema.rb is used as the source when creating a database, migrations are used when the DB with an earlier schema and containing data already exists. Foreign keys are dealt with the RedHillOnRails Core plugin.

&quot;[schema.rb] is the authoritative source for your database schema&quot;, &quot;running all the migrations from scratch ... is a flawed and unsustainable approach&quot; - schema.rb

Andrew</description>
		<content:encoded><![CDATA[<p>@Bernard: schema.rb is used as the source when creating a database, migrations are used when the DB with an earlier schema and containing data already exists. Foreign keys are dealt with the RedHillOnRails Core plugin.</p>
<p>&#8220;[schema.rb] is the authoritative source for your database schema&#8221;, &#8220;running all the migrations from scratch &#8230; is a flawed and unsustainable approach&#8221; &#8211; schema.rb</p>
<p>Andrew</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Wilden</title>
		<link>http://www.pathf.com/blogs/2008/07/resolved-should-schemarb-be-included-in-your-source-control/comment-page-1/#comment-2504</link>
		<dc:creator>Mark Wilden</dc:creator>
		<pubDate>Fri, 18 Jul 2008 19:02:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1046#comment-2504</guid>
		<description>@Bernard: If you need DB-specific code in your schema, then the solution is 

 Rails::Initializer.run do &#124;config&#124;
  config.active_record.schema_format = :sql
 end

which replaces schema.rb with development_structure.sql.

///ark</description>
		<content:encoded><![CDATA[<p>@Bernard: If you need DB-specific code in your schema, then the solution is </p>
<p> Rails::Initializer.run do |config|<br />
  config.active_record.schema_format = :sql<br />
 end</p>
<p>which replaces schema.rb with development_structure.sql.</p>
<p>///ark</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bernard Gallet</title>
		<link>http://www.pathf.com/blogs/2008/07/resolved-should-schemarb-be-included-in-your-source-control/comment-page-1/#comment-2503</link>
		<dc:creator>Bernard Gallet</dc:creator>
		<pubDate>Fri, 18 Jul 2008 18:25:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1046#comment-2503</guid>
		<description>I do not believe that schema.rb should be the source. This scheme &quot;may&quot; work during development, but how do you update your production version if schema.rb is your source?

Worse, if you use the generated schema.rb, it may be incomplete if for example you used execute to run some DB specific code (think trigger, stored procs, etc...;)

Bernard Gallet</description>
		<content:encoded><![CDATA[<p>I do not believe that schema.rb should be the source. This scheme &#8220;may&#8221; work during development, but how do you update your production version if schema.rb is your source?</p>
<p>Worse, if you use the generated schema.rb, it may be incomplete if for example you used execute to run some DB specific code (think trigger, stored procs, etc&#8230;;)</p>
<p>Bernard Gallet</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.320 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-16 23:23:27 -->
