Sha256: def1356bd78b64073cf619954094321bd73c6b293723abe3f2d5102844b54b15
Contents?: true
Size: 721 Bytes
Versions: 2
Compression:
Stored size: 721 Bytes
Contents
class CreateJunctions < ActiveRoad::Migration def self.up create_table :junctions do |t| t.string :objectid t.point :geometry, :srid => ActiveRoad.srid t.timestamps end add_index :junctions, :objectid, :uniq => true create_table :junctions_physical_roads, :id => false do |t| t.belongs_to :physical_road t.belongs_to :junction end # Generated name is too long for PostgreSQL add_index :junctions_physical_roads, [:physical_road_id, :junction_id], :name => 'junctions_physical_roads_ids', :uniq => true add_index :junctions_physical_roads, [:junction_id] end def self.down drop_table :junctions drop_table :junctions_physical_roads end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
active_road-0.0.3 | db/migrate/20120203154500_create_junctions.rb |
active_road-0.0.2 | db/migrate/20120203154500_create_junctions.rb |