From 79fb3aa8afab40255fc514541a1308270108c733 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 16 Sep 2021 17:43:43 +0200 Subject: [PATCH] Add migration to add a `nonce` column to `channel_messages` Co-Authored-By: Nathan Sobo --- .../20210916123647_add_nonce_to_channel_messages.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 server/migrations/20210916123647_add_nonce_to_channel_messages.sql diff --git a/server/migrations/20210916123647_add_nonce_to_channel_messages.sql b/server/migrations/20210916123647_add_nonce_to_channel_messages.sql new file mode 100644 index 0000000000..ee4d4aa319 --- /dev/null +++ b/server/migrations/20210916123647_add_nonce_to_channel_messages.sql @@ -0,0 +1,4 @@ +ALTER TABLE "channel_messages" +ADD "nonce" UUID NOT NULL DEFAULT gen_random_uuid(); + +CREATE UNIQUE INDEX "index_channel_messages_nonce" ON "channel_messages" ("nonce");