<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>K_Koh</author_name>
  <author_url>https://blog.hatena.ne.jp/K_Koh/</author_url>
  <blog_title>Just do IT</blog_title>
  <blog_url>https://k-koh.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby on Rails</anon>
  </categories>
  <description>起きたエラー テーブルをいじっていていろいろミスったので、git reset --hardをして再度rails db:migrateコマンドを打つと、次のエラーが出た。 PG::DuplicateColumn: ERROR: column &quot;user_id&quot; of relation &quot;pages&quot; already exists 「pagesテーブルにuser_idカラムを加えようとしてるけど、もうすでに存在してるよ〜」という意味。同じ名前のカラムを同一のテーブルに2つ以上作れません。 原因 以下、エラーが起きるまでにやったこと。 マイグレーションファイルをつくり、db:migrateした ミス…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fk-koh.hatenablog.com%2Fentry%2F2020%2F05%2F29%2F174420&quot; title=&quot;rails db:migrate をすると出るPG::DuplicateColumn: ERROR の対処 - Just do IT&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>2020-05-29 17:44:20</published>
  <title>rails db:migrate をすると出るPG::DuplicateColumn: ERROR の対処</title>
  <type>rich</type>
  <url>https://k-koh.hatenablog.com/entry/2020/05/29/174420</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
