<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>koseki2</author_name>
  <author_url>https://blog.hatena.ne.jp/koseki2/</author_url>
  <blog_title>こせきの技術日記</blog_title>
  <blog_url>https://koseki.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>開発中に rake db:migrate がエラーで中断しても、元に戻す方法がわからない。スキーマを書き換える SQL なんて覚えてない。失敗したのにスキーマのバージョンだけ上がったりする。こういった問題を解決する、感動的なすごい方法があるのでは、と思って調べてたんだけど、見つけられなかった。バックアップしてテスト環境で実行するのがよさそうです。普通です。以下手順。環境は Rails 3 + MySQL。mysqldump を使って development DB を test にコピーする。バックアップ用の DB も作ってコピー。 $ mysqldump -u root myapp_devel…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkoseki.hatenablog.com%2Fentry%2F20121121%2FdbMigration&quot; title=&quot; Rails でマイグレーションが失敗する恐怖から解放される感動的なすごい方法 - こせきの技術日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-11-21 00:00:00</published>
  <title> Rails でマイグレーションが失敗する恐怖から解放される感動的なすごい方法</title>
  <type>rich</type>
  <url>https://koseki.hatenablog.com/entry/20121121/dbMigration</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
