PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Authentication » LiveUser » Bug #8360

PostgreSQL tables missing PKs

Details

Submitted2006-08-04 11:59 UTC
Frommathew at lifeart dot net dot au
Assignedlsmith
StatusClosed
PackageLiveUser
PHP Version5.1.4
OSWin XP
Roadmaps(Not assigned)

Comments

[2006-08-04 11:59 UTC] mathew at lifeart dot net dot au

Description:
------------
All the tables were created with the PK tables indexed properly.

All tables did not have PK (Primary Key) specified however and I had to add them all manually.

Test script:
---------------
run install.php with pgsql as database type

Expected result:
----------------
tables created with Primary Keys

Actual result:
--------------
all tables missing Primary Keys

[2006-08-05 01:31 UTC] mathew at lifeart dot net dot au

Sorry about the missing info. Let me say that this problem doesn't actually bother me personally as I do a lot of pgsql development(I already created the missing PKs, it was pretty quick). I just reported this so it could be fixed for others. It really would be helpful to get the SQL script that the PHP code eventually produced.

PostgreSQL 8.1

>Did LiveUser create unique indexes instead?
No. Just unique contraints.

>Did you set "force_seq" to true?
no. I changed the database only (I didn't see anything in the way of instructions about anything really). The sequences were created though.

What follows is a dump of a couple of table structures:
---
CREATE TABLE liveuser_applications(
application_id int4 NOT NULL DEFAULT 0,
application_define_name varchar(32) NOT NULL DEFAULT ' '::character varying,
CONSTRAINT applications_application_id_idx UNIQUE (application_id),
CONSTRAINT applications_define_name_i_idx UNIQUE (application_define_name)
) WITHOUT OIDS;

CREATE TABLE liveuser_area_admin_areas(
area_id int4 NOT NULL DEFAULT 0,
perm_user_id int4 NOT NULL DEFAULT 0,
CONSTRAINT area_admin_areas_id_i_idx UNIQUE (area_id, perm_user_id)
) WITHOUT OIDS;

CREATE SEQUENCE liveuser_applications_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

CREATE SEQUENCE liveuser_areas_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;

[2006-08-05 03:46 UTC] mathew at lifeart dot net dot au

Additionally there are no foreign key references in the created database.

(I only noticed this when running the resultant script through my ER tool)

[2006-08-05 04:50 UTC] mathew at lifeart dot net dot au

Sorry I forgot the other question. Yes the latest versions - I downloaded everything from PEAR from a clean slate. Everything is the latest version as of yesterday.