{"id":47747,"library":"generator-realm-migration","title":"Realm Migration Generator","description":"A Yeoman generator for creating linear migration objects for Realm JS projects. Current version 1.1.7. It scaffolds migration directories with previous object schemas, migration functions, and schema version tracking. Key differentiator: automates the boilerplate for Realm migrations, reducing manual error. Release cadence is low; appears to be in maintenance mode. Integrates with Yeoman and requires a React Native setup with Realm.","status":"maintenance","version":"1.1.7","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","yeoman-generator","realm-js","react-native","migration","linear"],"install":[{"cmd":"npm install generator-realm-migration","lang":"bash","label":"npm"},{"cmd":"yarn add generator-realm-migration","lang":"bash","label":"yarn"},{"cmd":"pnpm add generator-realm-migration","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required to run the generator commands (yo realm-migration)","package":"yeoman-generator","optional":false},{"reason":"Realm database dependency for migrations","package":"realm","optional":true}],"imports":[{"note":"The package exposes a Yeoman generator, not a direct function. Use the CLI via 'yo realm-migration'.","wrong":"const generateMigration = require('generator-realm-migration')","symbol":"generateMigration","correct":"import { generateMigration } from 'generator-realm-migration/generators/app'"},{"note":"Corresponding import for the init subgenerator.","wrong":"const initMigration = require('generator-realm-migration/init')","symbol":"initMigration","correct":"import { initMigration } from 'generator-realm-migration/generators/init'"}],"quickstart":{"code":"// Ensure Yeoman is installed globally first: npm i -g yo\n// Install generator-realm-migration as a dev dependency\nnpm i --save generator-realm-migration\n// Initialize migrations directory\nyo realm-migration:init\n// After adding models, run the default generator\nyo realm-migration --schemaDesc=\"updated_dog_schema\"","lang":"javascript","description":"Install and use the generator to set up Realm linear migrations in a React Native project."},"warnings":[{"fix":"Ensure each model file exports the Object class with the same name as the file (without extension).","message":"Requires a 'models' directory with Realm Object classes that have named exports matching file names.","severity":"gotcha","affected_versions":"*"},{"fix":"Accept the prompt; it is a side effect of the generator's process.","message":"The default command will prompt to delete a temp directory used for transpilation. This is normal but may confuse users.","severity":"gotcha","affected_versions":"*"},{"fix":"Do not manually edit migrations/index.js; treat it as auto-generated.","message":"The generator overwrites 'migrations/index.js' each time, which may cause loss of custom modifications.","severity":"gotcha","affected_versions":"*"},{"fix":"Run 'npm i -g yo' before using the generator.","message":"Yeoman must be installed globally; otherwise 'yo' command will not be found.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"search_vec":"'1.1.7':18 'appear':48 'autom':35 'boilerpl':37 'cadenc':45 'creat':8 'current':16 'differenti':34 'directori':22 'error':43 'function':28 'generat':3,6,68 'integr':54 'javascript':65 'js':14,71 'key':33 'linear':9,76 'low':47 'mainten':52 'manual':42 'migrat':2,10,21,27,40,75 'mode':53 'nativ':61,74 'object':11,25 'previous':24 'project':15 'react':60,73 'react-nat':72 'realm':1,13,39,64,70 'realm-j':69 'reduc':41 'releas':44 'requir':58 'scaffold':20 'schema':26,30 'setup':62 'track':32 'version':17,31 'yeoman':5,56,67 'yeoman-gener':66","created_at":"2026-06-07T16:53:06.951261+00:00","updated_at":"2026-06-07T16:53:06.951261+00:00","problems":[{"fix":"Check that models directory exists and contains the expected file, or specify correct --modelDir option.","cause":"Missing model file in models directory or wrong directory path.","error":"Error: Could not find model file: Dog.js"},{"fix":"Run the generator again with admin privileges or manually delete the temp directory.","cause":"Permissions issue or file lock preventing deletion of temp directory.","error":"Error: Temp directory deletion failed"},{"fix":"Ensure generator-realm-migration is installed in the project: npm i --save generator-realm-migration","cause":"Generator not installed or not found by Yeoman.","error":"Error: Cannot find module 'generator-realm-migration'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://gitlab.com/509dave16/generator-realm-migration#README","github":null,"docs":null,"changelog":null,"pypi":null,"npm":"generator-realm-migration","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}