#NEWLINE# def recreate_table_dependencies( self , table_name , grant_permissions = True ) : #NEWLINE# #INDENT# 'Recreate the dependencies for a particular table from the database\n        ' #NEWLINE# result = SqlScript ( ) #NEWLINE# for relation in self . relations ( ) : #NEWLINE# #INDENT# if ( relation . full_name == table_name ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if isinstance ( relation , Table ) : #NEWLINE# #INDENT# for ( column_names , ref_name , ref_columns ) in relation . foreign_key_references ( ) : #NEWLINE# #INDENT# if ( ref_name == table_name ) : #NEWLINE# #INDENT# result . append ( relation . foreign_key_reference_script ( source_columns = column_names , reference_name = ref_name , reference_columns = ref_columns ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if isinstance ( relation , View ) : #NEWLINE# #INDENT# if ( table_name in relation . dependencies ) : #NEWLINE# #INDENT# result . append ( relation . recreate_script ( grant_permissions = grant_permissions ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return result