Giter Club home page Giter Club logo

Comments (5)

mfn avatar mfn commented on June 26, 2024

weird MySQL behaviour

Ack, other databases don't have this, which are supported by ide-helper too. E.g. pgsql does not have this issue; so any change has to be considered carefully.

For one, using pgsql, I stopped using these migrations in my code base where I could and replaced them with more explicit, not null, types (basically timestampTz())

Or maybe check in migrations

That would a "big thing" IMHO, because ide-helper is not concerned with migrations. It purely works on the actual database.


IMHO it feels wrong to not have the field reflect the nullable, when in fact the database colum is nullable.

Can you use the hooks feature in ide-helper to change this for your project?

from laravel-ide-helper.

juliangums avatar juliangums commented on June 26, 2024

IMHO it feels wrong to not have the field reflect the nullable, when in fact the database colum is nullable.

I'd usually agree, but this case is very different. Given that 99.9999% of projects will not null those timestamps, I think the default shouldn't be for the vast majority to null-check them. Maybe this could be a config setting for those few that want nullable timestamps?

from laravel-ide-helper.

juliangums avatar juliangums commented on June 26, 2024

I added a hook for now but would be happy to see this. I can see if I can help with a PR if it's wanted.

from laravel-ide-helper.

mfn avatar mfn commented on June 26, 2024

Can only try to share my point of view once more:

  • ide-helper should reflect the technical possibility/constraints
  • the issue seems driver specific
  • we've made hooks exactly for this

I simply think the additional complexity for this feature doesn't need to be in ide-helper 🤷🏼

from laravel-ide-helper.

juliangums avatar juliangums commented on June 26, 2024

I get your point. Didn't take me long to create a hook for it. Just thought others could benefit from it, given that the vast majority of users will have the same setup.

from laravel-ide-helper.

Related Issues (20)

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.