rrbrambley / MessageBeast-ObjC

A library for building Message-based apps on App.net
MIT License
6 stars 0 forks source link

Message and Action Message Spec primary key should be changed #6

Closed rrbrambley closed 10 years ago

rrbrambley commented 10 years ago

Currently we rely on the Message Id for both of these tables. This is incorrect because:

• Offline message ids are created by examining the greatest message id in its target channel • If an offline message is created in a channel, it is possible that the message id that is used already exists for a message in a different channel

The solution is most likely to change the primary key to be a messageId+channelId combo, but I will have to look into the performance implications for this.

rrbrambley commented 10 years ago

Meh, should just use a separate id integer primary key autoincrement and call it a day.

rrbrambley commented 10 years ago

Using separate integer id in messages and locations tables as of 5931671. No need to change the action messages spec id - we will just never use a legit message id for unsent messages. That change is still on the way.