bitreport-org / Bitreport

Automated technical analysis reports for cryptocurrencies 🚀
MIT License
8 stars 1 forks source link

Missing dependend on relations #103

Open glowacki-dev opened 5 years ago

glowacki-dev commented 5 years ago
> Report.where(image_data: nil).destroy_all
  Report Load (1.0ms)  SELECT "reports".* FROM "reports" WHERE "reports"."image_data" IS NULL
   (0.2ms)  BEGIN
  Report Destroy (4.6ms)  DELETE FROM "reports" WHERE "reports"."id" = $1  [["id", 1]]
   (0.4ms)  ROLLBACK
Traceback (most recent call last):
        1: from (irb):8
ActiveRecord::InvalidForeignKey (PG::ForeignKeyViolation: ERROR:  update or delete on table "reports" violates foreign key constraint "fk_rails_8649b89524" on table "twitter_posts")
DETAIL:  Key (id)=(1) is still referenced from table "twitter_posts".
: DELETE FROM "reports" WHERE "reports"."id" = $1