<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Rails Forum - Ruby on Rails Help and Discussion Forum - DANGER: rake db:migrate drops the entire database. How to avoid this?]]></title>
		<link>http://railsforum.com/viewtopic.php?id=51551</link>
		<description><![CDATA[The most recent posts in DANGER: rake db:migrate drops the entire database. How to avoid this?.]]></description>
		<lastBuildDate>Mon, 10 Dec 2012 16:51:27 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: DANGER: rake db:migrate drops the entire database. How to avoid this?]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=157462#p157462</link>
			<description><![CDATA[<p>It never happened to me<br />rake db:migrate is to run all the tasks which is under the directory db/migrations to make your database schema up_to_date, which is&nbsp; not supposed to delete your existing database.</p>]]></description>
			<author><![CDATA[dummy@example.com (StrongTSQ)]]></author>
			<pubDate>Mon, 10 Dec 2012 16:51:27 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=157462#p157462</guid>
		</item>
		<item>
			<title><![CDATA[DANGER: rake db:migrate drops the entire database. How to avoid this?]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=157453#p157453</link>
			<description><![CDATA[<p>I had a legacy rails app which is working fine against a database.<br />I am building a new rails app which is aimed at replacing eventually the old legacy app. It runs against the same database.<br />When I first created the new rails app, I created a first migration to add a new table.<br />I ran rake db:migrate, and it deleted the entire database with its tens of thousands of records! Thanks god it was in dev environment. And thank god, I managed to restore this entire database (I copied all the migrations from the legacy app to the new app) and reran the entire migrations from scratch.</p><p>Now I would like to put my new app in a production environment. How can I run a new migration in production without deleting the entire production database, but just incrementally run the last migration on top of the existing database?</p><p>Is there an option, a parameter to pass to the rake db:migrate command to prevent it from deleting the existing database?</p>]]></description>
			<author><![CDATA[dummy@example.com (carrot06)]]></author>
			<pubDate>Mon, 10 Dec 2012 13:09:59 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=157453#p157453</guid>
		</item>
	</channel>
</rss>
