4

Just another code review today

Comments
  • 3
    No. The number within parentheses indicates the display count. The storage is only going to accept what an integer can take

    I hope MySQL will stop supporting such useless extensions to data types
  • 5
    When the prince doesn't understand mysql types 😔

    Also int(255) won't display at 255 either, and shouldn't that be a date/time or timestamp field?
  • 1
    Everything about this makes me uncomfortable!
  • 1
    @C0D4 Its supposed to be number of days. If you read the second comment
  • 1
    @princebansal ok sure, I didn't read that far down.

    But even with that, shouldn't you be defaulting that to 0?
  • 1
    @C0D4 I don't know the business requirement. Not my code. Just a dumb review
  • 2
    @princebansal 🤔I just get an implied default should be used based on it being a number of days.

    Otherwise you end up with ifnull() or casting happening based on its usage.

    But as you said, unknown requirements.
Add Comment