Code Monkey home page Code Monkey logo

doctrine-datetime-with-microseconds's People

Contributors

bartoszbartniczak avatar mekdrop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

doctrine-datetime-with-microseconds's Issues

DateTimeImmutable support

I see that the immutable type is missing. Would you be open to adding it? I can provide PR if needed.

doctrine:schema:update can't recognize microseconds format

  1. I created a "normal" datetime field in my entity and made a migration.
  2. I installed your package and changed annotation to
/**
 * @ORM\Column(type="datetime_microseconds")
 */
private $createdDate;
  1. I run 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.