Using multiple DB2 table schemas in Django

39 views
Skip to first unread message

David Adler

unread,
Apr 4, 2019, 9:49:48 PM4/4/19
to ibm_db
Is there any way to do this?

In the class Meta for the table I tried specifying
   db_table = 'myschema.mytable'
but it failed with a -204 trying to access
  connect_user.myschema.mytable

It would be helpful if the driver could check for the schema in the table name and not pre-pend the connect_user.

vysha...@gmail.com

unread,
Apr 8, 2019, 6:05:49 AM4/8/19
to ibm_db
Hi David,

I totally understand your requirement. I will explore if even we can provide this feature in ibm_db_django, and get back to you.

Thanks,
Vyshakh

David Adler

unread,
Apr 8, 2019, 9:11:49 AM4/8/19
to ibm...@googlegroups.com, vysha...@gmail.com
Hi Vyshakh,

My workaround is to create a table alias for the legacy tables in different schemas using the schema of the connected user. This seems to work fine but is a little confusing.

Regards,
David
--
You received this message because you are subscribed to the Google Groups "ibm_db" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ibm_db+un...@googlegroups.com.
To post to this group, send email to ibm...@googlegroups.com.
Visit this group at https://groups.google.com/group/ibm_db.
For more options, visit https://groups.google.com/d/optout.


Reply all
Reply to author
Forward
0 new messages