How to make DigitalOcean managed MySQL database work with Laravel

The managed mysql database in DigitalOcean requires every table to have a primary key. Laravel by default ships with password_resets table which dont have any primary key.

If you ever come across this issue, you can patch DigitalOcean managed mysql database by making some quick curl requests.

Make a GET request to retrieve database ID. Endpoint:

curl --location --request GET '' \
--header 'Authorization: Bearer {{BEARER_TOKEN}}'

Use the database ID from earlier response and make a PATCH request. Endpoint:{{DATABASE_ID}}/config

curl --location --request PATCH '{{DATABASE_ID}}/config' \
--header 'Authorization: Bearer {{BEARER_TOKEN}}' \
--header 'Content-Type: application/json' \
--data-raw '{"config": { "sql_require_primary_key": false }}'

Web Application

Web application development based on your requirements.


Open Source CMS customisation based on your requirements.


Integration with various 3rd party applications and services.


The best way to keep in touch and be informed of special offers.