Hi, I've spent the past couple days trying to migrate to 1.3, and I hit a ton of issues. Even now, the system is only partially usable -- lots more bugs to squash. Just thought I'd post my notes so far, maybe with some others doing this we can get 1.3 out the door.
Many thanks to Chris T for some ongoing assistance with this... I've learned a ton about Postgres and the data structure of Ledger. Here we go: Starting state: - Server already configured for Apache, CGI, CPAN dependencies, and aliases set to a working copy that mirrors SVN trunk - perl Makefile - make - resolve most issues, though still lots of failing tests - tried initiate.pl, got partly there, ended up ditching everything and starting over with INSTALL.manual steps. New site install: 1. Install specified contrib templates from /usr/share/postgresql/8.3/contrib into template1 2. Create database 3. \i sql/Pg-database.sql 4. Import functions from sql/modules/LOADORDER 5. Import other sql/modules files: EndOfYear.sql, Inventory.sql, security.sql, Settings.sql, Vendor.sql 6. Generate custom roles file from Roles.sql, import. 7. select admin__save_user(null, person__save(null, 3, 'firstname','middle','last', 232), 'mylogin','mypass'); -- 232 is id for USA in countries table 8. select admin__add_user_to_role('mylogin', rolname) from pg_roles where rolname like 'lsmb_mydbname%'; 9. grant select on account_link_description to lsmb_mydbname__account_create -- lots more grants needed, may end up granting all to my login for time being 10. Import old chart (using some other code leveraging another project, load each chart id and account_save() account_heading_save() each account 11. alter schema public rename to newschema; 12. create schema public; 13. pg_restore -U postgres -d mydbname backup-from-1.2.sqlc 14. alter schema public rename to orig; 15. alter schema newschema rename to public; 16. Work my way through a SQL-Ledger migration script that Chris T provided (Chris, mind if I post to the list?) 17. insert into parts select * from parts; -- repeat this copy for assembly, partsgroup, makemodel, pricegroup, warehouse, invoice, yearend, department 18. drop ar__audit_trail, ap__audit_trail on ar, drop gl_audit_trail on gl -- couldn't import into ar, ap, gl due to missing grants 19. Import into ar, ap, gl from Chris's script ... that's where I've gotten. Sent a patch to the list earlier with some other fixes I had to do... The current result is I've got a partially working upgrade, but I'm seeing lots of things that need fixing -- it looks like many old tables have been replaced with views, but the columns don't match what the code expects, lots of missing permissions, a few broken features (like all "period" boxes seem to have no effect, have to enter dates in the fields instead), reconciliation doesn't show up, etc. Will post more as we work through it... Cheers, -- John Locke "Open Source Solutions for Small Business Problems" published by Charles River Media, June 2004 Follow me on Twitter: http://twitter.com/freelock http://www.freelock.com ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ Ledger-smb-devel mailing list Ledger-smb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel