Project

General

Profile

« Previous | Next » 

Revision 4442

sql_gen.py: is_text_col(): Also consider character varying to be a text type

View differences:

lib/sql_gen.py
1032 1032

  
1033 1033
##### Database structure
1034 1034

  
1035
def is_text_col(db, col): return db.col_info(col).type == 'text'
1035
text_types = set(['character varying', 'text'])
1036 1036

  
1037
def is_text_col(db, col): return db.col_info(col).type in text_types
1038

  
1037 1039
ensure_not_null_excs = (NoUnderlyingTableException, KeyError)
1038 1040

  
1039 1041
def ensure_not_null(db, col, type_=None):

Also available in: Unified diff