This topic is locked

Nullable column in DB is getting set to NOT NULL w/n PHPRunner

5/15/2023 9:38:55 AM
PHPRunner General questions
C
Craigbert author

Hi All,
I am seeing some odd behavior in PHPRunner.
I am using PostgreSQL (v14.7).
I have a table with a NULLABLE column which has an FK from a parent table.
When I look in the database I see that they column is NULLABLE.
But in PHPRunner it is showing NOT NULL.
When I try to modify the table definition in PHPRunner it will let me set the column to NULLABLE, but it won't save the change.
I have tried dropping and recreating the table with the FKs and it is not making any difference.
If drop and recreate JUST THE TABLE (i.e. no FKs) it STILL sets that column as well as another one as NOT NULL. They should both be NULLABLE.
Just as an FYI this is a hobby site I am working on in order learn PHPRunner.
Below is the DDL for the table:
`CREATE TABLE persona_class (
persona_class_id serial NOT NULL,
persona_id int4 NOT NULL,
player_class_cd varchar(4) NOT NULL,
player_sub_class_cd varchar(4),
level_nbr int4,
PRIMARY KEY (persona_class_id)
);

ALTER TABLE persona_class
ADD FOREIGN KEY (persona_id)
REFERENCES persona (persona_id);

ALTER TABLE persona_class
ADD FOREIGN KEY (player_class_cd)
REFERENCES player_class (player_class_cd);

ALTER TABLE persona_class
ADD FOREIGN KEY (player_sub_class_cd)
REFERENCES player_sub_class (player_sub_class_cd);`Any idea what I am doing wrong?
Thanks,
Craigbert