Conversation
|
What do you think about adding a schema migration system? Perhaps just initialize the schema version table and write in a value of version 1 for now? |
I suppose I can add a table for schema versioning. But it is simple enough to add it. So, why not? |
|
Database schema added. For now it throws an error and crashes the entire mod, which is good enough for now. In the future we might want to let it fail gracefully and put a red message in the chat warning about this. But that is not within the scope of this PR. |
|
Alright, history playback is working. Sort of, just hacked it in there when a client freshly connects and the server is connected. But the concept works absolutely fine. Still need to implement it properly based on a client request. Also need to add the method to fetch messages older than a certain timestamp for use of scrolling up. |
|
Alright, moved some stuff around and am no longer using the init event (though it is still in the code) to trigger cleaning of messages. Now I just need to implement a scroll back mechanism. Websockets don't do request reply traffic without keeping track of correlation IDs I am not too keen about. I am thinking of doing something simpler.
TODO:
|
There was a problem hiding this comment.
Sorry @danthedaniel at some point I had gotten it in such a state that I lost overview. So I started structuring things which ended up being somewhat of a refactoring of the entire thing.
The good news is that it now is much better structured (I think)
|
@danthedaniel, I think it is done. It ended up being a lot more work than I initially bargained for as I wanted to do things right. I am going to do a bunch more testing, but feel confident enough that I marked the PR as ready. Edit: If you don't feel like doing a proper review I am okay with that. Just wanted to give you the chance to have a look at it before it is merged. |
danthedaniel
left a comment
There was a problem hiding this comment.
Don't have time to do a detailed review. But it seems good from my cursory look.
This turns out to be a slightly bigger job than I expected because I wanted to make sure the pre-conditions are right.