Files
nairobi/db/migrate/20190312100543_create_download_settings.rb
Javi Martín 765d405df1 Use Rails 5 conventions in migrations and models
We forgot to add these changes to pull requests which were in
development before we upgraded to Rails 5.

We're also moving the rubocop rules to the basic files, so we're
notified when we inherit from `ActiveRecord::Base`.
2019-08-07 13:53:27 +02:00

14 lines
381 B
Ruby

class CreateDownloadSettings < ActiveRecord::Migration[4.2]
def change
create_table :download_settings do |t|
t.string :name_model, null: false
t.string :name_field, null: false
t.boolean :downloadable, null: false, default: false
t.timestamps null: false
end
add_index :download_settings, [:name_model, :name_field], unique: true
end
end