Saylua-Archive / SayluaLegacy

Browser Game In Development
saylua.com
GNU Affero General Public License v3.0
2 stars 0 forks source link

Migrate db #104

Closed LikeMyBread closed 7 years ago

LikeMyBread commented 7 years ago

This finishes up the migration of messages over to SQLAlchemy from the datastore. Naturally it will be incompatible with existing messages and will require provisioning the database and all that jazz. The one thing it's still missing is the ability to have more than two people in a conversation, although the database end supports it and it's just missing the interface to add people.

Here's the basic breakdown for how it works. Conversations exist solely to provide unique indexes by which to reference a conversation, hence why they're so simple and only really used for joins. Messages are associated with a given conversation and are pretty simple as well knowing only what conversation they belong to, what they say, who wrote them and when they were written. The other main component and the trickiest to get your head around is something I'm calling ConversationUsers. These represent a single user's relationship with a conversation, their existence grants access to the messages in the conversation. They also store whether the user has deleted the conversation and if it is unread or not since these are both meaningful on a user by user basis.

I'd really appreciate a style critique as well as this has involved a lot of going off on my own and making some rather arbitrary decisions about how to do things.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 0.0% when pulling 13d785e609da16bcf71f59a178ea678ddfcf6f96 on migrate_db into 4e12550b4500fff340b4d42108bab711e2913d25 on master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 0.0% when pulling f6bf68ae4303aa85bf3c6f327c38c5eaf08003f0 on migrate_db into 4e12550b4500fff340b4d42108bab711e2913d25 on master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 0.0% when pulling 990505b273f668647105b02e28a27d6d727617fe on migrate_db into 3cd5ce6790a1482636dec09987d46396f1d5120c on master.