Hi Jonathan,
i would do it like this:
- add in your global model  tables named attributs, attributs_value and
values,
- any table (let's call it XTable) that will eventually has need extra
column per client will be linked to attributs_value via a table
XTable_Attributs (For maximum flexibility).
Hope that helps,
Best regards


Ibrahima GAYE



Le jeu. 28 mars 2019 à 21:14, Jonathan Vanasco <jvana...@gmail.com> a
écrit :

>
>
> On Thursday, March 28, 2019 at 9:19:51 AM UTC-4, Mike Bayer wrote:
>>
>>
>> > Simpler solutions would be just using hstore or JSON types, but I would
>> be loosing the goodies of SQLAlchemy / Postgres schemas and consistency.
>>
>> this is totally how I'd want to do it unless your clients are
>> given access to program in SQL and SQLAlchemy.
>>
>
> wile I would handle this as JSON data too, there is also a database
> pattern for doing this in multi tenant applications where you use a table
> to allocate and store the allowable keys for each tenant , and another
> table to store the key values for the tenants objects. but i would do this
> in JSON.
>
>
> --
> SQLAlchemy -
> The Python SQL Toolkit and Object Relational Mapper
>
> http://www.sqlalchemy.org/
>
> To post example code, please provide an MCVE: Minimal, Complete, and
> Verifiable Example. See http://stackoverflow.com/help/mcve for a full
> description.
> ---
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sqlalchemy+unsubscr...@googlegroups.com.
> To post to this group, send email to sqlalchemy@googlegroups.com.
> Visit this group at https://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to