I see that you changed the type in the table ```user_level``` to serial, but did not update this one.  The ```serial``` type corresponds to ```integer```, so this should be an ```integer```, too, instead of a ```smallint```