{"size": 401, "ext": "js", "max_stars_repo_path": "src/data/models/scripts/1-add-emails.js", "max_stars_repo_name": "Webstar921/React-Node-D3-GraphQL-IACP-", "max_stars_repo_stars_event_min_datetime": "2019-03-22T19:09:40.000Z", "max_stars_repo_stars_event_max_datetime": "2019-03-22T19:09:40.000Z", "max_issues_repo_path": "src/data/models/scripts/1-add-emails.js", "max_issues_repo_name": "Webstar921/React-Node-D3-GraphQL-IACP-", "max_issues_repo_issues_event_min_datetime": "2020-08-11T17:30:40.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-11T23:15:32.000Z", "max_forks_repo_path": "src/data/models/scripts/1-add-emails.js", "max_forks_repo_name": "Webstar921/React-Node-D3-GraphQL-IACP-", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 9, "max_forks_count": null, "avg_line_length": 21.1052631579, "max_line_length": 58, "alphanum_fraction": 0.6932668329}
// IMPORTANT, this is a workaround for now
// We have to add better structure for our migrations

import Subscription from '../Subscription';
import emailsList from './emailsList';

async function addEmails(emails) {
  for (let email of emails) {
    await Subscription.findOrCreate({ where: { email } });
  }
}

const emails = emailsList;


addEmails(emails).then(() => {
  console.log('Done!');
});
