Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(model): handle true timestamp fields correctly #12580

Merged
merged 5 commits into from
Aug 1, 2020

Commits on Aug 1, 2020

  1. fix(model): handle timestamp fields set to true

    Updated Model.init method to accept only string and boolean values. Also, prevent a column
    named `true` from being created on the model whenever any timestamp fields (viz. 'createdAt',
    'updatedAt', 'deletedAt') is set to `true`
    
    Closes sequelize#12551
    vishal-sood committed Aug 1, 2020
    Configuration menu
    Copy the full SHA
    7ee8be5 View commit details
    Browse the repository at this point in the history
  2. test(model): handle timestamp fields set to true

    Added tests to check the following:
     - Model.init throws Error when any timestamp field has value other than string or boolean
     - Model.init doesn't create a column named `true` when any timestamp field is set to true
    vishal-sood committed Aug 1, 2020
    Configuration menu
    Copy the full SHA
    ec6c1e5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8873884 View commit details
    Browse the repository at this point in the history
  4. Update model.js

    papb committed Aug 1, 2020
    Configuration menu
    Copy the full SHA
    853a29a View commit details
    Browse the repository at this point in the history
  5. Update model.test.js

    papb committed Aug 1, 2020
    Configuration menu
    Copy the full SHA
    c27ecbd View commit details
    Browse the repository at this point in the history