mistercrunch commented on issue #13351:
URL: https://github.com/apache/superset/issues/13351#issuecomment-788614670


   I was just talking to an engineer today (Arash @ Preset) about the idea of 
using `ExtraJSONMixin` or similar pattern to accumulate / delay database 
migrations. In his case he wanted to add a few new fields to the highly 
contentious `Query` model and I pointed out to it.
   
https://github.com/apache/superset/blob/master/superset/models/helpers.py#L456-L477
   
   It seems like `ExtraJSONMixin` could be further improved to be more seamless 
if we wanted to, but I'm not sure how people feel about it.
   
   A few other ideas around this SIP:
   * I would recommend using an accumulation pattern around cleanup that are 
not immediately needed, meaning if for instance we want to remove columns in 
the database, we could put this in some sort of `migrations/next.py` where we 
accumulate those cleanup migration scripts and defer until the next big number 
release (say 2.0.0) where downtime may be expected
   * It'd be so nice to have blue/green forward compatible stamps on 
migrations, meaning previous version of the app is guaranteed to work with 
future version of the database. In many cases if the migration is not 
blue-green compatible it should be clearly identified as it requires downtime. 
I'd recommend really pushing PRs to meet this req and pushing to using the 
accumulation pattern when that's not the case.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to