{"size": 775, "ext": "js", "max_stars_repo_path": "backend/seeds/001.User_seed.js", "max_stars_repo_name": "eviva2000/Mandatory2", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "backend/seeds/001.User_seed.js", "max_issues_repo_name": "eviva2000/Mandatory2", "max_issues_repo_issues_event_min_datetime": "2021-05-11T13:30:01.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-11T13:30:01.000Z", "max_forks_repo_path": "backend/seeds/001.User_seed.js", "max_forks_repo_name": "eviva2000/Mandatory2", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 23.4848484848, "max_line_length": 74, "alphanum_fraction": 0.5187096774}
exports.seed = function(knex) {
  // Deletes ALL existing entries
  return knex("addresses")
    .del()
    .then(() => {
      return knex("users").del();
    })

    .then(function() {
      // Inserts seed entries
      return knex("users").insert([
        //value :pass
        {
          username: "admin",
          firstname: "",
          password:
            "$2b$10$eKj/5SBH64kpn3ptqNQk0OcVtGoIhIMvyvivwgXG0v8pvOQUEediq"
        },
        {
          username: "poweruser",
          password:
            "$2b$10$eKj/5SBH64kpn3ptqNQk0OcVtGoIhIMvyvivwgXG0v8pvOQUEediq"
        }
      ]);
    })
    .then(userId => {
      console.log(userId);
      return knex("addresses").insert([
        { user_id: userId, address1: "Rainbow St 45" }
      ]);
    });
};
