-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Splits the `Model` type into two parts: - `Model`, which now just contains metadata that should not change between versions (`name`, `user`, `permissions`) - `ModelVersion`, which contains other version-specific metadata as well as the actual model contents Splitting the type like this helps prevent certain undesirable scenarios. For example, all model versions previously had their own `permissions`. This meant that it would be possible for a user to have access to (or even own) one version of a model, but not others. That's not what we want. Also, previously the different versions of a model were only linked together by their `name` field. This wasn't really structured into the database in any way. Now it is possible to get all versions of a model directly by a foreign key lookup. I've integrated these changes on branches for the other Inferno ML projects but this will need to be merged first. The DB tables now look like this: ```plantuml ,------------------------. | Model | |------------------------| | id : serial | | -- | | * name : text | | * permissions : jsonb | | user : User (id) | | | `------------------------' \|/ o | | _ - ,------------------------. | ModelVersion | |------------------------| | id : serial | | -- | | * model : Model (id) | | * card : jsonb | | * contents : oid | | * version : text | | | `------------------------' ```
- Loading branch information
Showing
3 changed files
with
118 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
# Revision History for inferno-ml-server-types | ||
*Note*: we use https://pvp.haskell.org/ (MAJOR.MAJOR.MINOR.PATCH) | ||
|
||
## 0.1.0 | ||
* Split `Model` and `ModelVersion` | ||
|
||
## 0.0.1 | ||
* Initial pre-release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters