{"id":13989616,"url":"https://github.com/flexxnn/sequelize-auto-migrations","last_synced_at":"2025-05-16T15:06:46.870Z","repository":{"id":21047963,"uuid":"89687851","full_name":"flexxnn/sequelize-auto-migrations","owner":"flexxnn","description":"Migration generator \u0026\u0026 runner for sequelize","archived":false,"fork":false,"pushed_at":"2022-12-08T08:48:50.000Z","size":101,"stargazers_count":261,"open_issues_count":56,"forks_count":170,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-14T03:44:31.623Z","etag":null,"topics":["cli","migrations-generator","mysql","node-module","postgresql","sequelize","sql","sqlite"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flexxnn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-28T08:55:19.000Z","updated_at":"2025-05-06T16:20:36.000Z","dependencies_parsed_at":"2023-01-11T21:04:10.058Z","dependency_job_id":null,"html_url":"https://github.com/flexxnn/sequelize-auto-migrations","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexxnn%2Fsequelize-auto-migrations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexxnn%2Fsequelize-auto-migrations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexxnn%2Fsequelize-auto-migrations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexxnn%2Fsequelize-auto-migrations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flexxnn","download_url":"https://codeload.github.com/flexxnn/sequelize-auto-migrations/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254553959,"owners_count":22090417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","migrations-generator","mysql","node-module","postgresql","sequelize","sql","sqlite"],"created_at":"2024-08-09T13:01:51.097Z","updated_at":"2025-05-16T15:06:46.843Z","avatar_url":"https://github.com/flexxnn.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# sequelize-auto-migrations\nMigration generator \u0026amp;\u0026amp; runner for sequelize\n\nThis package provide two tools:\n* `makemigration` - tool for create new migrations\n* `runmigration` - tool for apply created by first tool migrations\n\n## Install\n`npm install sequelize-auto-migrations`\n\n## Usage\n* Init sequelize, with sequelize-cli, using `sequelize init`\n* Create your models\n* Create initial migration - run:\n\n`makemigration --name \u003cmigration name\u003e`\n* Change models and run it again, model difference will be saved to the next migration\n\nTo preview new migration, without any changes, you can run:\n\n`makemigration --preview`\n\n`makemigration` tool creates `_current.json` file in `migrations` dir, that is used to calculate difference to the next migration. Do not remove it!\n\nTo create and then execute migration, use:\n`makemigration --name \u003cname\u003e -x`\n\n## Executing migrations\n* There is simple command to perform all created migrations (from selected revision):\n\n`runmigration`\n* To select a revision, use `--rev \u003cx\u003e`\n* If migration fails, you can continue, use `--pos \u003cx\u003e`\n* To prevent execution next migrations, use `--one`\n\n\nFor more information, use `makemigration --help`, `runmigration --help`\n\n## TODO:\n* Migration action sorting procedure need some fixes. When many foreign keys in tables, there is a bug with action order. Now, please check it manually (`--preview` option)\n* Need to check (and maybe fix) field types: `BLOB`, `RANGE`, `ARRAY`, `GEOMETRY`, `GEOGRAPHY`\n* Downgrade is not supported, add it\n* This module tested with postgresql (I use it with my projects). Test with mysql and sqlite.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflexxnn%2Fsequelize-auto-migrations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflexxnn%2Fsequelize-auto-migrations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflexxnn%2Fsequelize-auto-migrations/lists"}