[Building Sakai] How to deploy the new table in database when Tomcat start

Paul Dagnall dagnalpb at notes.udayton.edu
Thu Jan 13 06:35:44 PST 2011


Hi
Rather than modifying the script in the tomcat directory, you may consider
modifying the DDL script in the source directory for the assignments tool.
If you're not sure where these files are, just do a search on files
containing the name of one of the other assignment tables, and you'll see
how it's structured. This will also show you how the tables are set up in
the *.hbm.xml files. Modifying and redeploying from the source will allow
you to track your changes and avoid accidentally overwriting when you
re-deploy. Be sure auto.ddl is set to true in sakai.properties. There are
different scripts for the different databases Oracle, MySQL, etc. Be sure to
update the ones you intend to use.

When I do things like this I manually modify the database from an sql prompt
and once I'm certain it's the way I want it. Then when I'm done, I'll update
the ddl files. Using auto.ddl while developing could get a bit troublesome
if you end up wanting to remove and rename a column or something like that.

Good luck.

Paul Dagnall
Web Developer
University of Dayton


On Wed, Jan 12, 2011 at 10:35 PM, le tan vu <50603065 at stu.hcmut.edu.vn>wrote:

> Hi guys,
>
> I'm working on modifying Assignments tool in Sakai and I'd like to know how
> to create my own table in Sakai database.
>
> Currently, I'm working on HSQLDB for testing. and I've found a script file
> in folder "$CATALINA_HOME/sakai/db".
>
> May I put my sql script there and tomcat will create my table automatically
> every time it starts up?
>
> Could you please tell me how to do the same thing in MySQL as well?
>
> Any reply would be appreciated.
>
> Many thanks and kind regards,
>
> --
> Vu Tan Le
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20110113/26a24c0a/attachment.html 


More information about the sakai-dev mailing list