<commit_before>let Sequelize = require('sequelize');

var sequelize = new Sequelize('legacy', null, null, {
   protocol: 'postgres',
   dialect: 'postgres',
   host: 'localhost',
   define: {
     timestamps: false,
   }
 });

/************************************************
// Define project schema
************************************************/
var Project = sequelize.define('Project', {
  projectId: {
    type: Sequelize.STRING(255),
    allowNull: false
  },
  projectType: {
    type: Sequelize.STRING(255),
    allowNull: true
  },
  title: {
    type: Sequelize.STRING(255),
    allowNull: false
  },
  complete: {
    type: Sequelize.BOOLEAN,
    allowNull: true
  },
  projectTime: {
    type: Sequelize.INTEGER,
    allowNull: true
  },
  dataSet: {
    type: Sequelize.TEXT('long'),
    allowNull: true
  },
  generateDataSet: {
    type: Sequelize.TEXT('long'),<commit_msg>Completed DB refactor<commit_after>let Sequelize = require('sequelize');

if (process.env.DATABASE_URL) {
  var sequelize = new Sequelize(process.env.DATABASE_URL, {
    protocol: 'postgres',
    dialect: 'postgres',
    host: process.env.DATABASE_URL.split(':')[2]
  });
} else {
  //Change the arguments to sequelize as neccessary ('Database', 'username', 'password')
  var sequelize = new Sequelize('rally', null, null, {
    protocol: 'postgres', // or mysql
    dialect: 'postgres', // or mysql
    host: 'localhost'
  });
}

/************************************************
// Define project schema
************************************************/
var Project = sequelize.define('Project', {
  projectId: {
    type: Sequelize.STRING(255),
    allowNull: false
  },
  projectType: {
    type: Sequelize.STRING(255),
    allowNull: true
  },
  title: {
    type: Sequelize.STRING(255),
    allowNull: false
  },
  complete: {
    type: Sequelize.BOOLEAN,
    allowNull: true
  },
  projectTime: {
    type: Sequelize.INTEGER,
    allowNull: true
  },
  dataSet: {
    type: Sequelize.TEXT('long'),
    allowNull: true
  },
  generateDataSet: {
    type: Sequelize.TEXT('long'),
{'fraction_non_alphanumeric': 0.2254335260115607, 'fraction_numerical': 0.009152215799614644, 'mean_word_length': 3.6569506726457397, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2596759', 'n_tokens_mistral': 686, 'n_tokens_neox': 670, 'n_words': 139}