Class: CreateUris
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateUris
- Defined in:
- lib/generators/oxen_account/templates/uri.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/generators/oxen_account/templates/uri.rb', line 2 def change create_table :uris do |t| t.references :account, index: true t.references :uriable, polymorphic: true, index: true t.string :uri_label t.string :uri t.string :uri_protocol t.boolean :preferred t.integer :position t.integer :lock_version t. null: false end add_foreign_key :uris, :accounts end |