← Back to team overview

mahara-contributors team mailing list archive

[Bug 1558854] [NEW] Upgrade error null value in column "numcolumns" violates not-null constraint

 

Public bug reported:

We recently removed the numcolumns column from views as it is obsolete

But we get an error when upgrading from older versions of Mahara, eg
15.04 as the upgrade script wants to create a new view before the
numcolumns column is removed form db but doesn't have a default value
for it in lib/view.php

For example, we get this error:

Failed to get a recordset: postgres8 error: [-1: ERROR: null value in
column "numcolumns" violates not-null constraint]

>From calling the function install_system_portfolio_view() at
htdocs/lib/db/upgrade.php line 4182

I'll add back in the default value for numcolumns into the lib/view.php
file so that things will save correctly before the column is removed
from db during upgrade.

** Affects: mahara
     Importance: High
     Assignee: Robert Lyon (robertl-9)
         Status: New

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1558854

Title:
  Upgrade error null value in column "numcolumns" violates not-null
  constraint

Status in Mahara:
  New

Bug description:
  We recently removed the numcolumns column from views as it is obsolete

  But we get an error when upgrading from older versions of Mahara, eg
  15.04 as the upgrade script wants to create a new view before the
  numcolumns column is removed form db but doesn't have a default value
  for it in lib/view.php

  For example, we get this error:

  Failed to get a recordset: postgres8 error: [-1: ERROR: null value in
  column "numcolumns" violates not-null constraint]

  From calling the function install_system_portfolio_view() at
  htdocs/lib/db/upgrade.php line 4182

  I'll add back in the default value for numcolumns into the
  lib/view.php file so that things will save correctly before the column
  is removed from db during upgrade.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1558854/+subscriptions


Follow ups