Closed dreyes17 closed 1 year ago
Hello,
Right now the creation of the db_relationship table is:
create table db_relationship ( db_relationship_id bigserial not null, type_id bigint not null, subject_id bigint not null, object_id bigint not null, primary key (db_relationship_id), foreign key (type_id) references db (db_id) on delete cascade INITIALLY DEFERRED, foreign key (subject_id) references db (db_id) on delete cascade INITIALLY DEFERRED, foreign key (object_id) references db (db_id) on delete cascade INITIALLY DEFERRED, constraint db_relationship_c1 unique (subject_id,object_id,type_id) );
but it make sense to change the type_id reference to be the same as in the sequence module:
create table db_relationship ( db_relationship_id bigserial not null, type_id bigint not null, subject_id bigint not null, object_id bigint not null, primary key (db_relationship_id), foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, foreign key (subject_id) references db (db_id) on delete cascade INITIALLY DEFERRED, foreign key (object_id) references db (db_id) on delete cascade INITIALLY DEFERRED, constraint db_relationship_c1 unique (subject_id,object_id,type_id) );
Hope it can help :)
Yes, I agree. I'll make a branch and a PR
This has been fixed and is merged into the main branch 🎉 Thanks for the report @dreyes17
Hello,
Right now the creation of the db_relationship table is:
create table db_relationship ( db_relationship_id bigserial not null, type_id bigint not null, subject_id bigint not null, object_id bigint not null, primary key (db_relationship_id), foreign key (type_id) references db (db_id) on delete cascade INITIALLY DEFERRED, foreign key (subject_id) references db (db_id) on delete cascade INITIALLY DEFERRED, foreign key (object_id) references db (db_id) on delete cascade INITIALLY DEFERRED, constraint db_relationship_c1 unique (subject_id,object_id,type_id) );
but it make sense to change the type_id reference to be the same as in the sequence module:
create table db_relationship ( db_relationship_id bigserial not null, type_id bigint not null, subject_id bigint not null, object_id bigint not null, primary key (db_relationship_id), foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, foreign key (subject_id) references db (db_id) on delete cascade INITIALLY DEFERRED, foreign key (object_id) references db (db_id) on delete cascade INITIALLY DEFERRED, constraint db_relationship_c1 unique (subject_id,object_id,type_id) );
Hope it can help :)