_________________________________________________ Production guide for ProductRegistry (2009-01-15) _________________________________________________ Please perform the following steps... ---------------- 1. Shut the PR application down ---------------- 2. Do a back up of the database ---------------- 3. You will need to change the structure of pr_system_actor_profiles table, replacing tables actor_integration_profile and integration_profile_option by actor_integration_profile_option. To do that, please read the coming steps : 3.1 Execute the following command, to create a new table with the new structure : SELECT distinct prsap.id, prsap.last_changed, prsap.last_modifier_id, prsap.system_id, tfaipo.id as actor_integration_profile_option_id into pr_system_actor_profiles_new from tf_actor_integration_profile_option tfaipo, pr_system_actor_profiles prsap where prsap.actor_integration_profile_id = tfaipo.actor_integration_profile_id and prsap.integration_profile_option_id = tfaipo.integration_profile_option_id ; 3.2 Then create the importation script for production (Sql command below on mac) pg_dump product-registry -a --column-inserts -t pr_system_actor_profiles_new > pr_system_actor_profiles_data.sql 3.3 In this new file, replace all "INSERT INTO pr_system_actor_profiles_new" by "INSERT INTO pr_system_actor_profiles" :1,$s/INSERT INTO pr_system_actor_profiles_new/INSERT INTO pr_system_actor_profiles/ 3.4 Extract the file from the database backup archive and place them in the current directory. In the product-registry_data.sql file, delete all the lines containing "INSERT INTO pr_system_actor_profiles" :1,$d/INSERT INTO pr_system_actor_profiles/ 3.4.1 Concatenate the file pr_system_actor_profiles_data.sql and product-registry_data.sql 3.5 In this new file, replace all "name, password" by "lastname, password" :1,$s/name, password/lastname, password/ 3.6 Drop and create the database dropdb product-registry createdb -U gazelle -E UTF8 product-registry 3.7 Set the environment variable : env.RELEASE_VERSION export RELEASE_VERSION=1.2-GA 3.8 Make a build of the application the application : ant -Dapplication=ProductRegistry -Dprofile=prod -Dtarget=make-release 3.9 Deploy it in JBoss 3.10 Insert the functions (from the file 1-functions_data.sql) psql -U gazelle product-registry < 00_functions_data.sql 3.11 Populate the database with the insertion files, where the "INSERT INTO pr_system_actor_profiles" are using AIPO instead of AIP and IPO. execute several times : psql -U gazelle product-registry < product-registry_data.sql 3.12 Check the sequences consistency Execute the script that update the sequence value for all the tables in the database (from the file 2-update_all_sequences.sql) psql -U gazelle product-registry < 2-update_all_sequences.sql ---------------- 4. Test the application ---------------- Ask me if you need further information, Jean-Renan Chatel