[[ secondary.name ]] = db.Table('[[ secondary.name|camel_to_snake ]]', [%- for column in secondary.columns %] db.Column('[[ column.name ]]_id', db.Integer(), db.ForeignKey('[[ column.name ]].id')), [%- endfor %] )