A
A
Anton2016-05-27 18:37:19
PostgreSQL
Anton, 2016-05-27 18:37:19

How to force delete a foreign key?

On request:

ALTER TABLE public.aircrafts DROP CONSTRAINT aircrafts_aircrafts_models_id_fk RESTRICT;

An error pops up:
ERROR: constraint "aircrafts_aircrafts_models_id_fk" of relation "aircrafts" does not exist

The "aircrafts_models" table has already been deleted. The corresponding field from the "aircrafts" table has also been removed. Manually.
How can I delete the foreign key now?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Aksentiev, 2016-05-27
@hummingbird

Since it is no longer there, it has automatically disappeared.
It is written that daznt existential

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question