avanttia-db
v1.1.1
Published
Avanttia DB
Downloads
3
Readme
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
})
}