Open diogotcorreia opened 4 years ago
Hi @diogotcorreia can you add a link to the preview of the RFC in the description plz :)
Done :)
Thank you for this RFC @diogotcorreia. I will review it in details. Just to give you more info, we are planning on refactor the DB layer a lot before the end of year and we will certainly support some sort of schema lifecycles to do any customization. If we were to implement something now be aware we will probably break it for Strapi v4 :)
Thanks for this RFC.
Here are somme comments:
I think we should put the schema specific lifecycles outside of the lifecycles
key like in idea 2
Here are some lifecycles I think we could have:
I think we should be passing some ctx to those lifecycles:
some way to update the process of database table creation (future versions)
@alexandrebodin can you expand on this suggestion?
@alexandrebodin Updated RFC in response to your comments
Thanks for the improvements !
I think the lifecycles arguments should be passed as an object so we can make it evolve without breaking changes and have potentially different infos per connectors.
Other stuff I would like to see (to answer @derrickmehaffy)
There are a lot of possible events. I need to review our process but here is what comes to my mind:
Once we define the exact events we can define the APIs for each of them
Addresses issue https://github.com/strapi/strapi/issues/5972
As requested, here goes my RFC about the schema load lifecycle.
Preview Link: https://github.com/diogotcorreia/rfcs/blob/0005-schema-load-lifecycles/rfcs/0005-schema-load-lifecycles.md