-
Notifications
You must be signed in to change notification settings - Fork 4
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
Check if the scripts table still suits our needs #190
Comments
current db structure:
|
Questions: What are the data_file fields for? What is What is the difference between This table does not have the concept of a command to execute. That seems to be the only thing missing from the spec (not inc. all the extra stuff that is there). |
yes, I think I'll leave Todo:
|
I was thinking about this earlier today. The hierarchal relationship in this table was originally designed so that the scripts could be immutable. It wasn't clear if this property was still useful - but now I think it is. Particularly so we can always see what script was executed - from a historical perspective - because that information is not saved in the jobs table at the moment. See #191 However, I think the hierarchical relationship is too complex - we've seen in the past that hierarchial relationships are hard to deal with in SQL. So instead of hierarchical:
We instead 'group' the versions together:
And another script (independently created):
Much simpler structure (where the hierarchical structure is cyclic, the grouped structure is flat) means it's much easier to query for the latest version of a script. I'd also suggest making the |
Wouldn't this be better done with two tables?
An additional
|
Perhaps... It was one table already so my solution kept it that way. Architecturally I'd prefer one table, it seems simpler conceptually, and the sql seems simple. If it were split into two tables, we certainly wouldn't need two API endpoints. I'm not up to date on my normal form, but from the gut I think either form is acceptable. |
The scripts table represents a high level command and control of the custom job scripts that can be executed.
It should:
The text was updated successfully, but these errors were encountered: