utopia-php / database

Lite & fast micro PHP database abstraction library that is **easy to use**.
MIT License
61 stars 48 forks source link

🚀 Feature: Allow value for createdAt & updatedAt on create/update Document #285

Open fliitor opened 1 year ago

fliitor commented 1 year ago

🔖 Feature description

This fields auto generate on insert / update

It can be usefull to force them via data like

{
...otherFields,
"$createdAt": "string or timestamp"
}

🎤 Pitch

In case of migration for others platform, without this we need to inject data directly on MariaDB, or we'll loose this information or if we simply need to change it for any other reason

👀 Have you spent some time to check if this issue has been raised before?

🏢 Have you read the Code of Conduct?

fliitor commented 1 year ago

I let it autogenerate on update. There are bound to be cases where it's necessary, but having it on hand at the time of creation already solves a lot of needs.

TODO if PR accepted, modify documentation to replicate this change

joeyouss commented 1 year ago

Thank you for your PR.

Our team will review it ASAP.

fliitor commented 3 months ago

This can be close because it's already implemented