<commit_before>const db = require('APP/db')

const data = require('../seed.json')
//data[keys]
const seedData = () => db.Promise.map(Object.keys(data), function(model) {
    return db.Promise.map(data[model], function(item){
      return db.model(model)
      .create(item)
    })
})


const seedUsers = () => db.Promise.map(data.users, user => db.model('users').create(user))

const seedOrders = () => db.Promise.map(data.orders, order => db.model('orders').create(order))

const seedCategories = () => db.Promise.map(data.category, category => db.model('category').create(category))
const seedProducts = () => db.Promise.map(data.products, product =>  db.model('products').create(product))

const seedProdCat = () => db.Promise.map(data.category_product, catProd => db.model('category_product').create(catProd))

const seedAddresses = () => db.Promise.map(data.addresses, address => db.model('addresses').create(address))

const seedReviews = () => db.Promise.map(data.reviews, review => db.model('review').create(review))

const seedOrderProduct = () => db.Promise.map(data.order_product, orderProduct => db.model('order_product').create(orderProduct))

const seedCart = () => db.Promise.map(data.cart, cart => db.model('cart').create(cart))

const seedCartProd = () => db.Promise.map(data.cart_product, cartProduct => db.model('cart_product').create(cartProduct))




db.didSync
  .then(() => db.sync({force: true}))
  .then(seedAddresses)
  .then(seedUsers)
  .then(seedOrders)
  .then(seedCategories)
  .then(seedProducts)
  .then(seedProdCat)
  .then(seedReviews)
  .then(seedOrderProduct)
  .then(seedCart)
  .then(seedCartProd)<commit_msg>updated category to Product Category<commit_after>const db = require('APP/db')

const data = require('../seed.json')
//data[keys]
const seedData = () => db.Promise.map(Object.keys(data), function(model) {
    return db.Promise.map(data[model], function(item){
      return db.model(model)
      .create(item)
    })
})


const seedUsers = () => db.Promise.map(data.users, user => db.model('users').create(user))

const seedOrders = () => db.Promise.map(data.orders, order => db.model('orders').create(order))

const seedProdCategories = () => db.Promise.map(data.productCategory, category => db.model('productCategory').create(category))
const seedProducts = () => db.Promise.map(data.products, product =>  db.model('products').create(product))

const seedProdCat = () => db.Promise.map(data.category_product, catProd => db.model('category_product').create(catProd))

const seedAddresses = () => db.Promise.map(data.addresses, address => db.model('addresses').create(address))

const seedReviews = () => db.Promise.map(data.reviews, review => db.model('review').create(review))

const seedOrderProduct = () => db.Promise.map(data.order_product, orderProduct => db.model('order_product').create(orderProduct))

const seedCart = () => db.Promise.map(data.cart, cart => db.model('cart').create(cart))

const seedCartProd = () => db.Promise.map(data.cart_product, cartProduct => db.model('cart_product').create(cartProduct))




db.didSync
  .then(() => db.sync({force: true}))
  .then(seedAddresses)
  .then(seedUsers)
  .then(seedOrders)
  .then(seedProdCategories)
  .then(seedProducts)
  .then(seedProdCat)
  .then(seedReviews)
  .then(seedOrderProduct)
  .then(seedCart)
  .then(seedCartProd)
{'fraction_non_alphanumeric': 0.1855731816821311, 'fraction_numerical': 0.0, 'mean_word_length': 5.270168855534709, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4247147', 'n_tokens_mistral': 1099, 'n_tokens_neox': 1081, 'n_words': 165}