1.1.1 • Published 7 years ago

avanttia-db v1.1.1

Weekly downloads
1
License
ISC
Repository
-
Last release
7 years ago

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
  })
}
1.1.1

7 years ago