Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sequelize-date-no-tz-postgres

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sequelize-date-no-tz-postgres

Add support for DATE-NO-TZ data-type for PostgreSQL in Sequelize

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

sequelize-date-no-tz-postgres

NPM version

Add support for DATE (timestamp without time zone) data-type for PostgreSQL in Sequelize.

Motivation

Read:

Install

npm install --save sequelize-date-no-tz-postgres

Use to define models

models/my_model.js

const withDateNoTz = require('sequelize-date-no-tz-postgres');

module.exports = function (sequelize, SequelizeDataTypes) {
  const DataTypes = withDateNoTz(SequelizeDataTypes);

  const MyModel = sequelize.define('myModel', {
    someDateWithoutTzField: {
      type: DataTypes.DATE_NO_TZ
    },

    // ...
  });

  // ...

  return MyModel;
};

Use in migrations

migrations/<timestamp>-add-some-date-field-to-my-model.js

const withDateNoTz = require('sequelize-date-no-tz-postgres');

module.exports = {
  up: function (queryInterface, SequelizeBase) {
    const Sequelize = withDateNoTz(SequelizeBase);

    return queryInterface.addColumn('myModel', 'someDateWithoutTzField', {
      type: Sequelize.DATE_NO_TZ
    });
  },

  // ...
};

Keywords

FAQs

Package last updated on 16 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc