Skip to content

Issue with backslash on forestadmin-schema.json #623

@clavat

Description

@clavat

Expected behavior

Wellformed .forestadmin-schema.json

Actual behavior

Malformed .forestadmin-schema.json because it try to espace backslash from schema.rb
image

Failure Logs

This come from my Production server when I try to deploy ForestAdmin for the first time.

2023-05-25 15:03:33.923134771 +0200 CEST [postdeploy-8568] [2023-05-25 13:03:33] Forest 🌳🌳🌳 The content of .forestadmin-schema.json file is not a correct JSON. 2023-05-25 15:03:33.923138396 +0200 CEST [postdeploy-8568] [2023-05-25 13:03:33] Forest 🌳🌳🌳 The schema cannot be synchronized with Forest Admin servers. 2023-05-25 15:03:33.947271238 +0200 CEST [postdeploy-8568] /app/vendor/ruby-2.7.7/lib/ruby/2.7.0/tsort.rb:228:in block in tsort_each'
2023-05-25 15:03:33.947272161 +0200 CEST [postdeploy-8568] /app/vendor/ruby-2.7.7/lib/ruby/2.7.0/tsort.rb:431:in each_strongly_connected_component_from'

Context

In my project I have a jsonb column with a default value at database level, this default value include a backslash followed by a double quote, it look like this :
t.jsonb "quote_char", default: [{"value"=>"\""}], null: false

  • Package Version: 8.0.8
  • Rails Version: 6.1
  • Database Dialect: SQL
  • Database Version: PostgreSQL 13

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions