Major Change: Shopify is growing, and so are it's INTs.

Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
30 0 8

As Shopify and our merchants have grown, the sheer amount of data we deal with has grown as well. With that in mind, we've been forced to transition towards ID columns (and ID references) from 32-bit to 64-bit to ensure that we can continue to issue unique IDs.

MySQL, Ruby on Rails, and most other technologies default ID columns to INT(11). While we're very excited that we're hitting this limitation (problems caused by massive growth are the best problems to have), it is going to require Shopify App and integration developers to make the same transition to ensure compatibility with Shopify in the future.

In short: anywhere you're dealing with an ID from Shopify (whether that's shop_ID, order_ID, or any other ID), you need to be prepared to deal with integers larger than 32-bit datatypes can provide.

If you're a Rails developer, this should help.

Blair, Developer Relations Lead @ Shopify
0 Likes
Shopify Partner
205 0 23

One question: do you use signed or unsigned integers? Some databases (like postgres) only have signed integers.

For rails developers: you need to specify a limit of 8 bytes (64bit) when creating or updating a database column:

class ChangeShopifyIdToBigInt < ActiveRecord::Migration
  def up
    change_column :shops, :shopify_id, :integer, :limit => 8
  end

  def down
    change_column :shops, :shopify_id, :integer
  end
end

HJ

0 Likes