-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Foreign keys are not defined #42
Comments
Steps to fix this:
|
Query to find deleted analysis: select * from chado.organism_analysis oa
LEFT join chado.analysis a on a.analysis_id = oa.analysis_id
where a.analysis_id is null |
The query to add a foreign key is not working on my local dev. I am not sure why it fails on db_query but succeeds when its run in db_query('ALTER TABLE chado.organism_analysis
ADD CONSTRAINT organism_analysis_organism_id_fk
FOREIGN KEY (organism_id)
REFERENCES chado.organism(organism_id)
ON DELETE CASCADE')->execute();
db_query('ALTER TABLE chado.organism_analysis
ADD CONSTRAINT organism_analysis_analysis_id_fk
FOREIGN KEY (analysis_id)
REFERENCES chado.analysis(analysis_id)
ON DELETE CASCADE')->execute(); I tried adding |
shouldnt this be a core issue? If a schema defines foreign keys, tripal should hook into schema and add them> |
@almasaeed2010 just touching base on this.... my understanding is adding foreign keys does nothing when adding custom tables... whats your opinion on this being a tripal core issue? |
organism_analysis
table uses drupalschema
to install the table which ignores the FK definition.Possible solutions:
We'll also need an update function to remove deleted entities from the linker table.
The text was updated successfully, but these errors were encountered: