[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [794] trunk
- Subject: SF.net SVN: ledger-smb: [794] trunk
- From: ..hidden..
- Date: Mon, 05 Feb 2007 21:21:26 -0800
Revision: 794
http://svn.sourceforge.net/ledger-smb/?rev=794&view=rev
Author: einhverfr
Date: 2007-02-05 21:21:25 -0800 (Mon, 05 Feb 2007)
Log Message:
-----------
Accepting LBMoore's upgrade fixes
Modified Paths:
--------------
trunk/CONTRIBUTORS
Added Paths:
-----------
trunk/sl2ls.sh
Modified: trunk/CONTRIBUTORS
===================================================================
--- trunk/CONTRIBUTORS 2007-02-06 05:21:08 UTC (rev 793)
+++ trunk/CONTRIBUTORS 2007-02-06 05:21:25 UTC (rev 794)
@@ -44,7 +44,8 @@
John Hasler <john @ dhh.gt.org> has provided some double-entry information for
the manual and miscellaneous documentation corrections.
-Louis B. Moore has provided the documentation on the command-line API.
+Louis B. Moore has provided the documentation on the command-line API and helped
+with upgrade scripts.
Original Authors of SQL-Ledger:
===================================
Added: trunk/sl2ls.sh
===================================================================
--- trunk/sl2ls.sh (rev 0)
+++ trunk/sl2ls.sh 2007-02-06 05:21:25 UTC (rev 794)
@@ -0,0 +1,63 @@
+#
+#
+#
+# SQL-Ledger Dataset name and Dataset Owner
+#
+SLDB=sqlledger
+SLOWN=SQL-Ledger_Owner
+
+#
+# Ledger-SMB Dataset name and Dataset Owner
+#
+LSDB=lsmbprod
+LSOWN=ledgersmb
+
+
+psql template1 -c "DROP DATABASE ${LSDB};"
+
+pg_dump ${SLDB} > sl2ls.sql
+
+sed -i -e "s/${SLOWN}/${LSOWN}/" sl2ls.sql
+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 template1 -c "ALTER USER ${LSOWN} WITH superuser;"
+
+psql ${LSDB} ${LSOWN} -c "\i sl2ls.sql"
+
+psql template1 -c "ALTER USER ${LSOWN} WITH nosuperuser;"
+
+cd /usr/local/ledger-smb/sql/legacy/
+
+psql ${LSDB} ${LSOWN} -c "SELECT version FROM defaults;"
+
+psql ${LSDB} ${LSOWN} -c "\i Pg-upgrade-2.6.12-2.6.17.sql"
+
+psql ${LSDB} ${LSOWN} -c "SELECT version FROM defaults;"
+
+psql ${LSDB} ${LSOWN} -c "\i Pg-upgrade-2.6.17-2.6.18.sql"
+
+psql ${LSDB} ${LSOWN} -c "SELECT version FROM defaults;"
+
+psql ${LSDB} ${LSOWN} -c "\i Pg-upgrade-2.6.18-2.6.19.sql"
+
+echo '###############################################################'
+echo
+echo 'Should error with--> ERROR: column "version" does not exist'
+echo
+echo '###############################################################'
+
+psql ${LSDB} ${LSOWN} -c "SELECT version FROM defaults;"
+
+psql ${LSDB} ${LSOWN} -c "update users_conf set password = md5('apasswrd');"
+
+cd /usr/local/ledger-smb
+
+./import_members.pl users/members
+
+psql ${LSDB} ${LSOWN} -c "SELECT * FROM users;"
+
+exit
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.