mmerian / doctrine-timestamp
A library adding the timestamp type to Doctrine ORM
Installs: 168 042
Dependents: 0
Suggesters: 0
Security: 0
Stars: 15
Watchers: 3
Forks: 13
Open Issues: 4
Requires
- doctrine/dbal: 2.*
This package is auto-updated.
Last update: 2024-10-25 07:08:25 UTC
README
Implementation of a timestamp type for the Doctrine DBAL
This library maps the DateTime PHP class to a Unix timestamp (integer) in the database.
Installation
Just add this to your composer.json
{ "require": { "mmerian/doctrine-timestamp": "dev-master" } }
Then, when bootstraping your doctrine connection :
Type::addType('timestamp', 'DoctrineTimestamp\DBAL\Types\Timestamp'); $conn->getDatabasePlatform()->registerDoctrineTypeMapping('Timestamp', 'timestamp');