Skip to content

ricardoboss/doctrine-dbal-timestamp-type

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Doctrine/DBAL Timestamp Type

Since Doctrine/DBAL does not support the MySQL Timestamp type, you might want to add it on your own using this package.

Why using this?

According to this issue, Doctrine/DBAL does not support MySQL-specific database types like this one. Therefore, we must add it ourself.

Installation

composer require ricardoboss/doctrine-dbal-timestamp-type

Then add the type to Doctrine\DBAL:

\Doctrine\DBAL\Types\Type::addType('timestamp', 'MarkTopper\DoctrineDBALTimestampType\TimestampType');

Laravel 5

You can use the Laravel Provider to ensure that the type is added to Doctrine\DBAL by adding the following to providers:

MarkTopper\DoctrineDBALTimestampType\LaravelServiceProvider::class,

For Laravel > 5.5 this service provider will be loaded automatically.

About

Add the timestamp type for Doctrine/DBAL

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%