<commit_before>var keystone = require('keystone');
var Types = keystone.Field.Types;

var Donation = new keystone.List('Donation', {
	map: { name: 'donor' },
	autokey: { from: 'name', path: 'key', unique: true }


});

Donation.add({
	project: { type: Types.Select,  options: 'Mentoring, EducationFund, India, Cambodia' , required: true, initial: true},
	name: {type: String, initial: true },
	contactNumber: {type: String, initial: true },
	email: {type: String, initial: true },
	address: {type: String, initial: true },
	postCode: {type: String, initial: true },
	country: {type: String, initial: true},
	dateOfDonation: { type: Types.Date, initial: true  },
	paymentMethod: {type: String, initial: true },
	frequency: {type: String, initial: true },
	amount: {type: String, initial: true}

});

Donation.track = true;
Donation.defaultColumns = 'date|20%, donor|20%, amount|20%';
Donation.register();

<commit_msg>made donors name as a key<commit_after>var keystone = require('keystone');
var Types = keystone.Field.Types;

var Donation = new keystone.List('Donation', {
	autokey: { from: 'name', path: 'key', unique: true },
	map: { name: 'donor' }


});

Donation.add({
	project: { type: Types.Select,  options: 'Mentoring, EducationFund, India, Cambodia' , required: true, initial: true},
	name: {type: String, initial: true, required: true },
	contactNumber: {type: String, initial: true },
	email: {type: String, initial: true },
	address: {type: String, initial: true },
	postCode: {type: String, initial: true },
	country: {type: String, initial: true},
	dateOfDonation: { type: Types.Date, initial: true  },
	paymentMethod: {type: String, initial: true },
	frequency: {type: String, initial: true },
	amount: {type: String, initial: true}

});

Donation.track = true;
Donation.defaultColumns = 'date|20%, donor|20%, amount|20%';
Donation.register();


{'fraction_non_alphanumeric': 0.16756176154672395, 'fraction_numerical': 0.00644468313641246, 'mean_word_length': 5.293918918918919, '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': '3903743', 'n_tokens_mistral': 637, 'n_tokens_neox': 610, 'n_words': 187}