]> git.donarmstrong.com Git - wannabuild.git/blobdiff - schema/old-migrations/lock_table.sql
Use public.locks as locking area.
[wannabuild.git] / schema / old-migrations / lock_table.sql
diff --git a/schema/old-migrations/lock_table.sql b/schema/old-migrations/lock_table.sql
new file mode 100644 (file)
index 0000000..318e722
--- /dev/null
@@ -0,0 +1,10 @@
+BEGIN;
+
+CREATE TABLE public.locks AS
+       SELECT DISTINCT distribution, architecture FROM packages;
+ALTER TABLE public.locks OWNER TO wbadm;
+REVOKE ALL ON public.locks FROM PUBLIC;
+GRANT SELECT ON public.locks TO PUBLIC;
+GRANT UPDATE ON public.locks TO wb_all;
+
+COMMIT;