Planner-list Error exporting to database
- From: Max <max wood unswalumni com>
- To: planner-list gnome org
- Subject: Planner-list Error exporting to database
- Date: Thu, 24 May 2007 11:43:27 +1200
I have just updated my server to Debian4.0
I have accepted the default version of Planner (0.14.2)
On attempting to export to the database an update, another name entered into
project #1, Labour, the following error message is displayed.
ERROR: insert or update on table "calendar" violates foreign key
constraint "calendar_proj_id_fkey"
DETAIL: Key (proj_id)=(1) is not present in table "project".
CONTEXT: SQL statement "UPDATE ONLY "public"."calendar" SET "day_sun" =
DEFAULT WHERE "day_sun" = $1"
SQL statement "DELETE FROM ONLY "public"."daytype" WHERE "proj_id" = $1"
The database is as raised by planner (Not modified in any way)
As can be seen from the dump of the relevant tables, the proj_id is definitely
present
inpipe=# select * from project;
proj_id | name | company | manager | proj_start | cal_id | phase |
default_group_id | revision | last_user
---------+--------+---------+---------+------------+--------+-------+------------------+----------+-----------
1 | Labour | Inpipe | Malcolm | 2007-05-24 |
1 | | | 1 | maxw
2 | Plant | Inpipe | Malcolm | 2007-05-24 |
2 | | | 1 | maxw
(2 rows)
inpipe=# select * from resource;
res_id | proj_id | group_id | name | short_name | email | note |
is_worker | units | std_rate | ovt_rate | cal_id
--------+---------+----------+-----------------+------------+-------+------+-----------+-------+----------+----------+--------
1 | 1 | | Malcolm | Malcolm | | |
t | 0 | 0 | 0 |
2 | 1 | | James | James | | |
t | 0 | 0 | 0 |
3 | 1 | | Roger | Roger | | |
t | 0 | 0 | 0 |
4 | 1 | | Paul | Paul | | |
t | 0 | 0 | 0 |
5 | 1 | | Wayne | Wayne | | |
t | 0 | 0 | 0 |
6 | 1 | | Albert | Albert | | |
t | 0 | 0 | 0 |
7 | 1 | | Richard | Ned | | |
t | 0 | 0 | 0 |
8 | 2 | | Foot Compactor | Packer | | |
t | 0 | 0 | 0 |
9 | 2 | | Plate Compactor | Wacker | | |
t | 0 | 0 | 0 |
10 | 2 | | Truck_3 | T3 | | |
t | 0 | 0 | 0 |
11 | 2 | | Truck_2 | T2 | | |
t | 0 | 0 | 0 |
12 | 2 | | Truck_1 | T1 | | |
t | 0 | 0 | 0 |
13 | 2 | | Chain Digger | Trench | | |
t | 0 | 0 | 0 |
14 | 2 | | Excavator Small | SmExc | | |
t | 0 | 0 | 0 |
15 | 2 | | Excavator Large | LgExc | | |
t | 0 | 0 | 0 |
(15 rows)
inpipe=#
inpipe=# select * from calendar;
cal_id | proj_id | parent_cid | name | day_mon | day_tue | day_wed |
day_thu | day_fri | day_sat | day_sun
--------+---------+------------+---------+---------+---------+---------+---------+---------+---------+---------
1 | 1 | | Default | 2 | 2 | 2 |
2 | 2 | 1 | 1
2 | 2 | | Default | 4 | 4 | 4 |
4 | 4 | 3 | 3
(2 rows)
inpipe=#
The new entry was inserted into the table manually from the psql prompt as
follows:
inpipe=# insert into resource (proj_id,name,short_name,is_worker) values
(1,'William','Bill','t');
INSERT 0 1
inpipe=# select * from resource;
res_id | proj_id | group_id | name | short_name | email | note |
is_worker | units | std_rate | ovt_rate | cal_id
--------+---------+----------+-----------------+------------+-------+------+-----------+-------+----------+----------+--------
1 | 1 | | Malcolm | Malcolm | | |
t | 0 | 0 | 0 |
2 | 1 | | James | James | | |
t | 0 | 0 | 0 |
3 | 1 | | Roger | Roger | | |
t | 0 | 0 | 0 |
4 | 1 | | Paul | Paul | | |
t | 0 | 0 | 0 |
5 | 1 | | Wayne | Wayne | | |
t | 0 | 0 | 0 |
6 | 1 | | Albert | Albert | | |
t | 0 | 0 | 0 |
7 | 1 | | Richard | Ned | | |
t | 0 | 0 | 0 |
8 | 2 | | Foot Compactor | Packer | | |
t | 0 | 0 | 0 |
9 | 2 | | Plate Compactor | Wacker | | |
t | 0 | 0 | 0 |
10 | 2 | | Truck_3 | T3 | | |
t | 0 | 0 | 0 |
11 | 2 | | Truck_2 | T2 | | |
t | 0 | 0 | 0 |
12 | 2 | | Truck_1 | T1 | | |
t | 0 | 0 | 0 |
13 | 2 | | Chain Digger | Trench | | |
t | 0 | 0 | 0 |
14 | 2 | | Excavator Small | SmExc | | |
t | 0 | 0 | 0 |
15 | 2 | | Excavator Large | LgExc | | |
t | 0 | 0 | 0 |
16 | 1 | | William | Bill | | |
t | 1 | 0 | 0 |
(16 rows)
inpipe=#
Is this a new bug, or has it been rectified
The older version, I cannot remember which, that came with Debian3.0 ran
without any such problems.
It will sure make a difference if someone can help on this matter!
regards
Max
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]