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