Skip to content

Instantly share code, notes, and snippets.

@NaiyaShah-BTC
Created April 26, 2019 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NaiyaShah-BTC/1aa9acf7d11f3db6f2c9b05e7cea7eb6 to your computer and use it in GitHub Desktop.
Save NaiyaShah-BTC/1aa9acf7d11f3db6f2c9b05e7cea7eb6 to your computer and use it in GitHub Desktop.
class CreatePosts < ActiveRecord::Migration[6.0]
def change
create_table :posts do |t|
t.string :title, index: { unique: true }
t.timestamps
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment