This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // How to import from sequelize | |
| const { Sequelize, DataTypes } = require('sequelize'); | |
| // How to instantiate a connection pool to sqlite | |
| const sequelize = new Sequelize('sqlite::memory:', { logging: false }); | |
| // How to define a table | |
| const Account = sequelize.define('Account', { | |
| type: { type: DataTypes.ENUM('savings', 'checking'), allowNull: false }, | |
| name: { type: DataTypes.STRING, allowNull: false }, |
OlderNewer