From 0be11d33c21979a20f52eba1a09052d71d14ace5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Fri, 26 Feb 2016 16:47:46 +0100 Subject: [PATCH] Feature #4217: Add new default acl rule to onedb migrator --- src/onedb/shared/4.11.80_to_4.90.0.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/onedb/shared/4.11.80_to_4.90.0.rb b/src/onedb/shared/4.11.80_to_4.90.0.rb index a63d2b44ac..01e89eb5a5 100644 --- a/src/onedb/shared/4.11.80_to_4.90.0.rb +++ b/src/onedb/shared/4.11.80_to_4.90.0.rb @@ -160,6 +160,17 @@ module Migrator @db.run "CREATE TABLE marketplaceapp_pool (oid INTEGER PRIMARY KEY, name VARCHAR(128), body MEDIUMTEXT, uid INTEGER, gid INTEGER, owner_u INTEGER, group_u INTEGER, other_u INTEGER, UNIQUE(name,uid));" + last_oid = -1 + + @db.fetch("SELECT last_oid FROM pool_control WHERE tablename='acl'") do |row| + last_oid = row[:last_oid].to_i + end + + # * MARKETPLACE+MARKETPLACEAPP/* USE * + @db.run "INSERT INTO acl VALUES(#{last_oid+1},17179869184,6755416620924928,1,17179869184);" + + @db.run "REPLACE INTO pool_control VALUES('acl', #{last_oid+1});" + log_time() return true