title: sails.js -postgresql returning string value instead of integer for bigint fields
body: <p>We are migrating a project from PHP to Node.js using Sails.js as the backend framework. We cannot modify our database and have to use the existing database for this project.</p>
  
  <p>If I keep the <code>migrate: "alter"</code> for a newly created model, Sails by default will keep the <code>id</code> field as an integer.</p>
  
  <p>However, for our existing database, <code>id</code> fields are mostly <code>bigint</code>. So I defined <code>migrate: "safe"</code> and proceeded with the model creation. </p>
  
  <p>Now the problem I am facing is that when blueprint routes return the result, the id column value, which should be returned as a number, is being returned as a string instead. Here is an example:</p>
  
  <pre><code>[
    {
      "starttime": "07:00:00",
      "endtime": "14:00:00",
      "id": "1"
    },
    {
      "starttime": "14:00:00",
      "endtime": "22:00:00",
      "id": "2"
    },
    {
      "starttime": "22:00:00",
      "endtime": "07:00:00",
      "id": "3"
    }
  ]
  </code></pre>
  
  <p>How can I fix this issue?</p>
  
  <p>Here is my model:</p>
  
  <pre><code>module.exports = {
    tableName: "timeslots",
    autoCreatedAt: false,
    autoUpdatedAt: false,
    attributes: {
      starttime: { type: "string", required: true },
      endtime: { type: "string", required: true }
    }
  };
  </code></pre>
  
  <p>And here is the postgresql table definition</p>
  
  <pre><code>                                              Table "public.timeslots"
    Column   |  Type  |                       Modifiers                        | Storage  | Stats target | Description 
  -----------+--------+--------------------------------------------------------+----------+--------------+-------------
   id        | bigint | not null default nextval('timeslots_id_seq'::regclass) | plain    |              | 
   starttime | text   | not null                                               | extended |              | 
   endtime   | text   | not null                                               | extended |              | 
  Indexes:
      "idx_43504_primary" PRIMARY KEY, btree (id)
  Referenced by:
      TABLE "doctortimeslot" CONSTRAINT "doctortimeslot_ibfk_2" FOREIGN KEY (timeslot_id) REFERENCES timeslots(id) ON UPDATE CASCADE ON DELETE CASCADE
  </code></pre>