Changes between Version 24 and Version 25 of Software/Productionalisation/RealDb

03/21/14 11:23:52 (5 years ago)



  • Software/Productionalisation/RealDb

    v24 v25  
    19191. Install and configure a production ready database (either on the same server or a different server). 
    20 2. Configure the Raptor MUA to use the database. 
     201. Configure the Raptor MUA to use the database. 
     211. Setting up the database schema 
    2224== 1. Installing and Configuring a database == 
    2527 * For example, postgres on linux using YUM - {{{yum install postgres}}}, or using the Windows installer. For Postgres guides see 
    26281. Set up the Raptor schema in the database. 
    27  * Create a database named 'mua'. e.g. in Postgres, '{{{create database mua}}}' 
    28  * Use the database schema to create the neccessary tables etc. For Postgres this is defined [Software/Productionalisation/MuaSchema here], which you can [[|download]]. 
     29 * Create a blank database named 'mua'. e.g. in Postgres, '{{{create database mua}}}' 
    29301. Set up users. 
    3031 * Add a user "raptor" with a password of your choosing with admins rights (Alternatively you could choose to use the default Postgres user for ease of setup).  
    70711. In the bean relevant for your database, change the connection parameters to match those of your database (i.e. jdbcUrl, user, and password). 
     73== 3.  Setting up the database schema == 
     75The most reliable way to set up the database schema is to get hibernate to do it for you. To do this, perform the following steps: 
     771. Edit the file {{{mua/conf/database.xml}}}. 
     781. Find the bean with id of "muaSessionFactor" (should be one of the very first in the file) 
     791. In this, find the property with name "hibernate properties". 
     801. In this, find the prop with the key of "". 
     811. Change the value from "update" to "create". 
     821. Restart the MUA. Hibernate will now create the schema relevant to the dialect you choose in section 2 of this guide. 
     831. **IMPORTANT**: Once the MUA has started, change the value from "create" back to "update" - if you do not do this, next time the MUA is started hibernate will wipe out your database and recreate it from scratch, losing all data in the process!