← Back to team overview

mahara-contributors team mailing list archive

[Bug 784341] Re: Fix xmldb postgres generator to preserve unique keys during alter table

 

>From what I understand the getAlterFieldSQL() function in
postgres7.class.php will create a new temp column in some instances (for
instance change of type / precision / decimal).

It will copy the data from the old unaltered field we are changing to
the temp one, drop the old field and then rename the temp field to the
new altered field.

I suspect that it is this process that is losing the unique keys. So
there needs to be a check during the 'Take a  look to field metadata' to
see if there is any unique key and if so keep a track of it so we can
add it back if needed.


** Changed in: mahara
    Milestone: None => 1.9.0

-- 
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/784341

Title:
  Fix xmldb postgres generator to preserve unique keys during alter
  table

Status in Mahara ePortfolio:
  Confirmed

Bug description:
  See bug #784322.

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


References