How are scrip assignments stored in the database?

Hi,

I am trying to cleanup an old RT 3.8.x instance during our upgrade to RT 4.4.x. In particular, now that we can do per-queue assignment for scrips, I can reduce the number of scrips in use dramatically. I started from a clean install and fixed all the scrips. When I refreshed the DB with a new dump, the scrips show up, but whether they are global or applied to individual queues is missing and they all show as ‘Not applied scrips’ and the queue specific templates do not show up either. Where is that information found, so that the system will mark them appropriately? The tables I replaced were:

objectscrips
scripactions
scripconditions
scrips
templates

What am I missing?

Regards,
Ken

Hi,

To follow-up on my own problem, all of the information is contained in the listed tables. When I copied them in to the updated database, I neglected to recreate their primary key indexes which caused a query error resulting in empty global scrips sections. For the search engine, the DB error in PostgreSQL is:

ERROR: column “main.description” must appear in the GROUP BY clause or be used in an aggregate function at character 8

and the busted query:

STATEMENT: SELECT main.* FROM Scrips main JOIN ObjectScrips ObjectScrips_1 ON ( ObjectScrips_1.ObjectId IN (‘0’, ‘0’) ) AND ( ObjectScrips_1.Scrip = main.id ) WHERE (ObjectScrips_1.Stage = ‘TransactionCreate’) AND (ObjectScrips_1.id IS NOT NULL) GROUP BY main.id ORDER BY MIN(ObjectScrips_1.SortOrder) ASC

Regards,
Ken