We have two tables that — for legal reasons — are not allowed to be combined. The data is so similar that we are using PostgreSQL table inheritance, but we can't return the information in the same page. Originally, we only had one table with a column specifying which data set to use, but or lawyers put an end to that.
So we have two tables tables with the exact same columns: product_foo and product_bar. We also have two models that use model inheritance so that they have the exact same fields: ProductFoo and ProductBar. The decision to choose which table to use is handled based on user settings.
We would like to go back to just having the one Product model, and have its table name switch as necessary. Is there a way to do that?
Peter of the Norse
No comments:
Post a Comment