<commit_before>from sqlalchemy import *
from sqlalchemy.ext.declarative import declarative_base
from datetime import datetime
from db import Base, Session


# abstract base class for Users
class User(Base):
	__tablename__ = 'users'
	id = Column(Integer, primary_key=True, nullable=False)
	name = Column(String(75), nullable=False)
	email = Column(String(60), nullable=False)
	passwordhash = Column(String(255), nullable=False) 
	phone = Column(String(15), nullable=False)
	permissions = Column(Enum('volunteer', 'orgmember', 'admin'), nullable=False)
	last_active = Column(DateTime(timezone=False), nullable=True)
	token = Column(String(50))
	birthdate = Column(DateTime)
	bio = Column(String(10000))
	gender = Column(Enum('Male', 'Female', 'Other'))
	__mapper_args__ = {
		'polymorphic_identity':'user',
		'polymorphic_on': permissions
	}
		

	def __repr__(self):
		return "User(%s, %s)" % (self.id, self.name)







	<commit_msg>making user email unique. Tests will break<commit_after>from sqlalchemy import *
from sqlalchemy.ext.declarative import declarative_base
from datetime import datetime
from db import Base, Session


# abstract base class for Users
class User(Base):
	__tablename__ = 'users'
	id = Column(Integer, primary_key=True, nullable=False)
	name = Column(String(75), nullable=False)
	email = Column(String(60), nullable=False, unique=True)
	passwordhash = Column(String(255), nullable=False) 
	phone = Column(String(15), nullable=False)
	permissions = Column(Enum('volunteer', 'orgmember', 'admin'), nullable=False)
	last_active = Column(DateTime(timezone=False), nullable=True)
	token = Column(String(50))
	birthdate = Column(DateTime)
	bio = Column(String(10000))
	gender = Column(Enum('Male', 'Female', 'Other'))
	__mapper_args__ = {
		'polymorphic_identity':'user',
		'polymorphic_on': permissions
	}
		

	def __repr__(self):
		return "User(%s, %s)" % (self.id, self.name)







	
{'fraction_non_alphanumeric': 0.13378803777544596, 'fraction_numerical': 0.016789087093389297, 'mean_word_length': 6.19622641509434, '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': '1124785', 'n_tokens_mistral': 688, 'n_tokens_neox': 619, 'n_words': 147}