#NEWLINE# @ classmethod #NEWLINE# def define_tables( cls , metadata ) : #NEWLINE# #INDENT# Table ( 'base' , metadata , Column ( 'id' , Integer , primary_key = True , test_needs_autoincrement = True ) , Column ( 'type' , String ( 30 ) ) ) #NEWLINE# Table ( 'sub' , metadata , Column ( 'id' , Integer , ForeignKey ( 'base.id' ) , primary_key = True ) ) #NEWLINE# Table ( 'related' , metadata , Column ( 'id' , Integer , primary_key = True , test_needs_autoincrement = True ) , Column ( 'sub_id' , Integer , ForeignKey ( 'sub.id' ) ) )