Opened 12 years ago

Closed 12 years ago

#483 closed defect (fixed)

rails db migrate script errors

Reported by: writetodan@… Owned by: steve@…
Priority: major Milestone:
Component: rails_port Version:
Keywords: db migrate sql Cc:

Description

source:sites/rails_port/db/migrate/001_create_osm_db.rb

has some problems:

  • some duplicate indexes (by default rails creates primary key on 'id' field)
  • makes node coordinates single-precision
  • default 'id' PK enforces uniqueness on way 'id' in way segments and tags tables

the attached path attempts to fix this, but i haven't verified as yet.

once set 'id => false', might also need to add:

t.column "id", :integer

...statements to current_way_segments and current_way_tags

Attachments (1)

create_db.txt (2.8 KB) - added by writetodan@… 12 years ago.
patch - yet to be verified

Download all attachments as: .zip

Change History (2)

Changed 12 years ago by writetodan@…

Attachment: create_db.txt added

patch - yet to be verified

comment:1 Changed 12 years ago by Tom Hughes

Resolution: fixed
Status: newclosed

Change r3293 modified the migrate script to make it produce a database that exactly matches that on the live system (as confirmed by dumping both schemas and comparing them).

Note: See TracTickets for help on using tickets.