diff options
Diffstat (limited to 'migrations')
-rw-r--r-- | migrations/3_fix_lazychat_message_visibility.sql | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/migrations/3_fix_lazychat_message_visibility.sql b/migrations/3_fix_lazychat_message_visibility.sql new file mode 100644 index 0000000..4af6b30 --- /dev/null +++ b/migrations/3_fix_lazychat_message_visibility.sql @@ -0,0 +1,7 @@ +CREATE OR REPLACE VIEW user_visible_lazychat_messages AS + SELECT eur.user, t.message + FROM effective_user_roles eur, lazychat_targets t + WHERE t.target = eur.role + UNION + SELECT m.author, m.message + FROM lazychat_messages m; |