LoginSignup
0
0

More than 3 years have passed since last update.

railsのmigrationで主キーの名前と型を変える

Last updated at Posted at 2019-09-26
class BackupByMail3 < ActiveRecord::Migration[5.2]
  def change
    create_table "backup_mail", id: false |t|
      t.string "key", limit: 64, primary_key: true
    end
  end
end

Googleのせい(自分の検索の仕方が悪いとは絶対言わない)だとは思うがドンピシャなものがなかなか見つからず手間取ったので載せておきます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0