OsmSharp / ui

The UI components.
http://osmsharp.com/
GNU General Public License v2.0
138 stars 91 forks source link

SQLiteOsmStreamTarget, missing 'IF NOT EXISTS' in Initialize() #209

Closed Lotto2 closed 9 years ago

Lotto2 commented 9 years ago

Hello,

i tested OsmSharp / SQLite. the second time running 'SQLiteOsmStreamTarget.Initialize' over the same database throws an error: 'SQL logic error or missing database index IDX_WAY_NODES_NODE already exists'

error cause is missing 'IF NOT EXISTS' in the last 2 CREATE-INDEX-Statements.

CREATE INDEX IF NOT EXISTS [IDX_WAY_NODES_NODE] ON [way_nodes]([node_id] ASC); CREATE INDEX IF NOT EXISTS [IDX_WAY_NODES_WAY_SEQUENCE] ON [way_nodes]([way_id] ASC,[sequence_id] ASC);