Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
default export (migration template)
✓ module.exports = (Parse) => { ... }
Migration files export a function that receives the Parse instance. Use CommonJS module.exports, not ES modules.
Parse.Schema
✓ let schema = new Parse.Schema('ClassName'); schema.addField('name', 'String'); schema.save();
✗ Parse.Schema.addField('name', 'String');
Parse.Schema is a constructor; you must instantiate it per class. Methods like addField, deleteField return promises or use callbacks.
Parse.Object (for seeders)
✓ let obj = new Parse.Object('ClassName'); obj.set('field', 'value'); await obj.save();
✗ let obj = new Parse.Object(); obj.save();
Seeders create Parse.Object instances. Always use the class name in constructor. Requires async/await or .then().
Shows full workflow: init, create migration, create seeder, and run both using parse-dbtool CLI.
// 1. Initialize folder structure
npx parse-dbtool init
// 2. Set up .env file with Parse Server credentials
// Create a .env file with:
APPLICATION_ID=myAppId
SERVER_URL=http://localhost:1337/parse
MASTER_KEY=myMasterKey
// 3. Create a migration
npx parse-dbtool migration:make create_pet
// 4. Edit generated file databases/migrations/XXXXXXXXXXXXXX-create_pet.js:
'use strict';
module.exports = {
up: async (Parse) => {
const schema = new Parse.Schema('Pet');
schema.addField('name', 'String');
schema.addField('species', 'String');
await schema.save();
},
down: async (Parse) => {
const schema = new Parse.Schema('Pet');
await schema.delete();
}
};
// 5. Run migration
npx parse-dbtool migrate
// 6. (Optional) Create a seeder
npx parse-dbtool seed:make seed_pets
// Edit databases/seeders/XXXXXXXXXXXXXX-seed_pets.js:
'use strict';
module.exports = {
up: async (Parse) => {
const pet1 = new Parse.Object('Pet');
pet1.set('name', 'Fluffy');
pet1.set('species', 'Cat');
await pet1.save();
const pet2 = new Parse.Object('Pet');
pet2.set('name', 'Buddy');
pet2.set('species', 'Dog');
await pet2.save();
},
down: async (Parse) => {
const query = new Parse.Query('Pet');
const pets = await query.find({ useMasterKey: true });
await Parse.Object.destroyAll(pets, { useMasterKey: true });
}
};
// 7. Run seeder
npx parse-dbtool db:seed
parse-dbtool --version
Errors
Common errors & fixes
Error: Parse is not defined
The migration/seed function expects Parse as argument, but code references Parse without using the parameter.
fixEnsure up/down functions accept Parse parameter and use it instead of a global Parse.
Cannot find module 'databases/migrations/...'
Migration file not found; usually due to wrong working directory or missing 'init' step.
fixRun 'npx parse-dbtool init' first to create the folder structure, then ensure you are in the project root.
Error: Invalid schema: class name must not be empty
Trying to create or modify a schema without specifying a valid class name.
fixAlways provide a non-empty class name to new Parse.Schema('ClassName'). Audit
Dependencies
No dependency data recorded yet.