{"size": 926, "ext": "js", "max_stars_repo_path": "data/migrations/07-project_entries.js", "max_stars_repo_name": "john-afolabi/hackathon-portal-server", "max_stars_repo_stars_event_min_datetime": "2020-02-21T09:03:21.000Z", "max_stars_repo_stars_event_max_datetime": "2021-01-23T11:25:49.000Z", "max_issues_repo_path": "data/migrations/07-project_entries.js", "max_issues_repo_name": "john-afolabi/hackathon-portal-server", "max_issues_repo_issues_event_min_datetime": "2019-12-16T13:27:00.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-02T04:04:46.000Z", "max_forks_repo_path": "data/migrations/20200117140220_08-project_entries.js", "max_forks_repo_name": "LABS-EU3/hackton-backend", "max_forks_repo_forks_event_min_datetime": "2021-11-05T07:46:49.000Z", "max_forks_repo_forks_event_max_datetime": "2021-11-05T07:46:49.000Z"}
{"max_stars_count": 4, "max_issues_count": 27, "max_forks_count": 1, "avg_line_length": 23.7435897436, "max_line_length": 62, "alphanum_fraction": 0.6112311015}
/* eslint-disable func-names */
exports.up = function(knex) {
  return knex.schema.createTable('project_entries', table => {
    table.increments();
    table
      .text('project_title')
      .notNullable()
      .unique();
    table.text('participant_or_team_name').notNullable();
    table
      .integer('event_id')
      .unsigned()
      .notNullable();

    table
      .foreign('event_id')
      .references('events.id')
      .onUpdate('CASCADE')
      .onDelete('CASCADE');
    table.string('video_url');
    table.string('git_url');
    table.text('project_writeups');
    table
      .integer('submitted_by')
      .unsigned()
      .notNullable();
    table
      .foreign('submitted_by')
      .references('users.id')
      .onUpdate('CASCADE')
      .onDelete('CASCADE');
    table.timestamps(true, true);
  });
};

exports.down = function(knex) {
  return knex.schema.dropTableIfExists('project_entries');
};
