Changes
Title
unchanged
UUID instead of an auto-increment integer for ID with Active Record
Category
unchanged
How-tos
Yii version
unchanged
2.0
Tags
unchanged
mysql,active record,REST,UUID
Content
changed
> I have a dream ...
> I am happy to join with you today in what will go down in history as the greatest demonstration of
bad design of Active Record.
I have an API. It's built with a RESTful extension over Active Record, and some endpoints provide PUT methods to upload files. By a REST design we create an entity with `POST /video` first, and then upload a video file with `PUT /video/{id}/data`.[...]
P.S. A couple of helper functions.
```php
declare(strict_types=1);
namespace common\helpers;[...]