20 scripconditions_id_seq
30 cachedgroupmembers_id_seq
40 objectcustomfieldvalues_id_s
41 ObjectCustomFieldValues
44 objectcustomfields_id_s
46 customfieldvalues_id_seq
61 my $db_user = RT->Config->Get('DatabaseUser');
62 my $db_pass = RT->Config->Get('DatabasePassword');
64 # if there's already an rt_user, use it.
65 my @row = $dbh->selectrow_array( "SELECT usename FROM pg_user WHERE usename = '$db_user'" );
67 push @acls, "CREATE USER \"$db_user\" WITH PASSWORD '$db_pass' NOCREATEDB NOCREATEUSER;";
71 = ( $dbh->{pg_server_version} >= 80200 )
72 ? "USAGE, SELECT, UPDATE"
74 foreach my $table (@tables) {
75 if ( $table =~ /^[a-z]/ && $table ne 'sessions' ) {
76 # table like objectcustomfields_id_s
77 push @acls, "GRANT $sequence_right ON $table TO \"$db_user\";"
80 push @acls, "GRANT SELECT, INSERT, UPDATE, DELETE ON $table TO \"$db_user\";"