bartoszbartniczak / doctrine-datetime-with-microseconds Goto Github PK
View Code? Open in Web Editor NEWDoctrine plugin to save DateTime objects with microseconds in database.
Doctrine plugin to save DateTime objects with microseconds in database.
Add support for PHP 8.0 and add functional tests for it.
I see that the immutable type is missing. Would you be open to adding it? I can provide PR if needed.
/**
* @ORM\Column(type="datetime_microseconds")
*/
private $createdDate;
php bin/console doctrine:schema:update -f
to update my DB schema - nothing happened.Expected behaviour should be to change datetime
field type into datetime(6)
. What's more I changed it manually in my DB (MySQL) and run again previous command. Doctrine reverted my change from datetime(6)
to datetime
.
Did I do something wrong?
Additionally I think that it's worth to add a doctrine configuration section to readme, because to make microseconds work correctly you have to register a custom type in doctrine.yaml
config file
doctrine:
dbal:
types:
datetime_microseconds: BartoszBartniczak\Doctrine\DateTimeWithMicroseconds
If not you will get an error during schema update:
Unknown column type "datetime_microseconds" requested. Any Doctrine type that you use has to be registered with \Doctrine\DBAL\Types\Type::addType(). You can get a list of all the known types with \Doctrine\DBAL\Types\Type::getTypesMap(). If this error occurs
during database introspection then you might have forgotten to register all database types for a Doctrine Type. Use AbstractPlatform#registerDoctrineTypeMapping() or have your custom types implement Type#getMappedDatabaseTypes(). If the type name is empty you
might have a problem with the cache or forgot some mapping information.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.