Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How entities should handle data model customizations? #151

Open
11 of 12 tasks
ponceta opened this issue Mar 8, 2017 · 10 comments
Open
11 of 12 tasks

How entities should handle data model customizations? #151

ponceta opened this issue Mar 8, 2017 · 10 comments

Comments

@ponceta
Copy link
Member

ponceta commented Mar 8, 2017

  • Keep model evolutions scripts to be able anytime to regen the custom data-model
    (actually these ones are missing for Pully's demo data but I could provide part of these scripts)
  • Document these scripts, how, what elements to consider?
  • Where and how to store these?
    (considering model upgrade validation, this should be taken into account since data model initialization should be able to take these into account. How means what naming should be set to be qwat compliant?)
  • What naming conventions should be used for data model customizations? tables prefixes or schemas?
  • Enhancing value lists should consider a number rule to avoid conflicts with qwat base datamodel (Should custom values in the qwat_vl schema tables start from id 10000 on? #122)

These aspects should be all explained in the data manager documentation.

  • Add value
  • Add field
  • Add table
  • Add trigger
  • Add type
  • Add rule
  • Add view
@haubourg
Copy link
Contributor

haubourg commented Mar 8, 2017

Another requirement discussed with @sylvainbeo : local customization scripts should also be injected in the conformity version testing scripts. Beyond naming convention, we should reserve versionning namespaces or numbers.

@haubourg
Copy link
Contributor

So we took advantage of PUM to test the customization logic, as discussed at the PSC last week

From what we see, a very simple option would be:

  • allow only one unversionned local cutomization file
  • play all the core update as today using PUM
  • at the end, drop all the views, apply the unique local SQL file, recreate views. This can be done outside of the PUM, but it could probably be leaner if PUM could do that.

Another point found is that most frequent customization are value list insert / delete or update for labels / translations.
Running a QWAT specific step to display those value list changes would be nice too.

@3nids @m-kuhn . Any opinion?

@m-kuhn
Copy link
Collaborator

m-kuhn commented Nov 30, 2017

Let's consider some examples:

  • An added field
  • An added table
  • An added view
  • An added trigger

I guess most of the customizations are additions like this.
What would the local customization logic look like in this case?
I guess most of them would need nothing at all, (added tables, and fields will just be kept unless incompatible upstream changes land), for the views, it will probably also require a second script to kill the views before starting the pumpdate, for triggers as well.
For additional values I'd also say, they will be just kept without requiring migration logic (99% of the time at least). For removing values, I'd discourage people and add a disabled flag to value lists if this is required.

@ponceta
Copy link
Member Author

ponceta commented Feb 12, 2018

@m-kuhn Miss an added schema, an added group_role, an added rule, an added type. With that we should be exhaustive?

Edit: set group_role instead of role after @haubourg's comment.

@ponceta
Copy link
Member Author

ponceta commented Feb 12, 2018

With these rules and guidelines, any organization should be able to be "PUM compliant"!

@haubourg
Copy link
Contributor

@ponceta about ROLES, I think we should only check "group" roles, ie those with NO LOGIN option. The connection roles will be too much variant (imagine you connect a LDAP to PG, they change virtually at any moment).

@ponceta
Copy link
Member Author

ponceta commented Dec 6, 2018

Documentation is here:

https://qwat.github.io/docs/master/en/html/developer-guide/local_customizations.html

I keep this open until 1.3.3 Release and deployement in Pully.

@lbartoletti
Copy link
Collaborator

@ponceta should we leave this issue opened?

@ponceta
Copy link
Member Author

ponceta commented Jul 15, 2019

@lbartoletti I miss Custom values in the value lists customization the #122

We agreed with @tudorbarascu and @3nids on this in 2016.

@kandre thoughts?

Can I add it in the documentation too?

@ponceta
Copy link
Member Author

ponceta commented Jul 15, 2019

And Pully is up to date on QWAT 1.3.3 (freshly updated to postgres 9.6)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants