Skip to content

Instantly share code, notes, and snippets.

@isabellachen
Last active October 10, 2017 13:42
Show Gist options
  • Save isabellachen/4567ece43badfbd0e2df37cd7ca489bc to your computer and use it in GitHub Desktop.
Save isabellachen/4567ece43badfbd0e2df37cd7ca489bc to your computer and use it in GitHub Desktop.
Creating SQlite3 DB with Sequelize
const Sequelize = require('sequelize');
const sequelize = require('../utils/db');
const Console = console;
const Event = sequelize.define('event', {
info: {
type: Sequelize.STRING
},
date: {
type: Sequelize.DATE
},
});
//run force:true ONCE to create the db the first time
// Event.sync({force: true});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment