Yeah, it's an array of hashes with the values listed in the import list. Any ideas what else I should try?
Xavier On Jul 17, 6:50 am, Jeremy Evans <[email protected]> wrote: > On Jul 16, 12:47 am, Xavier Lange <[email protected]> wrote: > > > > > I am writing a migration script and I need to use the import function > > but it seems to be generating bad SQL for postgres (8.3.7). I am using > > sequel 3.2.0. The script is messing up on the first set it tries to > > import, all the values in the SQL statement make sense for the table. > > > I'm trying to import all the column data except for id (an auto- > > incrementing value) and updated_at (a null-able timestamp). > > response_class.import > > ([:primitive_id, :user_id, :created_at, :response, :invitation_id], > > responses) > > > The columns of numeric_responses: > > [:id, :primitive_id, :user_id, :created_at, :updated_at, :response, > > :invitation_id] > > > The error: > > PGError: ERROR: column "primitive_id" does not exist > > LINE 1: ...pdated_at", "response", "invitation_id") VALUES > > (("primitive... > > > The SQL I see in the log: > > INSERT INTO "numeric_responses" ("primitive_id", "user_id", > > "created_at", "updated_at", "response", "invitation_id") VALUES > > (("primitive_id" = 1765) AND ("invitation_id" = 994) AND ("created_at" > > = TIMESTAMP '2009-07-15 18:55:49.000000') AND ("response" = 3) AND > > ("user_id" = 905)), ... > > > Any ideas? > > Hmm, there might be a bug there. What's responses? Is it an array of > value arrays? > > Jeremy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en -~----------~----~----~----~------~----~------~--~---
