Skip to content
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

Tracking changes on JSONB column error #209

Closed
prtngn opened this issue Apr 24, 2022 · 0 comments · Fixed by #210
Closed

Tracking changes on JSONB column error #209

prtngn opened this issue Apr 24, 2022 · 0 comments · Fixed by #210

Comments

@prtngn
Copy link

prtngn commented Apr 24, 2022

Tell us about your environment

Ruby Version: 3.1.2

Rails Version: 7.0.2.3

PostgreSQL Version: 13.2

Logidze Version: 1.2.1

What did you do?

I have model:

  create_table "document_datum", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
    t.uuid "document_id", null: false
    t.json "data", null: false
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.index ["document_id"], name: "index_document_datum_on_document_id"
  end
dd =  DocumentData.create!(document_id: "af34c215-8c50-42d3-a52b-67a8ca8354a1", data: {test: 1})
dd.update!(data: {test: 2})

What did you expect to happen?

Change JSON column data and log it.

What actually happened?

ActiveRecord::StatementInvalid: PG::UndefinedFunction: ERROR:  could not identify an equality operator for type json
CONTEXT:  PL/pgSQL function logidze_logger() line 73 at IF

Column data is changed, but log_data is same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant