Class: CreateOproClientApps
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateOproClientApps
- Defined in:
- lib/generators/active_record/templates/client_apps.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/generators/active_record/templates/client_apps.rb', line 2 def change create_table :opro_client_apps do |t| t.string :name t.string :app_id t.string :app_secret t.text :permissions t.integer :user_id t. end add_index :opro_client_apps, :app_id, :unique => true add_index :opro_client_apps, [:app_id, :app_secret], :unique => true end |