Search code examples
laravelherokularavel-6

Dataclip Error ERROR: cannot execute INSERT in a read-only transaction


I want to insert data in Heroku but I can't do it because it's have error is "Dataclip Error

ERROR:  cannot execute INSERT in a read-only transaction"

this picture


Solution

  • Heroku's Dataclips appear to be designed for viewing data, not modifying it:

    A Dataclip is a secret URL that holds the results of a SQL query on a particular Heroku Postgres database. Given the unique, private URL for a query, a user can call up the most recently stored results of that query. Our system will automatically re-run the Dataclip from time to time in order to keep results fresh. By sharing a Dataclip URL the same way you would share the underlying data, any recipient can view that data within, download it as a CSV, or even embed it live into a tool like Google Sheets.

    It is very likely that you can't modify data using this tool.

    If you're just trying to insert some data, use a regular database client.