Conversation
d6e65f9 to
7d97288
Compare
extensions/gubbins/gubbins-db/src/gubbins/db/sql/jobs/schema.py
Outdated
Show resolved
Hide resolved
|
Closing this until we have a use case to consider. |
|
I do not agree with closing this one. It provides examples and a much needed documentation that I do not see anywhere else. |
7d97288 to
e8ac428
Compare
chrisburr
left a comment
There was a problem hiding this comment.
This PR is mixing pyproject.toml changes with DB changes and also needs to have the column modification example removed.
e8ac428 to
c750103
Compare
c750103 to
c9809fe
Compare
c9809fe to
5c8c5aa
Compare
5c8c5aa to
0387ff6
Compare
|
Just wondering, do we even give the possibility of extending DBs by adding columns? |
It is easy enough, I do not see why not, and at least an example exists. |
What happpens when we want to add a column to a table which then conflicts with what someone did in their extension? If we do automatic schema evolutions is it safe or do we risk accidentally dropping a column? |
|
It is generally safer for extensions to use "has-a" relationships (new table with Foreign Key) rather than "is-a" relationships (inheriting/modifying an existing table). The systems I've looked at that provide extension mechanisms similar to ours all rely on "has-a", which we already support. See for example https://docs.djangoproject.com/en/5.2/ref/contrib/contenttypes/#generic-relations |
Good points, they can be added to the documentation of existing risks. |
|
Of course, people can also monkeypatch diracx and do anything they want. We had said that gubbins contains examples of everything that supports being extended and if you do anything that isn't included in there you should open an issue. Until someone comes up with a valid used case, I don't think we should document things that might come to bite us. |
No description provided.