Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Add history #19

Merged
merged 5 commits into from
Dec 19, 2018
Merged

Add history #19

merged 5 commits into from
Dec 19, 2018

Conversation

mschader
Copy link
Contributor

This PR is in preparation and to track status of the implementation of a history model as stated in #13

@fleaz
Copy link
Member

fleaz commented Oct 23, 2018

Quick thought after looking at the model: Don't you also need the corresponding group as a foreign key? Otherwise you have a event with "new user joined, userid: 4" but don't know which group this belongs to :D

@mschader
Copy link
Contributor Author

The event_id is bound to the payment or transaction id, so you can get all of these for a group and then query the ids from the history entries.

Another aspect is the deletion of entries should not delete them completly from the database because then it would be hard to get them for the history after deletion. Will look into that.

@fleaz fleaz changed the title [WIP] Add history Add history Dec 19, 2018
@fleaz
Copy link
Member

fleaz commented Dec 19, 2018

This fixes #13

@fleaz fleaz merged commit beea0ca into development Dec 19, 2018
@fleaz fleaz deleted the history branch December 19, 2018 21:05
group_id = Column(Integer, ForeignKey('group.id'), nullable=False)
event_type = Column(String(60), nullable=False)
user_id = Column(Integer, ForeignKey('user.id'))
expense_id = Column(Integer, ForeignKey('user.id'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Foreign-key copy-pasta issue?

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

Successfully merging this pull request may close these issues.

3 participants