#NEWLINE# def test_drop_add_column3( self ) : #NEWLINE# #INDENT# 'Drop and re-add table columns from table with dropped column' #NEWLINE# stmts = [ CREATE_STMT2 , DROP_COL_STMT ] #NEWLINE# inmap = self . std_map ( ) #NEWLINE# inmap [ 'schema public' ] . update ( { #NEWLINE# #INDENT# 'table t1' : { #NEWLINE# #INDENT# 'columns' : [ { #NEWLINE# #INDENT# 'c2' : { #NEWLINE# #INDENT# 'type' : 'text' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'c3' : { #NEWLINE# #INDENT# 'type' : 'date' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'c4' : { #NEWLINE# #INDENT# 'type' : 'text' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# sql = self . to_sql ( inmap , stmts ) #NEWLINE# assert ( fix_indent ( sql [ 0 ] ) == 'ALTER TABLE t1 ADD COLUMN c3 date' ) #NEWLINE# assert ( fix_indent ( sql [ 1 ] ) == 'ALTER TABLE t1 ADD COLUMN c4 text' ) #NEWLINE# assert ( sql [ 2 ] == 'ALTER TABLE t1 DROP COLUMN c1' )