ConversationService additions, fixed migration script

This commit is contained in:
2017-03-30 16:30:46 +02:00
parent d9090eb70c
commit 3ab3d7a0ca
2 changed files with 33 additions and 3 deletions

View File

@ -1,10 +1,10 @@
ALTER TABLE Message ADD COLUMN conversation UUID NOT NULL DEFAULT RANDOM_UUID();
ALTER TABLE Message ADD COLUMN conversation UUID;
CREATE TABLE Message_Parent (
parent BINARY(64) NOT NULL,
child BINARY(64) NOT NULL,
pos INT NOT NULL,
conversation UUID,
conversation UUID NOT NULL,
PRIMARY KEY (parent, child),
FOREIGN KEY (child) REFERENCES Message (iv)