Skip to content

Instantly share code, notes, and snippets.

@MFQ
Created May 30, 2017 21:35
Show Gist options
  • Save MFQ/2a63b372e9c2cdce7806777452569a5c to your computer and use it in GitHub Desktop.
Save MFQ/2a63b372e9c2cdce7806777452569a5c to your computer and use it in GitHub Desktop.
'use strict';
const moment = require('moment');
const now = moment().format('YYYY-MM-DD HH:mm:ss Z');
module.exports = {
up: function (queryInterface, Sequelize) {
return queryInterface.bulkInsert("Estimates", [
{
name: 'When was the last time your property received a cleanup ?',
type: 'range',
createdAt: now,
updatedAt: now,
conditions: [
{
name: "name of condition",
url: "",
description: "des",
type:"time",
minTimeRange: 12.0,
maxTimeRange: 13.0,
min: 11.0,
max: 15.0
}
]
}
], {});
},
down: function (queryInterface, Sequelize) {
return queryInterface.bulkDelete("Estimates", {
name: ['When was the last time your property received a cleanup ?']
});
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment