Custom tables for a module/web part

LabKey Support Forum (Inactive)
Custom tables for a module/web part jeckels  2012-07-27 15:23
Status: Closed
 
Hi Leo,

It sounds like the server likely ran your script when it only contained "CREATE SCHEMA QUALIFIER". Once the server has run your script, it won't rerun it, even if you make edits. You can verify this by checking the schema directly in a tool like PGAdmin to see if it has any tables.

If it doesn't, I'd recommend:

1. Move the CREATE TABLE statement into a new script file, with that's called <schema name>-0.01-0.02.
2. Bump your module version to 0.02. Depending on how your module is set up, this number will either be in the Module class or its module.properties file.
3. Build and restart your Tomcat instance.

The server should say that it needs to upgrade the module, and then run your script. If you revisit the link, you should get XML that includes info about your table.

Be sure to review this page, which gives details on how the server decides what scripts need to be run as part of an upgrade:

https://www.labkey.org/wiki/home/Documentation/page.view?name=schemaUpdates

Thanks,
Josh