The column you are partitioning on must be part of the primary key of the table, and I believe, it must be the last column in the primary key. So, if you were to define your primary key as PRIMARY KEY (id
, uniqueID
), you should be able to partition on uniqueID.
That being said, given that your uniqueID field is a bigint and you are trying to partition based on the bigint being less than a string, I'm not sure what you are trying to do will work as desired. Perhaps using hash partitioning rather than range partitioning would be more use to you? For more details see https://dev.mysql.com/doc/refman/5.1/en/partitioning-hash.html