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

const seedUsers = () => db.Promise.map([
  {name: '<NAME>', email: '<EMAIL>', password: '<PASSWORD>'},
  {name: '<NAME>', email: '<EMAIL>', password: '<PASSWORD>'},
], user => db.model('users').create(user))

const seedJournals = () => db.Promise.map([
	{title: "My Journal"}
], journal => db.model('journals').create(journal))

db.didSync
  .then(() => db.sync({force: true}))
  .then(seedUsers)
  .then(users => console.log(`Seeded ${users.length} users OK`))
  .then(seedJournals)
  .then(journals => console.log(`Seeded ${journals.length} journals OK`))
  .catch(error => console.error(error))
  .finally(() => db.close())
<commit_msg>journal seeds to a user<commit_after>const db = require('APP/db')

const seedUsers = () => db.Promise.map([
  {name: '<NAME>', email: '<EMAIL>', password: '<PASSWORD>'},
  {name: '<NAME>', email: '<EMAIL>', password: '<PASSWORD>'},
], user => db.model('users').create(user))

const seedJournals = () => db.Promise.map([
	{title: "My Journal", user_id:1}
], journal => db.model('journals').create(journal))

db.didSync
  .then(() => db.sync({force: true}))
  .then(seedUsers)
  .then(users => {
    console.log(`Seeded ${users.length} users OK`)
  })
  .then(seedJournals)
  .then(journals => console.log(`Seeded ${journals.length} journals OK`))
  .catch(error => console.error(error))
  .finally(() => db.close())

{'fraction_non_alphanumeric': 0.23731236597569694, 'fraction_numerical': 0.0007147962830593281, 'mean_word_length': 4.982905982905983, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 33, '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': '5118865', 'n_tokens_mistral': 494, 'n_tokens_neox': 489, 'n_words': 101}