{"id":23332514,"url":"https://github.com/gabts/migratorosaurus","last_synced_at":"2025-10-04T23:29:26.289Z","repository":{"id":42962693,"uuid":"187524405","full_name":"gabts/migratorosaurus","owner":"gabts","description":"An exotically simple database migration tool for Node PostgreSQL!","archived":false,"fork":false,"pushed_at":"2025-09-13T23:34:38.000Z","size":83,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-23T22:59:44.107Z","etag":null,"topics":["database","migration","postgres","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/migratorosaurus","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/gabts.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-19T20:24:18.000Z","updated_at":"2025-09-13T23:34:42.000Z","dependencies_parsed_at":"2024-10-19T03:27:58.817Z","dependency_job_id":null,"html_url":"https://github.com/gabts/migratorosaurus","commit_stats":{"total_commits":72,"total_committers":3,"mean_commits":24.0,"dds":0.06944444444444442,"last_synced_commit":"1b203d3ed0b7014a0020ec5334ecbe22a45dfdaf"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/gabts/migratorosaurus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabts%2Fmigratorosaurus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabts%2Fmigratorosaurus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabts%2Fmigratorosaurus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabts%2Fmigratorosaurus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gabts","download_url":"https://codeload.github.com/gabts/migratorosaurus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabts%2Fmigratorosaurus/sbom","scorecard":{"id":416786,"data":{"date":"2025-08-11","repo":{"name":"github.com/gabts/migratorosaurus","commit":"1b203d3ed0b7014a0020ec5334ecbe22a45dfdaf"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.4,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/24 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T00:08:07.014Z","repository_id":42962693,"created_at":"2025-08-19T00:08:07.014Z","updated_at":"2025-08-19T00:08:07.014Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278388245,"owners_count":25978506,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["database","migration","postgres","typescript"],"created_at":"2024-12-20T23:14:59.282Z","updated_at":"2025-10-04T23:29:26.270Z","avatar_url":"https://github.com/gabts.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e🦖 MIGRATOROSAURUS 🦖\u003c/h1\u003e\n\u003cbr /\u003e\n\nAn exotically simple database migration tool for node [pg](https://www.npmjs.com/package/pg).\n\n## 🌋 Features\n\n- Dead simple, zero config!\n- Write up and down migrations in the same .sql file!\n- Lightweight and easy to integrate into workflows!\n\n## 🌍 Install\n\n```sh\nnpm install --save migratorosaurus\n```\n\nYour environment should also have [pg](https://www.npmjs.com/package/pg) installed and have a [postgres](https://www.postgresql.org/) database setup.\n\n## 🧬 Usage\n\nIn your database migration script file:\n\n```javascript\nconst { migratorosaurus } = require('migratorosaurus');\n\nmigratorosaurus('postgres://localhost:5432/database', {\n  directory: `sql/migrations`,\n  table: 'my_migration_history',\n});\n```\n\nMigration file should be named by the following pattern \u003cindex\u003e-\u003cname\u003e.sql, for example: `1-create.sql`. It is important that file indices are in the correct numerical order. To ease this process you can use the built in cli to create a new migration:\n\n```sh\nmigratorosaurus --directory migrations --name create-person-table\n```\n\nSample migration file contents:\n\n```sql\n-- % up migration % --\nCREATE TABLE person (\n  id SERIAL PRIMARY KEY,\n  name varchar(100) NOT NULL\n);\n\n-- % down migration % --\nDROP TABLE person;\n```\n\nMigrations will be split by up/down comments. Ensure they follow above pattern.\n\n## 👩‍🔬 Configuration\n\nFirst argument is a required pg client configuration.\n\nSecond argument is an optional configuration object.\n\n- **directory** The directory that contains your migation .sql files. Defaults to \"migrations\".\n- **log** Function to handle logging, e.g. console.log.\n- **table** The name of the database table that stores migration history. Default to \"migration_history\".\n- **target** A specific migration that you would like to up/down migrate. Any migrations between the last migrated migration and the target will be up/down migrated as well.\n\n## 🚁 Development\n\nDownload the project repository and initiate development with the following commands:\n\n```sh\ngit clone https://github.com/gabts/migratorosaurus\ncd migratorosaurus\nyarn # installs dependencies\nyarn tsc -w # watch and compile TypeScript on changes\n```\n\n### 🦟 Testing\n\nTo test that any changes did not break the package first ensure that you have a [PostgreSQL](https://www.postgresql.org/) database running. Then run `yarn mocha` with the database connection string as an node env variable.\n\n```sh\nDATABASE_URL=\"postgres://localhost:5432/database\" yarn mocha --verbose\n```\n\n## ☄️ License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabts%2Fmigratorosaurus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabts%2Fmigratorosaurus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabts%2Fmigratorosaurus/lists"}