bugphpGroupWare - Bugs: bug #3479, an existing field being retyped to...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #3479: an existing field being retyped to an auto field should go through this process

Submitted by:  Johnson <jecinc>
Submitted on:  Tue 06 May 2003 03:43:36 AM UTC  
 
Item Group:  None Category:  API - phpGroupware API
Severity:  6 - Security Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Component Version:  None Operating System:  None
Reproducibility:  None Planned Release:  None
Fixed Release: 

Mon 07 Jun 2004 01:58:54 PM UTC, comment #1:

It seems this is a pgsql api issue not an eT dbtools issue.

When a field's type, name, or length is changed, on a postgresl system, the sequence and index values are dropped.

This is because it creates a new table, copies the original tables content, then deletes the original table and renames the new table (with the new schema)

The index and it's sequence needs to be recreated

Perhaps just using a dummy column instead of a dummy table would work .. but it would prevent the index field name or type from being changed.

Johnson <jecinc>
Tue 06 May 2003 03:43:36 AM UTC, original submission:

This is an example for postgresql to get the maximum value for a field and another example to set the sequance value to that value plus one

SELECT max(detail_id) from phpgw_ttrack_job_details
select setval('phpgw_ttrack_job__detail_id_seq',441);
alter table phpgw_ttrack_job_details alter detail_id set default nextval('phpgw_ttrack_job__detail_id_seq');

I thought this would be handy for dbtools

Johnson <jecinc>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

 

 

Follow 5 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-06-07 jecinc CategoryeTemplates => API - phpGroupware API
    Severity3 - Normal => 6 - Security
    Assigned toCaeies => None
2004-06-06 skwashd Assigned toNone => Caeies
2004-01-20 powerstat Assigned toInvalid User ID => None

Back to the top


Powered by Savane 3.3