<commit_before>// initialize:
const knex = require('knex')({
  client: 'pg',
  connection: {
    host: '127.0.0.1',
    user: '',
    password: '',
    database: 'block-and-frame-test',
    charset: 'utf8',
  },
  debug: true,
});

// As it creates a connection pool for the current database, 
// you should use the bookshelf instance returned throughout your library:
const bookshelf = require('bookshelf')(knex);

// User schema
bookshelf.knex.schema.hasTable('users').then(exists => {
  if (!exists) {
    bookshelf.knex.schema.createTable('users', user => {
      user.increments('id').primary();
      user.string('email', 100).unique();
      user.string('username', 100).unique();
      user.string('password', 100);
      user.string('bio', 1000);
      user.string('city', 20);
      user.string('country', 20);
      user.timestamps();
    }).then(table => {
      console.log('Created users table');
    });
  }
});

// Event schema
bookshelf.knex.schema.hasTable('events').then(exists => {
  if (!exists) {
    bookshelf.knex.schema.createTable('events', event =>{
      event.increments('id').primary();
      event.string('name', 100);
      event.string('location', 100);
      event.string('coordinates', 100);
      event.string('description', 1000);
      event.timestamps();
    }).then(table) =>{
      console.log('Created events table');
    });
  }
});

// Event and Users join table
bookshelf.knex.schema.hasTable('events_users').then(exists => {
  if (!exists) {
    bookshelf.knex.schema.createTable('events_users', eventUser => {<commit_msg>(fix) fix error in bookshelf.js<commit_after>// initialize:
const knex = require('knex')({
  client: 'pg',
  connection: {
    host: '127.0.0.1',
    user: '',
    password: '',
    database: 'block-and-frame-test',
    charset: 'utf8',
  },
  debug: true,
});

// As it creates a connection pool for the current database, 
// you should use the bookshelf instance returned throughout your library:
const bookshelf = require('bookshelf')(knex);

// User schema
bookshelf.knex.schema.hasTable('users').then(exists => {
  if (!exists) {
    bookshelf.knex.schema.createTable('users', user => {
      user.increments('id').primary();
      user.string('email', 100).unique();
      user.string('username', 100).unique();
      user.string('password', <PASSWORD>);
      user.string('bio', 1000);
      user.string('city', 20);
      user.string('country', 20);
      user.timestamps();
    }).then(table => {
      console.log('Created users table');
    });
  }
});

// Event schema
bookshelf.knex.schema.hasTable('events').then(exists => {
  if (!exists) {
    bookshelf.knex.schema.createTable('events', event => {
      event.increments('id').primary();
      event.string('name', 100);
      event.string('location', 100);
      event.string('coordinates', 100);
      event.string('description', 1000);
      event.timestamps();
    }).then(table => {
      console.log('Created events table');
    });
  }
});

// Event and Users join table
bookshelf.knex.schema.hasTable('events_users').then(exists => {
  if (!exists) {
    bookshelf.knex.schema.createTable('events_users', eventUser => {
{'fraction_non_alphanumeric': 0.18659076533839342, 'fraction_numerical': 0.02245414294750158, 'mean_word_length': 3.3567493112947657, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '1751139', 'n_tokens_mistral': 1063, 'n_tokens_neox': 978, 'n_words': 198}