{"id":22703931,"url":"https://github.com/2do2go/east-postgres","last_synced_at":"2025-10-10T03:32:41.820Z","repository":{"id":26501036,"uuid":"29953497","full_name":"2do2go/east-postgres","owner":"2do2go","description":"postgres adapter for \"east\"","archived":false,"fork":false,"pushed_at":"2018-02-15T07:07:08.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-13T09:51:49.842Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/2do2go/east-postgres","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/2do2go.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-28T06:10:23.000Z","updated_at":"2017-03-31T14:16:57.000Z","dependencies_parsed_at":"2022-07-24T11:01:59.120Z","dependency_job_id":null,"html_url":"https://github.com/2do2go/east-postgres","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/2do2go/east-postgres","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2do2go%2Feast-postgres","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2do2go%2Feast-postgres/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2do2go%2Feast-postgres/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2do2go%2Feast-postgres/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/2do2go","download_url":"https://codeload.github.com/2do2go/east-postgres/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2do2go%2Feast-postgres/sbom","scorecard":{"id":2931,"data":{"date":"2025-08-11","repo":{"name":"github.com/2do2go/east-postgres","commit":"8ddbe515b76ca6bf2153407edae9cf29a8be2abc"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/16 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":"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":"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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"}}]},"last_synced_at":"2025-08-14T12:57:11.761Z","repository_id":26501036,"created_at":"2025-08-14T12:57:11.761Z","updated_at":"2025-08-14T12:57:11.761Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002624,"owners_count":26083425,"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-10T02:00:06.843Z","response_time":62,"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":[],"created_at":"2024-12-10T08:13:13.338Z","updated_at":"2025-10-10T03:32:41.798Z","avatar_url":"https://github.com/2do2go.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# east postgres\n\npostgresql adapter for [east](https://github.com/okv/east) (node.js database migration tool) which uses \n[node-postgres](https://github.com/brianc/node-postgres)\n\nAll executed migrations names will be stored at `_migrations` table in the\ncurrent database. Object with following properties will be passed to `migrate`\nand `rollback` functions:\n\n* `db` - instance of [node-postgres](https://github.com/brianc/node-postgres/wiki/Client)\n\n\n## Installation\n\n```sh\nnpm install east east-postgres -g\n```\n\nalternatively you could install it locally\n\n\n## Usage\n\ngo to project dir and run\n\n```sh\neast init\n```\n\ncreate `.eastrc` file at current directory\n\n```js\n{\n\t\"adapter\": \"east-postgres\",\n\t\"url\": \"postgres://user:password@127.0.0.1:5432/database\"\n}\n```\n\nwhere `url` is url for connect to postgresql db: \"postgres://someuser:somepassword@somehost:381/sometable\"\n\nnow we can create some migrations\n\n```sh\neast create apples\neast create bananas\n```\n\ncreated files will looks like this one\n\n```js\nexports.migrate = function(client, done) {\n\tvar db = client.db;\n\tdone();\n};\n\nexports.rollback = function(client, done) {\n\tvar db = client.db;\n\tdone();\n};\n```\n\nedit created files and insert  \n\nto 1_apples\n\n```js\nexports.migrate = function(client, done) {\n\tvar db = client.db;\n\tvar sqlStr = 'insert into things values($1, $2, $3)';\n\tdb.run(sqlStr, [1, 'apple', 'red'], function(err) {\n\t\tif (err) return done(err);\n\t\tdb.run(sqlStr, [2, 'apple', 'green'], done);\n\t});\n};\n\nexports.rollback = function(client, done) {\n\tvar db = client.db;\n\tdb.run('delete from things where id in (1, 2)', done);\n};\n```\n\nto 2_bananas\n\n```js\nexports.migrate = function(client, done) {\n\tvar db = client.db;\n\tdb.run('insert into things values($1, $2, $3)', [3, 'banana', 'yellow'], done);\n};\n\nexports.rollback = function(client, done) {\n\tvar db = client.db;\n\tdb.run('delete from things where id=3', done);\n};\n```\n\nnow we can execute our migrations\n\n```sh\neast migrate\n```\n\noutput\n\n```sh\ntarget migrations:\n\t1_apples\n\t2_bananas\nmigrate `1_apples`\nmigration done\nmigrate `2_bananas`\nmigration done\n```\n\nand roll them back\n\n```sh\neast rollback\n```\n\noutput\n\n```sh\ntarget migrations:\n\t2_bananas\n\t1_apples\nrollback `2_bananas`\nmigration successfully rolled back\nrollback `1_apples`\nmigration successfully rolled back\n```\n\nyou can specify one or several particular migrations for migrate/rollback e.g.\n\n```sh\neast migrate 1_apples\n```\n\nor\n\n```sh\neast migrate 1_apples 2_bananas\n```\n\nRun `east -h` to see all commands, `east \u003ccommand\u003e -h` to see detail command help,\nsee also [east page](https://github.com/okv/east#usage) for command examples.\n\n\n## Running test\n\nrun [east](https://github.com/okv/east#running-test) tests with this adapter\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2do2go%2Feast-postgres","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F2do2go%2Feast-postgres","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2do2go%2Feast-postgres/lists"}