"""fromdjango.db.models.fieldsimportAutoFieldclassUnsignedBigIntAutoField(AutoField):""" An unsigned 8-byte integer for auto-incrementing primary keys. """defdb_type(self,connection):ifconnection.settings_dict['ENGINE']=='django.db.backends.mysql':return"bigint UNSIGNED AUTO_INCREMENT"elifconnection.settings_dict['ENGINE']=='django.db.backends.sqlite3':# Sqlite will only auto-increment the ROWID column. Any INTEGER PRIMARY KEY column# is an alias for that (https://www.sqlite.org/autoinc.html). An unsigned integer# isn't an alias for ROWID, so we have to give up on the unsigned part.return"integer"