<?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: Dump an Existing Database Schema Into a Ruby On Rails Migration Ready Format</title>
	<atom:link href="http://www.justinball.com/2008/05/09/dump-an-existing-database-schema-into-a-ruby-on-rails-migration-ready-format/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.justinball.com/2008/05/09/dump-an-existing-database-schema-into-a-ruby-on-rails-migration-ready-format/</link>
	<description>Life is an optimization issue</description>
	<lastBuildDate>Tue, 16 Mar 2010 03:48:37 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9-rare</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Generate Rails Migrations from your PostgreSQL or MySQL database &#171; The Irish Penguin</title>
		<link>http://www.justinball.com/2008/05/09/dump-an-existing-database-schema-into-a-ruby-on-rails-migration-ready-format/comment-page-1/#comment-6927</link>
		<dc:creator>Generate Rails Migrations from your PostgreSQL or MySQL database &#171; The Irish Penguin</dc:creator>
		<pubDate>Wed, 25 Nov 2009 21:47:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinball.com/?p=503#comment-6927</guid>
		<description>[...] to Justin Ball on this Nobody Listens Anyway blog at Dump an Existing Database Schema Into a Ruby On Rails Migration Ready Format for the basis of this tip. Sometimes somebody [...]</description>
		<content:encoded><![CDATA[<p>[...] to Justin Ball on this Nobody Listens Anyway blog at Dump an Existing Database Schema Into a Ruby On Rails Migration Ready Format for the basis of this tip. Sometimes somebody [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jbasdf</title>
		<link>http://www.justinball.com/2008/05/09/dump-an-existing-database-schema-into-a-ruby-on-rails-migration-ready-format/comment-page-1/#comment-6853</link>
		<dc:creator>jbasdf</dc:creator>
		<pubDate>Tue, 22 Sep 2009 21:41:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinball.com/?p=503#comment-6853</guid>
		<description>I don&#039;t know that I&#039;m so cool, but there are some cool guys around the net.  Rails Guides is a great place for the big stuff - &lt;a href=&quot;http://guides.rubyonrails.org/&quot; rel=&quot;nofollow&quot;&gt;http://guides.rubyonrails.org/&lt;/a&gt; and Rails inside highlights some cool stuff &lt;a href=&quot;http://www.railsinside.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.railsinside.com/&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>I don&#39;t know that I&#39;m so cool, but there are some cool guys around the net.  Rails Guides is a great place for the big stuff &#8211; <a href="http://guides.rubyonrails.org/" rel="nofollow">http://guides.rubyonrails.org/</a> and Rails inside highlights some cool stuff <a href="http://www.railsinside.com/" rel="nofollow">http://www.railsinside.com/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: billitch</title>
		<link>http://www.justinball.com/2008/05/09/dump-an-existing-database-schema-into-a-ruby-on-rails-migration-ready-format/comment-page-1/#comment-6851</link>
		<dc:creator>billitch</dc:creator>
		<pubDate>Tue, 22 Sep 2009 13:47:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinball.com/?p=503#comment-6851</guid>
		<description>Thank you !&lt;br&gt;&lt;br&gt;This is typically the obvious part of the Ruby On Rails framework that is not formally documented, but rather given drop by drop by cool people like you.&lt;br&gt;&lt;br&gt;Why isn&#039;t there a wiki where we would all write a more comprehensive documentation for Rails in a single place ?</description>
		<content:encoded><![CDATA[<p>Thank you !</p>
<p>This is typically the obvious part of the Ruby On Rails framework that is not formally documented, but rather given drop by drop by cool people like you.</p>
<p>Why isn&#39;t there a wiki where we would all write a more comprehensive documentation for Rails in a single place ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob Campbell</title>
		<link>http://www.justinball.com/2008/05/09/dump-an-existing-database-schema-into-a-ruby-on-rails-migration-ready-format/comment-page-1/#comment-6708</link>
		<dc:creator>Bob Campbell</dc:creator>
		<pubDate>Wed, 03 Jun 2009 20:30:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinball.com/?p=503#comment-6708</guid>
		<description>Nope!  Which of course I discovered after posting. :) 

I found the yaml_db which is what I want.  

So maybe what&#039;s needed is a mix of the two? Like, &#039;rake db:backup&#039; and &#039;rake db:restore&#039;? Hmm... :)</description>
		<content:encoded><![CDATA[<p>Nope!  Which of course I discovered after posting. <img src='http://www.justinball.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>I found the yaml_db which is what I want.  </p>
<p>So maybe what&#8217;s needed is a mix of the two? Like, &#8216;rake db:backup&#8217; and &#8216;rake db:restore&#8217;? Hmm&#8230; <img src='http://www.justinball.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin Ball</title>
		<link>http://www.justinball.com/2008/05/09/dump-an-existing-database-schema-into-a-ruby-on-rails-migration-ready-format/comment-page-1/#comment-6707</link>
		<dc:creator>Justin Ball</dc:creator>
		<pubDate>Wed, 03 Jun 2009 19:12:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinball.com/?p=503#comment-6707</guid>
		<description>I&#039;m not sure if rake db:schema:dump will dump the data.  I think it just dumps the db structure in which case it wouldn&#039;t make a very good backup.  You probably could take the rake task and modify it to dump the data in which case you would have an easy backup.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure if rake db:schema:dump will dump the data.  I think it just dumps the db structure in which case it wouldn&#8217;t make a very good backup.  You probably could take the rake task and modify it to dump the data in which case you would have an easy backup.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob Campbell</title>
		<link>http://www.justinball.com/2008/05/09/dump-an-existing-database-schema-into-a-ruby-on-rails-migration-ready-format/comment-page-1/#comment-6706</link>
		<dc:creator>Bob Campbell</dc:creator>
		<pubDate>Wed, 03 Jun 2009 18:59:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinball.com/?p=503#comment-6706</guid>
		<description>The default schema.rb file has this comment:

# Note that this schema.rb definition is the authoritative source for your database schema. If you need
# to create the application database on another system, you should be using db:schema:load, not running
# all the migrations from scratch.


Would this imply that you could rake db:schema:dump your development database, copy the file to your production database and rake db:schema:load (with RAILS_ENV=production) and it would populate the database with everything?

Seems like this might be a decent way to create a backup of the database, too, that would be faster to regenerate, ala&#039; cronjob:
rake db:schema:dump
cp /site/db/schema.db /backup/site/db/schema.rb.$datestamp
In case of disaster, copy back and
rake db:schema:load

Thoughts?</description>
		<content:encoded><![CDATA[<p>The default schema.rb file has this comment:</p>
<p># Note that this schema.rb definition is the authoritative source for your database schema. If you need<br />
# to create the application database on another system, you should be using db:schema:load, not running<br />
# all the migrations from scratch.</p>
<p>Would this imply that you could rake db:schema:dump your development database, copy the file to your production database and rake db:schema:load (with RAILS_ENV=production) and it would populate the database with everything?</p>
<p>Seems like this might be a decent way to create a backup of the database, too, that would be faster to regenerate, ala&#8217; cronjob:<br />
rake db:schema:dump<br />
cp /site/db/schema.db /backup/site/db/schema.rb.$datestamp<br />
In case of disaster, copy back and<br />
rake db:schema:load</p>
<p>Thoughts?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin Ball</title>
		<link>http://www.justinball.com/2008/05/09/dump-an-existing-database-schema-into-a-ruby-on-rails-migration-ready-format/comment-page-1/#comment-6539</link>
		<dc:creator>Justin Ball</dc:creator>
		<pubDate>Mon, 20 Apr 2009 16:13:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinball.com/?p=503#comment-6539</guid>
		<description>No doubt the technique is a bit tricky, but you should only be doing this on a dev machine with a backup copy of a database so that if something goes bad you can just start over.</description>
		<content:encoded><![CDATA[<p>No doubt the technique is a bit tricky, but you should only be doing this on a dev machine with a backup copy of a database so that if something goes bad you can just start over.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dietrich Speer</title>
		<link>http://www.justinball.com/2008/05/09/dump-an-existing-database-schema-into-a-ruby-on-rails-migration-ready-format/comment-page-1/#comment-6536</link>
		<dc:creator>Dietrich Speer</dc:creator>
		<pubDate>Fri, 17 Apr 2009 18:29:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinball.com/?p=503#comment-6536</guid>
		<description>D-A-N-G-E-R-O-U-S
I ran into some weird problems on a new site under development and decided to restart by creating a new database using db:schema:dump. So I create the new site using rake, change the db config to the old database and run it. Next is the new migration. Then I should have changed the db config to the new database, which I forgot. The result after db: migrate is a nice clean database schema with all the data gone. 
D-A-N-G-E-R-O-U-S</description>
		<content:encoded><![CDATA[<p>D-A-N-G-E-R-O-U-S<br />
I ran into some weird problems on a new site under development and decided to restart by creating a new database using db:schema:dump. So I create the new site using rake, change the db config to the old database and run it. Next is the new migration. Then I should have changed the db config to the new database, which I forgot. The result after db: migrate is a nice clean database schema with all the data gone.<br />
D-A-N-G-E-R-O-U-S</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: glennswest</title>
		<link>http://www.justinball.com/2008/05/09/dump-an-existing-database-schema-into-a-ruby-on-rails-migration-ready-format/comment-page-1/#comment-6103</link>
		<dc:creator>glennswest</dc:creator>
		<pubDate>Fri, 09 Jan 2009 02:28:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinball.com/?p=503#comment-6103</guid>
		<description>This is great idea. Been doing migrations and database conversions for a while, and never thought to &quot;hack&quot; it at this level.
Simple &quot;DRY&quot; and nice.</description>
		<content:encoded><![CDATA[<p>This is great idea. Been doing migrations and database conversions for a while, and never thought to &#8220;hack&#8221; it at this level.<br />
Simple &#8220;DRY&#8221; and nice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin Ball</title>
		<link>http://www.justinball.com/2008/05/09/dump-an-existing-database-schema-into-a-ruby-on-rails-migration-ready-format/comment-page-1/#comment-6046</link>
		<dc:creator>Justin Ball</dc:creator>
		<pubDate>Fri, 12 Dec 2008 04:35:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinball.com/?p=503#comment-6046</guid>
		<description>Glad I could help.  Hopefully it all goes smoothly.</description>
		<content:encoded><![CDATA[<p>Glad I could help.  Hopefully it all goes smoothly.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
