1. wysyłam wiadomość, ja mam ją w wiadomościach wysłanych, a adresat w odebranych. Ja jako autor wiadomości kasuje wiadomość, a adresat nadal ma tą wiadomość w skrzynce. - Jak to uczynić


2. jak zrobić limit wiadomości w skrzynce ?
CREATE TABLE "messages" { "idMessage" serial NOT NULL, "idUser" int REFERENCES "userTable"("idUser"), // odbiorca "subject" varchar(255) NOT NULL, "content" text, "readed" BOOLEAN DEFAULT false, "inTrash" BOOLEAN DEFAULT false, "dateRead" int } CREATE TABLE "messages_send" { "idMessage" int REFERENCES "messages"("idMessage"), "idUser" int REFERENCES "userTable"("idUser"), // nadawca "dateSend" int, PRIMARY KEY( "idMessage", "idUser") }