Version 0.8.0 introduced breaking changes by merging User models and the profiles collection into a unified 'auth' collection system. This allows for multiple auth collections with custom fields.
Data Migration
To migrate your database, use the upgrade command. Always back up your pb_data directory before proceeding.
# 1. Backup your data
cp -r ./pb_data ./pb_data_backup
# 2. Run the upgrade command
./pocketbase08 upgrade
# 3. Start the application
./pocketbase08 serve
What the upgrade command does:
- Creates a new
users collection by merging _users and profiles. - Converts
user type fields to relation fields. - Updates filters:
@collection.profiles.* and @request.user.* become @collection.users.* and @request.auth.*. - Appends
2 to schema field names and API filter rules that conflict with new system reserved names (e.g., collectionId becomes collectionId2).
# make sure to have a copy of your pb_data in case something fails
cp -r ./pb_data ./pb_data_backup
# run the upgrade command
./pocketbase08 upgrade
# start the application as usual
./pocketbase08 serve