Support for unsigned integers
Does Drizzle ORM support defining unsigned integers in the schema?
sql operator?db push, it warned me that it didn't have a default va...SERIAL is an alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE. So if you have serial as your table id, whenever you need to reference it in a foreign key constraint on another table, you'll need to create a BIGINT UNSIGNED for it.db pushSERIALBIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUEBIGINT UNSIGNEDconst unsignedInt = customType<{
data: number;
// I also tried this ↓ https://orm.drizzle.team/docs/custom-types#examples
// notNull: true;
// default: true;
}>({
dataType() {
return 'int unsigned';
},
});