From 83780af41e3981d0da3b1c1bc3f071fea4538d55 Mon Sep 17 00:00:00 2001
From: Matthias Andreas Benkard <code@mail.matthias.benkard.de>
Date: Sat, 22 Sep 2012 15:28:19 +0000
Subject: Fix migrations.

---
 migrations/6_genericize_access_control.sql | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'migrations/6_genericize_access_control.sql')

diff --git a/migrations/6_genericize_access_control.sql b/migrations/6_genericize_access_control.sql
index b415d5b..c7727bf 100644
--- a/migrations/6_genericize_access_control.sql
+++ b/migrations/6_genericize_access_control.sql
@@ -1,3 +1,5 @@
+BEGIN;
+
 ALTER TABLE lazychat_targets RENAME TO post_targets;
 
 CREATE VIEW user_visible_posts AS
@@ -5,10 +7,13 @@ CREATE VIEW user_visible_posts AS
      FROM effective_user_roles eur, post_targets t
     WHERE t.target = eur.role
   UNION
-    SELECT m.owner, m.message
+    SELECT m.owner, m.id
     FROM posts m;
 
 CREATE OR REPLACE VIEW user_visible_lazychat_messages AS
   SELECT uvp.user, uvp.message
     FROM user_visible_posts uvp
     INNER JOIN lazychat_messages lm ON lm.id = uvp.message;
+
+COMMIT;
+
-- 
cgit v1.2.3

