エントリーの編集

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

- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
migrationでforeign keyを定義する - Pistolfly
UsingMigrations in Ruby on Rails class CreateLineItems < ActiveRecord::Migration def self.up crea... UsingMigrations in Ruby on Rails class CreateLineItems < ActiveRecord::Migration def self.up create_table(:line_items) do |t| t.column(:product_id, :integer, :null => false) t.column(:quantity, :integer, :null => false, :default => 0) end # This line is required if you're running a version of MySQL prior to 4.1.2 #add_index(:line_items, [:product_id], :name => 'fk_line_items_product') execute('ALT