{"provider_name":"Hatena Blog","version":"1.0","author_name":"otiai10","height":"190","published":"2016-02-16 18:17:54","image_url":null,"url":"https://otiai10.hatenablog.com/entry/2016/02/16/181754","type":"rich","categories":["elixir"],"width":"100%","blog_url":"https://otiai10.hatenablog.com/","author_url":"https://blog.hatena.ne.jp/otiai10/","title":"\u3010Elixir\u3011Ecto.Migration\u3067\u5916\u90e8\u30ad\u30fc\u53c2\u7167\u3068NOT NULL\u5236\u7d04\u3092\u8ffd\u52a0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fotiai10.hatenablog.com%2Fentry%2F2016%2F02%2F16%2F181754\" title=\"\u3010Elixir\u3011Ecto.Migration\u3067\u5916\u90e8\u30ad\u30fc\u53c2\u7167\u3068NOT NULL\u5236\u7d04\u3092\u8ffd\u52a0 - DRY\u306a\u5099\u5fd8\u9332\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_title":"DRY\u306a\u5099\u5fd8\u9332","provider_url":"https://hatena.blog","description":"\u3053\u3046\u3044\u3046\u3053\u3068\u3092\u5b66\u3093\u3060\u306e\u3067\u2193 otiai10.hatenablog.com \u3053\u308c\u3092\u3001Ecto.Migration\u3067\u3084\u308a\u305f\u3044 defmodule MyApp.Repo.Migrations.CreateUserToken do use Ecto.Migration def change do create table(:posts) do add :user_id, references(:users, on_delete: :delete_all), null: false add :message, :string timestamps end create index(:posts, [:u\u2026"}