summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--UPGRADE6
-rw-r--r--sl2ls.sh9
2 files changed, 12 insertions, 3 deletions
diff --git a/UPGRADE b/UPGRADE
index deaca635..1d7bcee6 100644
--- a/UPGRADE
+++ b/UPGRADE
@@ -13,6 +13,10 @@ Also this document assumes that the reader is already familiar with the release
notes. If you have not already done so, please read the release_notes file in
the doc/ directory.
+Before you begin, make sure that you are running at least PostgreSQL 8.0. If
+you are running a prior version, you will need to dump your data, upgrade the
+database server and restore the data before proceeding.
+
MANUAL UPGRADE:
===============================================================================
@@ -78,6 +82,8 @@ sql/Pg-central.sql file into it.
7) Copy the files from the LedgerSMB tarball over your existing installation.
8) Delete the users directory.
+9) Edit the ledger-smb.conf file as appropriate.
+
Congratulations, you have manually upgraded to LedgerSMB 1.2.
TODO: Add upgrade.pl script and automate the above process.
diff --git a/sl2ls.sh b/sl2ls.sh
index fcbf031f..531b8512 100644
--- a/sl2ls.sh
+++ b/sl2ls.sh
@@ -12,6 +12,9 @@ SLOWN=SQL-Ledger_Owner
LSDB=lsmbprod
LSOWN=ledgersmb
+# Installation directory
+
+IDIR=`pwd`
psql template1 -c "DROP DATABASE ${LSDB};"
@@ -22,7 +25,7 @@ sed -i -e "s/SQL_ASCII/LATIN1/" sl2ls.sql
createdb -O ${LSOWN} ${LSDB}
-psql ${LSDB} ${LSOWN} -c "\i /usr/local/ledger-smb/sql/Pg-central.sql"
+psql ${LSDB} ${LSOWN} -c "\i ${IDIR}/sql/Pg-central.sql"
psql template1 -c "ALTER USER ${LSOWN} WITH superuser;"
@@ -30,7 +33,7 @@ psql ${LSDB} ${LSOWN} -c "\i sl2ls.sql"
psql template1 -c "ALTER USER ${LSOWN} WITH nosuperuser;"
-cd /usr/local/ledger-smb/sql/legacy/
+cd ${IDIR}/sql/legacy/
psql ${LSDB} ${LSOWN} -c "SELECT version FROM defaults;"
@@ -54,7 +57,7 @@ psql ${LSDB} ${LSOWN} -c "SELECT version FROM defaults;"
psql ${LSDB} ${LSOWN} -c "update users_conf set password = md5('apasswrd');"
-cd /usr/local/ledger-smb
+cd ${IDIR}
./import_members.pl users/members