Sha256: 6cc21fdc4aea97c85f59df37c01abac462165570de7e20b654c3c3b138a55a0b
Contents?: true
Size: 544 Bytes
Versions: 1
Compression:
Stored size: 544 Bytes
Contents
class CreateNeighborhoodsStreets < ActiveRecord::Migration def change create_table :neighborhoods_streets, id: false do |t| t.references :street, :neighborhood end add_index :neighborhoods_streets, :street_id add_index :neighborhoods_streets, :neighborhood_id add_index :neighborhoods_streets, [:street_id, :neighborhood_id], unique: true, name: :street_neighborhood add_foreign_key :neighborhoods_streets, :streets add_foreign_key :neighborhoods_streets, :neighborhoods, column: :neighborhood_id end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
unico-training-7.8.0 | db/migrate/20110908175305_create_neighborhoods_streets.rb |