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

le tan vu 50603065 at stu.hcmut.edu.vn
Fri Jan 14 06:45:47 PST 2011


Hi Paul,

As your directions, I've found a script which has extension .sql and some
files which have extension .hbm.xml. And I think those are all I was looking
for.
Since I'm not going to use hibernate, so I will modify the script
(sakai_assignment.sql) to add queries to create tables I want.

Your advice is also very useful because it helps me to save a lot of time.

Thanks for all,

Best regards,

P/S: For those who are looking ddl script in assignments tool as well,

*sakai_assignment.sql* at "*
$sakai-src-2.7.0/assignment/assignment-impl/impl/src/sql/name_of_kind_of_database_you_use
*"

**.hbm.xml* at "*
$sakai-src-2.7.0/assignment/assignment-api/api/src/java/org/sakaiproject/assignment/api/model
*"

--
Vu Tan Le
On Thu, Jan 13, 2011 at 9:35 PM, Paul Dagnall <dagnalpb at notes.udayton.edu>wrote:

> 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/20110114/5e577d8a/attachment.html 


More information about the sakai-dev mailing list