Illustration of connected portfolio elements

Portfolios for your
learning community

Try out Mahara

Create portfolios

Using Mahara, students and staff create their personal learning stories by uploading evidence of activities they have participated in, and embedding publicly accessible content they have previously put online. They can write reflections on their experiences that frame this evidence, map it to competencies or registration requirements, and provide necessary context.

Mahara can be used for many different portfolio purposes, such as study, professional development, work-integrated learning, assessment, showcase and presentation, and employability.

Learn about the portfolio options

Illustration of a person with their portfolio
Illustration of a paper airplane representing sharing

Share work

Mahara allows portfolios to be shared flexibly with one person, a specific group of people, or the entire world. Access can be further restricted to a particular time frame or just within an assessment task.

Find out about sharing portfolios

Engage with others

Mahara makes it easy to comment and give feedback. Portfolios can also be submitted to learning management systems via LTI (Learning Tools Interoperability) for marking.

Groups in Mahara allow people to create portfolios collaboratively and engage in forum discussions.

Learn about collaborating in Mahara

Illustration of a group of people collaborating
Illustration of a podcast logo

Listen to portfolio stories

In our podcast 'Create. Share. Engage.' portfolio practitioners, researchers, learning designers, and portfolio authors share their journey. Learn how they navigate the many different facets of portfolios in general, and Mahara specifically.

Listen on the podcast website or in your favourite app

Mahara Community

Upgrade from 1.1.7 to 1.2.2 fails

anonymous profile picture
Account deleted
Posts: 1
06 January 2010, 8:08

Hi *,

when trying to upgrade 1.1.7 to 1.2.2 I get a postgresql error:

Relation »mahara_arteblogblogfile_blofil_pk« does not exist

This is the description of the table mahara_artefact_blog_blogpost_file:

mahara=# \d mahara_artefact_blog_blogpost_file
Tabelle »public.mahara_artefact_blog_blogpost_file«
  Spalte  |  Typ   | Attribute
----------+--------+-----------
 blogpost | bigint | not null
 file     | bigint | not null
Indexe:
    »mahara_arteblogblogfile_blo_pk« PRIMARY KEY, btree (blogpost, file)
    »mahara_arteblogblogfile_blo_ix« btree (blogpost)
    »mahara_arteblogblogfile_fil_ix« btree (file)
Fremdschlüssel-Constraints:
    »mahara_arteblogblogfile_blo_fk« FOREIGN KEY (blogpost) REFERENCES mahara_artefact(id)
    »mahara_arteblogblogfile_fil_fk« FOREIGN KEY (file) REFERENCES mahara_artefact(id)

The related code from upgrade.php (line 904ff) is:

     if ($oldversion < 2009031800) {

        // Files can only attach blogpost artefacts, but we would like to be able to attach them
        // to other stuff.  Rename the existing attachment table artefact_blog_blogpost_file to
        // artefact_file_attachment so we don't end up with many tables doing the same thing.
        execute_sql("ALTER TABLE {artefact_blog_blogpost_file} RENAME TO {artefact_attachment}");

        if (is_postgres()) {
            // Ensure all of the indexes and constraints are renamed
            execute_sql("
            ALTER TABLE {artefact_attachment} RENAME blogpost TO artefact;
            ALTER TABLE {artefact_attachment} RENAME file TO attachment;

            ALTER INDEX {arteblogblogfile_blofil_pk} RENAME TO {arteatta_artatt_pk};
            ALTER INDEX {arteblogblogfile_blo_ix} RENAME TO {arteatta_art_ix};
            ALTER INDEX {arteblogblogfile_fil_ix} RENAME TO {arteatta_att_ix};

            ALTER TABLE {artefact_attachment} DROP CONSTRAINT {arteblogblogfile_blo_fk};
            ALTER TABLE {artefact_attachment} ADD CONSTRAINT {arteatta_art_fk} FOREIGN KEY (artefact) REFERENCES {artefact}(id);

            ALTER TABLE {artefact_attachment} DROP CONSTRAINT {arteblogblogfile_fil_fk};
            ALTER TABLE {artefact_attachment} ADD CONSTRAINT {arteatta_att_fk} FOREIGN KEY (attachment) REFERENCES {artefact}(id);
            ");
        }

Can I safely change arteblogblogfile_blofil_pk to arteblogblogfile_blo_pk in upgrade.php?

Does anybody else also had some troubles like that?

Thanks in advance

Stephan