
エントリーの編集

エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
記事へのコメント1件
- 注目コメント
- 新着コメント
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています

- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
RailsのSTIやenumで想定外の値が入らないようにする方法 - Qiita
class CreatePosts < ActiveRecord::Migration[6.0] def change create_table :posts do |t| t.string :... class CreatePosts < ActiveRecord::Migration[6.0] def change create_table :posts do |t| t.string :type t.integer :state t.string :title t.text :body t.timestamps end create_table :post_states do |t| t.string :name t.timestamps end add_foreign_key :posts, :post_states, column: :state create_table :post_types, id: :string do |t| t.timestamps end add_foreign_key :posts, :post_types, column: :type end
2020/06/28 リンク