bitcrowd / carbonite

Audit trails for Elixir/PostgreSQL based on triggers
Apache License 2.0
175 stars 12 forks source link

null value in column "data" of relation "changes" violates not-null constraint #121

Open krainboltgreene opened 2 days ago

krainboltgreene commented 2 days ago

While running the application the library works, but in tests it fails with this error even when we turn on capture: :ignore.

     ** (Postgrex.Error) ERROR 23502 (not_null_violation) null value in column "data" of relation "changes" violates not-null constraint

         table: changes
         column: data

     Failing row contains (154, 6012496, insert, public, merchants, null, null, {}, 5993165, null).
maltoe commented 1 day ago

Good day to you, too, @krainboltgreene

Carbonite's trigger procedures shouldn't be setting the changes.data column to anything but a jsonb value. Can you give me a little more information about your scenario? Trigger config, table schema, test setup, etc. Ideally a minimal working example reproducing the crash.

krainboltgreene commented 5 hours ago

Absolutely I can get you those details.