CodeReviewVideos.com Forum

Starting with POST [API Platform]

The API Platform setup we're using - aka the default provided via docker-compose.yaml - runs a Postgres DB. In the two previous Symfony 4 API implementations we were using MySQL. As such, our cleanUpDatabase function expects a MySQL DB. And that's not to mention all the credentials are incorrect.


This is a companion discussion topic for the original entry at https://codereviewvideos.com/course/beginners-guide-back-end-json-api-front-end-2018/video/starting-post-api-platform

Hi, chris!
You can truncate table and restart sequence within one query:

TRUNCATE TABLE album RESTART IDENTITY;

It releases you from using and even care about sequences’ names)

1 Like

Nice, thanks for sharing :slight_smile: