<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>y_hakoiri</author_name>
  <author_url>https://blog.hatena.ne.jp/y_hakoiri/</author_url>
  <blog_title>箱のプログラミング日記。</blog_title>
  <blog_url>https://www.y-hakopro.com/</blog_url>
  <categories>
    <anon>Rails</anon>
    <anon>MySQL</anon>
  </categories>
  <description>カラムに外部キー制約をつけようとしたところうまくいかなかったので、 解決方法を残しておこうと思います。 実現したかったこと postテーブルを作成後、複数のカラムを追加 その際、外部キー制約を設定するカラムが含まれていたが、エラーになる テーブルはもともと作っていたので $ rails g migration AddColumnToPost ↓マイグレーションファイル def change add_column :posts, :product_name, :string, null: false add_column :posts, :product_description, :text, …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.y-hakopro.com%2Fentry%2F2019%2F06%2F29%2F103112&quot; title=&quot;カラムにreferencesの指定ができない【MySQL文法エラー】 - 箱のプログラミング日記。&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>https://i.gyazo.com/12a194abb4f8115611fcf19e6b2a276e.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-06-29 10:31:12</published>
  <title>カラムにreferencesの指定ができない【MySQL文法エラー】</title>
  <type>rich</type>
  <url>https://www.y-hakopro.com/entry/2019/06/29/103112</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
