The answer is to create a autoincrement column in tables where I need it.