Forums | Mahara Community

Support /
Upgrade from 1.6.2 to 1.9..0 fails


Robert Lyon's profile picture
Posts: 758

07 July 2014, 19:47

Hi Steve,

Your error also mentions the institution_config table is not present - what happens if you try to add the table manually using the sql at start of this thread? Do you get any errors? If so can you let me know what they are?

I tried to replicate you problem by creating a 1.4 mahara and then upgrading it to 1.9.1 but I did not get any error. I even tried going from a 1.0 to 1.4 to 1.9.1 but still was unable to get the error you describe.

As this problem seems to be happening to a number of people I would like to get to the bottom of this.

CheersRobert

anonymous profile picture
Account deleted
Posts: 3

08 July 2014, 12:12

Thanks for the reply Robert, I'm using postgres 9.1 so i imagine there is a change in syntax?

Regards

Steve

anonymous profile picture
Account deleted
Posts: 3

10 July 2014, 21:30

I wanted to say that the SQL at the beginning of the thread is MYSQL and i dont think it will run as i'm on Postgres 9.1.

Is there a postgres version of the table create?.. i'm not a database expert but can run commands on postgres.

Cheers

Steve 

Robert Lyon's profile picture
Posts: 758

28 July 2014, 11:11

Hi Steve,

 

By the looks of things what you need to do for Postgres is these lines: (which I got from going pg_dump mydb -t institution_config --schema-only on a working copy of the mahara database)

CREATE TABLE institution_config (
    id bigint NOT NULL,
    institution character varying(255) NOT NULL,
    field character varying(255) NOT NULL,
    value text
);
ALTER TABLE public.institution_config OWNER TO maharauser;
CREATE SEQUENCE institution_config_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;
ALTER TABLE public.institution_config_id_seq OWNER TO maharauser;
ALTER SEQUENCE institution_config_id_seq OWNED BY institution_config.id;
ALTER TABLE ONLY institution_config ALTER COLUMN id SET DEFAULT nextval('institution_config_id_seq'::regclass);
ALTER TABLE ONLY institution_config
    ADD CONSTRAINT instconf_id_pk PRIMARY KEY (id);
CREATE INDEX instconf_ins_ix ON institution_config USING btree (institution);
CREATE UNIQUE INDEX instconf_insfie_uix ON institution_config USING btree (institution, field);
ALTER TABLE ONLY institution_config
    ADD CONSTRAINT instconf_ins_fk FOREIGN KEY (institution) REFERENCES institution(name);

Robert Lyon's profile picture
Posts: 758

06 August 2014, 10:32

Ah, I believe I've found the cause of the problem that users are experiencing when upgrading from a pre 1.9 version to 1.9+

There was a change made in 1.9 relating to language settings and one of the things it does is try to set a cookie relating to the institution language last used.

When one upgrades it logs them out as part of the process if they are logged in. And it tries to set their institution set language on logout in 1.9 getting info from the institution_config table (which does not exist at this point).

I've make a bug report for this to get it fixed.

But in the meantime if people have trouble - all you need to do is make sure you are logged out of your site before you put in place the new 1.9+ mahara files. Or hit the url with another browser where you are not logged in with.

 

15 results