Thanks! Ran it with -E and here's where it failed:
>
> I, [2020-08-14T16:48:19.596261 #64101] INFO -- : (0.004751s) ALTER TABLE
> "BxMSOptions" ADD FOREIGN KEY ("courseID") REFERENCES "Courses"("courseID")
> E, [2020-08-14T16:48:19.597539 #64101] ERROR -- : PG::UndefinedTable:
> ERROR: relation "courses" does not exist: ALTER TABLE
> "CoursesUGDesignations" ADD FOREIGN KEY ("courseID") REFERENCES
> "courses"("courseID"), ADD FOREIGN KEY ("designation") REFERENCES
> "UGDesignations"("designation")
>
This was a new table that was added that created the new error. However,
other tables do have foreign keys that link to Courses/courseID so I'm
unsure why it is breaking now, where the other dump has the following:
I, [2020-08-14T16:57:34.177727 #65461] INFO -- : (0.006945s) ALTER TABLE
> "BxMSOptions" ADD FOREIGN KEY ("courseID") REFERENCES "Courses"("courseID")
> I, [2020-08-14T16:57:34.179610 #65461] INFO -- : (0.001656s) ALTER TABLE
> "CrossListings" ADD FOREIGN KEY ("courseID") REFERENCES
> "Courses"("courseID")
>
I guess it seems like the new foreign key was created to reference
lowercase courses. Is there a way to not wrap table names in double quotes
while copying?
The -C option works quite well, except for the case of moving views.
Thanks,
Anant
On Fri, Aug 14, 2020 at 2:55 PM Jeremy Evans <[email protected]> wrote:
> On Friday, August 14, 2020 at 11:50:44 AM UTC-7, Anant M wrote:
>>
>> Thanks! Will look more into this.
>>
>> Having some trouble with the general sequel -C dbfrom dbto.
>>
>> We had some empty strings in the sqlite database and made our changes to
>> them. The import was working fine for the database where I manually input
>> null/values, and in this database we used "update" if empty string, I am
>> getting the following error:
>>
>> Error: Sequel::DatabaseError: PG::UndefinedTable: ERROR: relation
>> "courses" does not exist
>>
>> One thought is that the table names get wrapped with double quotes when
>> moving into psql, but that is strange because the other database imports
>> just fine, and there are no other changes.
>>
>> Is there a way to change this or to see what's going on?
>>
>
> You can run with the -E flag which will log all SQL queries emitted.
>
> Also, note that the copy (-C) option is fairly limited, as explained at
> http://sequel.jeremyevans.net/rdoc/files/doc/bin_sequel_rdoc.html#label-Copy+Databases
>
> Thanks,
> Jeremy
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "sequel-talk" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/sequel-talk/NgD2igk8ks0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sequel-talk/9dcb91c0-0b78-4f4d-a41c-38d1735d2430o%40googlegroups.com
> <https://groups.google.com/d/msgid/sequel-talk/9dcb91c0-0b78-4f4d-a41c-38d1735d2430o%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sequel-talk/CAPLYRqq_5Ba%3DpFOjndD-tyc-eN1iTC5nnLoTM9R%3D1iRosR52sA%40mail.gmail.com.