SQL script not being executed for file based module | Will Holtz | 2014-06-25 09:45 | |||||||||||||||||||||||||||||||||||||||||||||||
Status: Closed | |||||||||||||||||||||||||||||||||||||||||||||||||
I have a fairly minimal file based module that consists of three files: will@lims:/usr/local/labkey-dev/externalModules/Fermentation$ cat module.properties Name: Fermentation ModuleClass: org.labkey.api.module.SimpleModule RequiredServerVersion: 14.10 Version: 1.00 SupportedDatabases: pgsql will@lims:/usr/local/labkey-dev/externalModules/Fermentation$ cat resources/schemas/fermentation.xml <?xml version="1.0" encoding="UTF-8"?> <ns:tables xmlns:ns="http://labkey.org/data/xml"> <ns:table tableName="Antifoam" tableDbType="TABLE"> <ns:description>Antifoams used in fermentations.</ns:description> <ns:pkColumnName>Key</ns:pkColumnName> <ns:titleColumn>Name</ns:titleColumn> <ns:columns> <ns:column columnName="Key"> <ns:columnTitle>Antifoam Id</ns:columnTitle> <ns:datatype>int</ns:datatype> <ns:isAutoInc>true</ns:isAutoInc> <ns:scale>10</ns:scale> <ns:nullable>false</ns:nullable> <ns:isReadOnly>true</ns:isReadOnly> <ns:isKeyField>true</ns:isKeyField> <ns:isHidden>true</ns:isHidden> </ns:column> <ns:column columnName="Name"> <ns:datatype>varchar</ns:datatype> <ns:scale>100</ns:scale> </ns:column> </ns:columns> </ns:table> </ns:tables> will@lims:/usr/local/labkey-dev/externalModules/Fermentation$ cat resources/schemas/dbscripts/postgresql/fermentation-0.00-1.00.sql CREATE SCHEMA fermentation; CREATE TABLE fermentation.Antifoam ( Key SERIAL, "Name" VARCHAR(100) NOT NULL, CONSTRAINT PK_Antifoam primary key (Key) ); will@lims:/usr/local/labkey-dev/externalModules/Fermentation$ When the module is enabled for a folder, I am able to see the fermentation schema in the schema browser, but the table does not exist. And in the Admin Console, I see it listed with the modules (although it shows up as version 0.00). However, when I go to the Admin Console->Module Details page, it does not show up there. If I go to Admin Console->SQL Scripts, fermentation-0.00-1.00.sql is listed under 'Scripts that have not run on this server - All'. Any ideas where I'm messing this up? thanks, -Will |
|||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||