Registration of local migrants?

Greetings list members . . .
A friend has told me that at some places in Germany in the 1800s people were required to register with local authorities when they migrated into a new place or city, which many people might have done in search of work. Is this true? Did any places in Oldenburg require this, and if so, are any records of such registrations available today?

Many thanks for any information or opinions about this.