Created
June 27, 2020 21:30
-
-
Save 123ish/f3aed9050da01464490352b18cb0d543 to your computer and use it in GitHub Desktop.
friendly id #db/migrate/date_add_slug_to_entries.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AddSlugToEntries < ActiveRecord::Migration[5.2] | |
def change | |
add_column :entries, :slug, :string | |
add_index :entries, :slug, unique: true | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment