Forum OpenACS Development: Re: 5.0 upgrade process requires Tcl Calls

Collapse
Posted by Caroline Meeks on
Here are my results so far. My problem seems to be in acs-lang.  The log file is showing error messages for queries but when I try the same query in psql it runs fine.

Steps

1.Inspect at acs-admin/apm found acs-kernal to be version 4.6.2
2.made a dump of the database
3.Upgraded the code for acs-kernal to 4.6.3
4.upgraded the kernal from the apm
5.made a dump of the database
6.loaded the dump into pg 7.3 – I did not need to run the upgrade_helper script because my hosting provider (zill.net) has set the 7.2 character limit to 64 so it did not truncate the function names.
7.Sanity check the import by looking at number of users or objects
8.Made a copy of the code
9.Used this cvs command to get the code cvs -z3 -d :pserver:mailto:anonymous@openacs.org:/cvsroot co -r oacs-5-0 acs-core
My 5.0 code is now in the directory /home/aristoi/openacs-4
10.$cd openacs-4/packages/acs-kernel/sql/postgresql/
11.psql -f postgresql.sql – This generated a lot of already exist errors and some create functions
12.cd upgrade/
13. psql -f upgrade-4.6.3-4.6.4.sql
14.psql -f upgrade-4.6.4-4.6.5.sql
15.psql -f upgrade-4.6.5-4.6.6.sql
16.psql -f upgrade-4.6-4.6.1.sql  - This was a mistake I am already at 4.6.3
17.psql -f upgrade-4.7d-4.7.2d.sql
18.psql -f upgrade-4.7.2d-5.0d.sql
19.psql -f upgrade-5.0d-5.0d2.sql
20.psql -f upgrade-5.0d2-5.0d3.sql
21. psql -f upgrade-5.0d6-5.0d7.sql
22.psql -f upgrade-5.0d7-5.0d9.sql
psql:upgrade-5.0d7-5.0d9.sql:12: NOTICE:  rule _RETURN on view apm_file_info depends on table apm_package_files
psql:upgrade-5.0d7-5.0d9.sql:12: NOTICE:  view apm_file_info depends on rule _RETURN on view apm_file_info
psql:upgrade-5.0d7-5.0d9.sql:12: ERROR:  Cannot drop table apm_package_files because other objects depend on it
24)psql -f upgrade-5.0d11-5.0d12.sql
25)psql -f upgrade-5.0.0a4-5.0.0a5.sql
26)psql -f upgrade-5.0.0b1-5.0.0b2.sql
27)psql -f upgrade-5.0.0b2-5.0.0b3.sql
28)psql -f upgrade-5.0.0b3-5.0.0b4.sql
psql:upgrade-5.0.0b3-5.0.0b4.sql:788: ERROR:  Cannot change number of columns in view
psql:upgrade-5.0.0b3-5.0.0b4.sql:802: ERROR:  Cannot change number of columns in view
29) cd ~/openacs-4/packages/acs-service-contract/sql/postgresql/upgrade/
30)psql -f upgrade-4.7d2-4.7d3.sql
31)cd ~/openacs-4/packages/acs-authentication/sql/postgresq
32)psql -f acs-authentication-create.sql
33) cd ~/openacs-4/packages/acs-lang/sql/postgresql/
34) psql -f acs-lang-create.sql
BEGIN
psql:ad-locales.sql:44: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'ad_locale_abbrev_pk' for table 'ad_locales'
psql:ad-locales.sql:44: NOTICE:  CREATE TABLE / UNIQUE will create implicit index 'ad_locale_name_unq' for table 'ad_locales'
psql:ad-locales.sql:44: ERROR:  Relation 'ad_locales' already exists
psql:ad-locales.sql:56: ERROR:  current transaction is aborted, queries ignored until end of transaction block
psql:ad-locales.sql:60: ERROR:  current transaction is aborted, queries
many more of theseLooking in my dump file I see that yes ad_locals does exist so I probably installed it at some point. I will try running the upgrade scripts.
33)cd upgrade/
34)psql -f upgrade-4.1-4.7d2.sql
35)psql -f upgrade-4.7d2-4.7d3.sql psql -f upgrade-4.7d2-4.7d3.sql
36)psql -f upgrade-4.7d3-4.7d4.sql
37)psql -f upgrade-4.7d4-4.7d5.sql
38)psql -f upgrade-4.7d6-4.7d7.sql
psql:upgrade-4.7d6-4.7d7.sql:3: ERROR:  Cannot drop table ad_locales because other objects depend on it
      Use DROP ... CASCADE to drop the dependent objects too
psql:upgrade-4.7d6-4.7d7.sql:28: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'ad_locale_abbrev_pk' for table 'ad_locales'
psql:upgrade-4.7d6-4.7d7.sql:28: NOTICE:  CREATE TABLE / UNIQUE will create implicit index 'ad_locale_name_unq for table 'ad_locales'
psql:upgrade-4.7d6-4.7d7.sql:28: ERROR:  Relation 'ad_locales' already exists
psql:upgrade-4.7d6-4.7d7.sql:29: ERROR:  Cannot insert a duplicate key into unique index ad_locale_name_unq
DROP TABLE
39)psql -f upgrade-4.7d7-4.7d8.sql
Same errors as 4.7d6 to d7 above
40)psql -f upgrade-4.7d8-4.7d9.sql
41)psql -f upgrade-4.7d9-5.0d1.sql
42) created zzz-postload.tcl according to Dave;s instructions here. https://openacs.org/projects/openacs/5.0/upgrade-463-50

43)Added ns_param  tdom                ${bindir}/tdom.so to the ns_section "ns/server/${
44)Restarted server
45)error on trying to show a page
Error: tclop: invalid return code from filter proc 'invalid command name "parameter::get"': must be filter_ok, filter_return, or filter_break
Error durring load is
13/Dec/2003:22:56:11][18708.1024][-main-] Debug: PgBindCmd: sql =
      select locale
    from  ad_locales
        where  enabled_p = 't'

[13/Dec/2003:22:56:11][18708.1024][-main-] Error: Ns_PgExec: result status: 7 message: ERROR:  Attribute 'enabled_p' not found

[13/Dec/2003:22:56:11][18708.1024][-main-] Error: Error sourcing /home/aristoi/openacs-4/packages/acs-templating/tcl/acs-templating-init.tcl:
Database operation "select" failed (exception NSDB, "Query was not a statement returning rows.")
But when I try the query in psql it works fine.