Use Elixir to create tables in a non-default Postgresql schema

29 views
Skip to first unread message

Kirill Müller

unread,
Nov 10, 2011, 12:04:39 PM11/10/11
to SQLElixir
Hello,

we are using elixir for defining a SQL database schema (including
foreign key constraints) that works for different database engines.
The code is like this:

######
from elixir import *

metadata.bind = "psql://...."

class MyEntity(Entity):
....

class ....
....

setup_all()
drop_all()
create_all()
######

Is it possible, in this setup, to specify a Postgresql schema where
_all_ the tables should live? How?

I am aware of using_table_options(schema=...), but adding it to each
class would contribute a lot of redundancy. I was unable develop an
extension of EntityMeta that would set this table option, I'd
appreciate any hints on how to do this -- even if it turns out that
there is a higher-level setting for the default Postgresql schema.


Best regards

Kirill
Reply all
Reply to author
Forward
0 new messages