#NEWLINE# @ classmethod #NEWLINE# def define_tables( cls , metadata ) : #NEWLINE# #INDENT# Table ( 'foo' , metadata , Column ( 'id' , Integer , primary_key = True ) , Column ( 'type' , String ( 50 ) ) , Column ( 'related_id' , Integer , ForeignKey ( 'related.id' ) ) ) #NEWLINE# Table ( 'bar' , metadata , Column ( 'id' , Integer , ForeignKey ( 'foo.id' ) , primary_key = True ) ) #NEWLINE# Table ( 'baz' , metadata , Column ( 'id' , Integer , ForeignKey ( 'foo.id' ) , primary_key = True ) ) #NEWLINE# Table ( 'related' , metadata , Column ( 'id' , Integer , primary_key = True ) )