<commit_before>from sqlalchemy import Column, Integer, String, Table, relationship, backref
from app.database import Base

callees = Table('callees',
    Column('issue_id', Integer, ForeignKey('issue.id')),
    Column('callee_id', Integer, ForeignKey('callee.id'))
)

class Issue(Base):
	__tablename__ = 'issues'
	id = Column(Integer, primary_key=True)
	name = Column(String(255), unique=False)
	script = Column(String(1024), unique=False)
	callees = relationship('Callee', secondary=callees, backref=backref('issues', lazy='dynamic'))

	def __init__(self, name):
		self.name = name

	def __repr__(self):
		return '<Issue %r>' % self.name

class Callee(Base):
	__tablename__ = 'callees'
	id = Column(Integer, primary_key=True)
	name = Column(String(255), unique=False)

	def __init__(self, name):
		self.name = name

	def __repr__(self):
		return '<Callee %r>' % self.name
<commit_msg>Ugh, many-many.<commit_after>from sqlalchemy import Column, Integer, String, Text, Table, ForeignKey
from sqlalchemy.orm import relationship
from app.database import Base

issue_callees = Table('issue_callees', Base.metadata,
	Column('issue_id', ForeignKey('issue.id'), primary_key=True),
	Column('callee_id', ForeignKey('callee.id'), primary_key=True)
)

class Issue(Base):
	__tablename__ = 'issues'
	id = Column(Integer, primary_key=True)
	name = Column(String(255), unique=False)
	script = Column(Text)
	callees = relationship('Callee', secondary=issue_callees, back_populates='issues')

	def __init__(self, name):
		self.name = name

	def __repr__(self):
		return '<Issue %r>' % self.name

class Callee(Base):
	__tablename__ = 'callees'
	id = Column(Integer, primary_key=True)
	name = Column(String(255), unique=False)
	issues = relationship('Issue', secondary=issue_callees, back_populates='callees')

	def __init__(self, name):
		self.name = name

	def __repr__(self):
		return '<Callee %r>' % self.name

{'fraction_non_alphanumeric': 0.14195250659630607, 'fraction_numerical': 0.008443271767810026, 'mean_word_length': 6.2091254752851714, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1490464', 'n_tokens_mistral': 681, 'n_tokens_neox': 643, 'n_words': 150}