-
Notifications
You must be signed in to change notification settings - Fork 274
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
Add Project History Page #553
Add Project History Page #553
Conversation
…into project-history � Conflicts: � ihatemoney/static/css/main.css
6b56454
to
576da30
Compare
576da30
to
f16495a
Compare
Incredible work. Thank you! I've hitted some bugs. Let's start with the first use case:
Here is the result: Second use case:
Here is the result: I also have a remark about momentjs, but I'll do it after @eMerzh review. |
It looks like the ID reuse is really a quirk of SQLite. SQLAlchemy-Continuum is assuming that there is not ID reuse. We can direct SQLite to follow the expected behavior of issuing unique IDs for every row by using the |
Co-Authored-By: Glandos <bugs-github@antipoul.fr>
The other bug is potentially a bug in SQLAlchemy-continuum, which would suck. I've reduced it down to a 70 line gist which illustrates it. I can't see any reason why the setup I've created there would cause the behavior it's causing. It's also got some really weird instability, for example if you change one of the bills to |
I believe I sorted this out in migration |
I wanted to try to keep the UI pretty minimal, but if it's something you guys want it's pretty easy to throw something in there. |
Done in 80bc2ac |
I believe the only outstanding issue would be the "test project" concern raised by @indatwood :
I'm not clear on what the "test project" is, can someone help me understand? |
I believe he meant the « demo » project? btw, awesome feature you're implementing, and huge amount of work, thanks! |
As far as I can tell, the demo project has History Enabled by default just like any other project. Maybe this got fixed when I re-did the check-boxes, but it seems good to me now. @Glandos Anything else you need from me to get this merged? |
No, it's merged now, and I've subscribed to the bug report you opened in continuum to remove the workaround when needed. Thanks for your awesome work to make this project better! |
Starting from this change, when I use alembic to create a new automatic migration (to test something for #557 ), it picks up something strange even if I don't touch the models:
I have checked that if I do the same thing before this change, no migration is created:
Here is the content of the strange migration:
|
Maybe because of e7848e3? |
Right, that seems related. Now I remember that Alembic was giving me a warning about not taking into account ALTER while applying the migration:
@Andrew-Dickinson any idea? I'm using Arch with python 3.8 and sqlite 3.31.1-1 |
It looks like #577 is also related to this migration. |
So the migration in question is one that I had to write manually. Albemic wasn't picking up on the fact that I had added sqlite_autoincrement=True to each table per: |
According to: This is a table that SQLite uses to store the highest known primary key for each table. It is automatically added by SQLite when a table with autoincrement set is created. Notably, it can't be deleted:
This makes it strange that Albemic would ever add any migrations with respect to it. This table should always be handled by SQLite itself. |
@Andrew-Dickinson The patch you provided in SQLAlchemy-Continuum has been merged, and released in 1.3.10. Do you have the time to check if history work without the workaround, so that we can remove it from our codebase? |
Co-Authored-By: Glandos <bugs-github@antipoul.fr> All project activity can be tracked, using SQLAlchemy-continuum. IP addresses can optionally be recorded.
Adds a history page (Resolves #426 ), showing all changes to the database.
Implemented using SQLAlchemy-continuum. Per #426, users can opt-out using a new interface on the Settings page and must opt-in to have their IP addresses recorded.
Users visiting the history page after reducing their privacy settings are prompted to delete the previously recorded data:
This PR also includes a reasonably comprehensive set of tests to assure the privacy protections work as intended and that log entries are created for manual & api operations.