def get_sync_sql(self, field_name, db_change_langs, model, db_table_fields):
qn = connection.ops.quote_name<EOL>style = no_style()<EOL>sql_output = []<EOL>db_table = model._meta.db_table<EOL>was_translatable_before = self.was_translatable_before(field_name, db_table_fields)<EOL>default_f = self.get_default_field(field_name, model)<EOL>default_f_required = default_f and self.get_field_required_in_db(db_table,<EOL>default_f.name,<EOL>value_not_implemented=False)<EOL>for lang in db_change_langs:<EOL><INDENT>new_field = get_real_fieldname(field_name, lang)<EOL>try:<EOL><INDENT>f = model._meta.get_field(new_field)<EOL>col_type = self.get_type_of_db_field(field_name, model)<EOL>field_column = f.column<EOL><DEDENT>except FieldDoesNotExist:  <EOL><INDENT>field_column = new_field<EOL>col_type = self.get_type_of_db_field(field_name, model)<EOL><DEDENT>field_sql = [style.SQL_FIELD(qn(field_column)), style.SQL_COLTYPE(col_type)]<EOL>alter_colum_set = '<STR_LIT>' % qn(field_column)<EOL>if default_f:<EOL><INDENT>alter_colum_drop = '<STR_LIT>' % qn(field_column)<EOL><DEDENT>not_null = style.SQL_KEYWORD('<STR_LIT>')<EOL>if '<STR_LIT>' in backend.__name__:<EOL><INDENT>alter_colum_set = '<STR_LIT>' % (qn(field_column), col_type)<EOL>not_null = style.SQL_KEYWORD('<STR_LIT>')<EOL>if default_f:<EOL><INDENT>alter_colum_drop = '<STR_LIT>' % (qn(field_column), col_type)<EOL><DEDENT><DEDENT>if not new_field in db_table_fields:<EOL><INDENT>sql_output.append("<STR_LIT>" % (qn(db_table), '<STR_LIT:U+0020>'.join(field_sql)))<EOL><DEDENT>if lang == self.default_lang and not was_translatable_before:<EOL><INDENT>sql_output.append("<STR_LIT>" % (qn(db_table),qn(field_column), qn(field_name)))<EOL>if not f.null:<EOL><INDENT>sql_output.append("<STR_LIT>" %(qn(db_table), alter_colum_set,style.SQL_KEYWORD('<STR_LIT>')))<EOL><DEDENT><DEDENT>elif default_f and not default_f.null:<EOL><INDENT>if lang == self.default_lang:<EOL><INDENT>f_required = self.get_field_required_in_db(db_table,<EOL>field_column,<EOL>value_not_implemented=False)<EOL>if default_f.name == new_field and default_f_required:<EOL><INDENT>continue<EOL><DEDENT>if not f_required:<EOL><INDENT>sql_output.append(("<STR_LIT>"<EOL>"<STR_LIT>" %  <EOL>{'<STR_LIT>': qn(db_table),<EOL>'<STR_LIT>': qn(field_column),<EOL>'<STR_LIT>': self.get_value_default(),<EOL>'<STR_LIT:null>': style.SQL_KEYWORD('<STR_LIT>'),<EOL>}))<EOL>sql_output.append("<STR_LIT>" %(qn(db_table), alter_colum_set,style.SQL_KEYWORD('<STR_LIT>')))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>f_required = self.get_field_required_in_db(db_table,<EOL>field_column,<EOL>value_not_implemented=True)<EOL>if f_required:<EOL><INDENT>sql_output.append(("<STR_LIT>" % <EOL>(qn(db_table), alter_colum_drop, not_null)))<EOL><DEDENT><DEDENT><DEDENT><DEDENT>if not was_translatable_before:<EOL><INDENT>sql_output.append("<STR_LIT>" % (qn(db_table), qn(field_name)))<EOL><DEDENT>return sql_output<EOL>
returns SQL needed for sync schema for a new translatable field