(self, curs, new_name = None)
return sql
Generate creation SQL.
Generate creation SQL.
Generate creation SQL .
def get_create_sql(self, curs, new_name = None):
        """Generate creation SQL."""
        tbl = new_name or self.table_name
        sql = "ALTER TABLE ONLY %s ALTER COLUMN %s\n  SET DEFAULT %s;" % (
                quote_fqident(tbl), quote_ident(self.name), self.expr)
        return sql
def get_create_sql ( self , curs , new_name = None ) : tbl = new_name or self . table_name sql = "ALTER TABLE ONLY %s ALTER COLUMN %s\n  SET DEFAULT %s;" % ( quote_fqident ( tbl ) , quote_ident ( self . name ) , self . expr ) return sql