Custom tables for a module/web part | Leo Dashevskiy | 2012-07-27 18:06 |
Status: Closed | ||
Hi Josh, thanks for your reply. So I actually first just had the sql script named <schema name>.sql, so I was assuming it was not being run, since it does not conform to the naming standards. Then, I renamed it to the above, and I think at the time the script was missing the "create schema" statement, so it just had the "create tables" part :) So the server must have run that script (though, I did not rebuild the server), but it did not produce any errors. Or may be it did not run it, since I did not rebuild it all. Anyways, after that I posted my question, then I tried following your suggestions. When connecting the actual db with DBVisualizer, I do not see a table named <my schema name> there. Though, in the schema browser I see such a schema as "Samples", but I do not see a table for it in the db, when exploring it with DBVisualizer. I updated the module version to 0.02 and created another script <schema name>-0.01-0.02: its header looks like this: DROP SCHEMA IF EXISTS QUALIFIER CASCADE; CREATE SCHEMA QUALIFIER; DROP TABLE IF EXISTS QUALIFIER.qaTaskList; CREATE TABLE QUALIFIER.qaTaskList ( qaId SERIAL NOT NULL, qaName TEXT NOT NULL, description TEXT NOT NULL, qaLevel TEXT NOT NULL, pop TEXT NOT NULL, formula TEXT NOT NULL, plotType TEXT NOT NULL, CONSTRAINT PK_qaTaskList PRIMARY KEY (qaId) ); I also rebuild the web part and rebuilt the server and it seemed to have run the "upgrade script", since it said at the log in page that only admins can log in, since there is an upgrade going on. When I logged in, it did display the message that web parts were being upgraded and it actually first threw a 500 error. I think my sql file was incorrect (I was referencing something before it was defined), I corrected that and then the upgrade script went through. Now my web part's version in the admin console is stated as 0.02. But when I try to generate the corresponding xml, I still get that same 50 bytes long bare and short file. And another question is: the XML file generator is indifferent to where the schema is sitting, right? Because the schema browser for the entire server is different from the schema browser for a specific project... I also tried to create the XML file with the corresponding columns and it shows up in the schema browser, but if and when I try to examine the individual tables by clicking on the tables links, I get an error message is red: "Error in query: Communication failure." So the XML file is "not seeing" the actual tables - I am not even sure if they get/got created properly or not. When connecting with DBVisualizer I still do not see a table there, named <my schema name> What am I doing wrong and how do I fix this? If you are in or around the Arnold building at the Hutch, feel free to stop by: B168 on the 2nd floor... Thanks. -Leo |
||