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: NoneCategory: API - phpGroupware API
Severity: 6 - SecurityPriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Component Version: NoneOperating System: None
Reproducibility: NonePlanned 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 click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 5 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 07 Jun 2004 01:58:54 PM UTCjecincCategoryeTemplates=>API - phpGroupware API
  Severity3 - Normal=>6 - Security
  Assigned toCaeies=>None
Sun 06 Jun 2004 11:27:16 PM UTCskwashdAssigned toNone=>Caeies
Tue 20 Jan 2004 12:13:45 PM UTCpowerstatAssigned toInvalid User ID=>None

Back to the top


Powered by Savane 3.1-cleanup1