interchange / interchange6-schema

DBIC schema for Interchange 6
8 stars 7 forks source link

Schema deployment types and conditional relationships. #185

Closed hexfusion closed 2 years ago

hexfusion commented 9 years ago

The Interchange6 schema is a very powerful tool but in non e-commerce deployments you have a lot of unused classes. I am curious if we could support something like a deployment type and build the schema to have conditional relationships. For example we could have a basic deployment type which would deploy all classes and relationships except commerce specific classes such as Order, Cart, Product, Shipment, PriceModifier etc. Perhaps down the road even the ability to upgrade from basic to full deployment with some variation of DH?

Although the argument can be made that this is an ecommerce schema. I believe that the usefulness of the project is much wider and with this type of flexibility could promote larger adoption.

How we would approach such a thing is perhaps a good conversation for riba at the conference. Would be a fair bit of work but the reward seems perhaps worth the effort?

hexfusion commented 9 years ago

seems like overloading deploy much like we do with populate might provide this functionality in theory?

SysPete commented 9 years ago

To do this we would need to overload connect and spin through the schema finding and removing any relationships that are not needed for the reduced schema. Could be other complexities to handle too - need to think more. If someone wants to take ic6s and only use a small number of classes then they are probably better either just using as is or else just copying the bits they like into their own namespace.

I'm not making this a definite no yet but I'm going to need some serious convincing.

On 19/09/15 12:51, Sam Batschelet (hexfusion) wrote:

seems like overloading deploy much like we do with populate might provide this functionality in theory?

— Reply to this email directly or view it on GitHub https://github.com/interchange/interchange6-schema/issues/185#issuecomment-141644432.

hexfusion commented 9 years ago

:) yeah it's a lot of work if it's even possible. I might hack on that see if I can even get it to work.

racke commented 9 years ago

Another interesting use-case for this would be Interchange6 extensions which don't make sense in the core Interchange6::Schema.