[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-tracker] [bugs #3479] an existing field being retyped to a
From: |
Johnson |
Subject: |
[Phpgroupware-tracker] [bugs #3479] an existing field being retyped to an auto field should go through this process |
Date: |
Mon, 07 Jun 2004 09:59:53 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 Galeon/1.3.14 |
This mail is an automated notification from the bugs tracker
of the project: phpGroupWare.
/**************************************************************************/
[bugs #3479] Latest Modifications:
Changes by:
Johnson <address@hidden>
'Date:
Mon 06/07/2004 at 13:58 (Canada/Eastern)
What | Removed | Added
---------------------------------------------------------------------------
Category | eTemplates | API - phpGWapi
Severity | 5 - Average | 9 - Blocker
Assigned to | Caeies | None
------------------ Additional Follow-up Comments ----------------------------
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.
/**************************************************************************/
[bugs #3479] Full Item Snapshot:
URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=3479>
Project: phpGroupWare
Submitted by: Johnson
On: Tue 05/06/2003 at 03:43
Category: API - phpGWapi
Item Group: None
Severity: 9 - Blocker
Priority: 5 - Normal
Resolution: None
Assigned to: None
Status: Open
Component Version: None
Platform Version: None
Reproducibility: None
Summary: an existing field being retyped to an auto field should go through
this process
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
Follow-up Comments
------------------
-------------------------------------------------------
Date: Mon 06/07/2004 at 13:58 By: jecinc
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.
-------------------------------------------------------
Date: Tue 05/06/2003 at 16:59 By: ralfbecker
Again a useful feature request ;-)
Setting the sequenze-value alone is not enought, you have to create the sequenz
first.
There are more issues, you should be aware with the db-tools, eg. if you change
the columns of a primary key (eg. add an other column to a primary key) this is
not and can not be handled by db-tools.
I leave the bugreport open, as feature-request.
Please post feature-request in the according section on savanah.
For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=3479>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/