Look at the following up script:
CREATE TABLE messages (
id SERIAL PRIMARY KEY,
timestamp TIMESTAMP NOT NULL,
channel_id INTEGER NOT NULL REFERENCES channels,
user_id INTEGER NOT NULL REFERENCES users,
text TEXT NOT NULL
);
It creates a table that contains a message that is associated with a channel and a user by ID. Also, it contains a timestamp showing when the messages were added, as well as the text of each message.