On Wed, Mar 3, 2010 at 22:03, Brett Henderson <br...@bretth.com> wrote: > On Wed, Mar 3, 2010 at 8:32 PM, Ævar Arnfjörð Bjarmason <ava...@gmail.com> > wrote: >> >> On Wed, Mar 3, 2010 at 01:21, Brett Henderson <br...@bretth.com> wrote: >> > Hi Ævar, >> > >> > Can you provide the full error output from Osmosis. I suspect there's a >> > "caused by" nested exception that provides the root cause for the error. >> >> After some more debugging it turns out that the issue is simply that >> the script/*.sql files are very out of date and in no way reflect the >> current DB schema or the tables that osmosis tries to insert into. > > Um, I think you may be using the wrong tasks against the wrong schema. It > sounds like you're trying to use "apidb" tasks against the Osmosis simple > schema. > > The "pgsql" tasks are the ones required for the Osmosis "simple" schema that > you've created. This schema doesn't have a concept of history tables so in > fact every table is a current table. It is a PostGIS schema with optional > linestring and bbox columns on the way table. > http://wiki.openstreetmap.org/wiki/Osmosis/DetailedUsage#PostGIS_Tasks > > The "apidb" tasks are the ones that write to the production rails API > schema. There is a script called "script/contrib/apidb_0.6.sql" included > with Osmosis to create it. It is somewhat out of date because I don't have > a working rails port, but should still be compatible if you switch on the > allowIncorrectSchemaVersion=yes on all database tasks. > http://wiki.openstreetmap.org/wiki/Osmosis/DetailedUsage#API_Database_Tasks > >> >> In the attached patch I fixed some of these but it doesn't fix all the >> issues, the current_* tables are still missing. It would be nice if >> one could skip importing into current_* for one-off imports like >> these. > > I had a quick look and it appears that you're adding APIDB tables to the > "simple" schema. > > As for current_* tables, the "apidb" tasks do have a > populateCurrentTables=no option, but I don't think this is what you're > looking for. > http://wiki.openstreetmap.org/wiki/Osmosis/DetailedUsage#--write-apidb_.28--wd.29 > > Unless you really need apidb tasks, I'd stick with pgsql tasks because the > associated schema is much simpler.
Yes. The problem was that I was mixing the apidb task with the postgis task as you point out. I tried using the api .sql in the past but it failed with similar errors, it would probably work with allowIncorrectSchemaVersion=yes though as you point out. Thanks for your help. _______________________________________________ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev