-
Notifications
You must be signed in to change notification settings - Fork 12
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
design-docs: introduce rolling stock collections #197
base: master
Are you sure you want to change the base?
Conversation
content/docs/reference/design-docs/rolling-stock-collections.en.md
Outdated
Show resolved
Hide resolved
content/docs/reference/design-docs/rolling-stock-collections.en.md
Outdated
Show resolved
Hide resolved
e3a1bef
to
67f3088
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as is, maybe a few endpoints could be useful as implementation guidelines.
We could introduce the possibility of locking a collection upfront as this feature is likely to be requested down the line I believe.
There will be no need for locking once permissions are implemented: an infra is locked if nobody has writer or greater rights |
Ofc, you're right. |
67f3088
to
d572d62
Compare
I've added a sample migration sql. I trust the implementer with coming up with the crud for this. |
|
||
## Context and requirements | ||
|
||
As of the writting of this proposal, rolling stocks: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As of the writting of this proposal, rolling stocks: | |
As of the writing of this proposal, rolling stocks: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@multun , please review my suggestion
@SergeCroise The suggestion is good but I can't apply it without closing this PR: I don't have push access to the repository anymore. I see two possible options:
|
## Proposal | ||
|
||
A concept of rolling stock collection would be introduced: | ||
- each rolling stock must belong to exactly one collection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this constraint, that means that we will need to duplicate a rolling stock for each collection we want it to be in.
- when creating a scenario, rolling stock collections need to be added | ||
|
||
Rolling stock collections have: | ||
- a name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And probably an identifier? (but based on the SQL
below, I guess the answer to my answer is yes)
```sql | ||
create table rolling_stock_collection( | ||
id bigserial generated always as identity primary key, | ||
name text not null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description text not null,
create index on rolling_stock_collection(created_by); | ||
create index on rolling_stock(collection); | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we also would like to add a rolling_stock_collection_id
to the timetable
table, isn't it?
No description provided.