avanttia-db

1.1.1 • Public • Published

db

Avanttia DB as an import for Sequelize.

Prerequsites

npm install -g mysql
npm install -g sequelize-auto

Usage

npm run generate

From the Sequelize documentation

// in your server file - e.g. app.js
const Project = sequelize.import(__dirname + "/path/to/models/project")

// The model definition is done in /path/to/models/project.js
// As you might notice, the DataTypes are the very same as explained above
module.exports = (sequelize, DataTypes) => {
  return sequelize.define("project", {
    name: DataTypes.STRING,
    description: DataTypes.TEXT
  })
}

Readme

Keywords

Package Sidebar

Install

npm i avanttia-db

Weekly Downloads

0

Version

1.1.1

License

ISC

Unpacked Size

500 kB

Total Files

262

Last publish

Collaborators

  • claudio-avanttia