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?
On Tuesday, August 11, 2020 at 2:43:59 PM UTC-5 Jeremy Evans wrote:
> On Tuesday, August 11, 2020 at 10:19:46 AM UTC-7, Anant M wrote:
>>
>> Hi,
>>
>> I keep getting kicked off the IRC (connection issues at home) so figured
>> this is a better way to ask a question (thank you so much!):
>>
>> Migrating a sqlite database to postgresql, and trying to figure out a
>> conversion for the views as this is mostly what we're working with. Is it
>> possible to migrate these/how are they typically migrated?
>>
>
> Sequel doesn't have built in support for migrating views. SQLite doesn't
> have a command to provide view definitions. You may be able to use
> something like the following:
>
> SQLITE_DB.views.each do |name|
> POSTGRESQL_DB.run SQLITE_DB[:sqlite_master].where(:type=>'view',
> :name=>name.to_s).get(:sql).gsub('`', '"')
> end
>
> However, if you are using any syntax in your SQLite view that is not
> directly supported by PostgreSQL, it won't work. The above code only tries
> to fix the identifier quoting differences.
>
> Thanks,
> Jeremy
>
--
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/b6b3a183-0ebe-46e2-a15f-5ee5010f93d6n%40googlegroups.com.