{"id":17355140,"url":"https://github.com/zephinzer/themigrator","last_synced_at":"2025-03-27T14:17:02.471Z","repository":{"id":79926682,"uuid":"238586867","full_name":"zephinzer/themigrator","owner":"zephinzer","description":"Forward looking migrator that only goes one way - UP!","archived":false,"fork":false,"pushed_at":"2020-02-08T18:16:28.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T18:27:09.000Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/zephinzer.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":"2020-02-06T01:53:48.000Z","updated_at":"2020-02-08T18:12:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"b8b49805-6094-41c1-86da-39f8fe1467a7","html_url":"https://github.com/zephinzer/themigrator","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zephinzer%2Fthemigrator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zephinzer%2Fthemigrator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zephinzer%2Fthemigrator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zephinzer%2Fthemigrator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zephinzer","download_url":"https://codeload.github.com/zephinzer/themigrator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245858880,"owners_count":20684062,"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":[],"created_at":"2024-10-15T17:42:27.350Z","updated_at":"2025-03-27T14:17:02.452Z","avatar_url":"https://github.com/zephinzer.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `themigrator`\n\n[![pipeline status](https://gitlab.com/zephinzer/themigrator/badges/master/pipeline.svg)](https://gitlab.com/zephinzer/themigrator/-/commits/master)\n[![Build Status](https://travis-ci.org/zephinzer/themigrator.svg?branch=master)](https://travis-ci.org/zephinzer/themigrator)\n\nForward looking migrator that only goes one way - UP!\n\n\u003e Note: Still a WIP\n\n\n- - -\n\n\n## Usage\n\n### Principles\n\n#### Never look back in regret - move on to the next thing\n\nThis migrator was made with only forward migrations in mind.\n\n### CLI\n\n#### `themigrator -h`: Get help on the CLI\n\nUse this when all seems lost and all you have is a terminal\n\n#### `themigrator init -d db_name`: Initialise the migration table\n\nUse this to initialise the database schema in the database\n\n#### `themigrator verify connection`: Verifies database credentials\n\nUse this to verify that the database credentials passed to `themigrator` works\n\n#### `themigrator verify migrations -d db_name ./path/to/migrations`: Verifies migrations integrity\n\nUse this to verify the integrity of the local and remote migrations\n\n#### `themigrator apply ./path/to/migrations -d db_name`: Show the migrations to be applied\n\nUse this to view the migrations planned\n\n#### `themigrator apply ./path/to/migrations -d db_name --confirm`: Apply migrations\n\nUse this to apply the migrations\n\n\n### Flags\n\n#### `--help`, `-h`\n\nDisplays the help message for the CLI\n\n#### `--user`, `-u`\n\nUser to use to login to the database\n\n#### `--password`, `-p`\n\nPassword of the user used to use to login to the database\n\n#### `--host`, `-H`\n\nHostname where the database service is reachable at\n\n#### `--port`, `-P`\n\nPort which the database service is listening on\n\n#### `--database`, `-d`\n\nName of the database to apply the migrations to\n\n#### `--log-level`, `-l`\n\n\u003e This is a **global flag**\n\nA number from 0 to 5 indicating the verbosity of logs.\n\n- 0 silences the logs\n- 1 outputs logs at only the `error` level\n- 2 outputs logs at the `warning` level and above\n- 3 outputs logs at the `info` level and above\n- 4 outputs logs at the `debug` level and above\n- 5 outputs logs at the `trace` level and above\n\n#### `--log-format`, `-f`\n\n\u003e This is a **global flag**\n\nOne of `\"json\"` or `\"text\"`. Defaults to `\"text\"`.\n\n\n\n- - -\n\n\n## Development\n\n### Setting up\n\nTHe `init` recipe in the `Makefile` will set up an environment with MySQL and MariaDB instances.\n\n### Shell access to the database\n\nTo get a shell to the MySQL database, use `make check_mysql`.\n\nTo get a shell to the Maria database, use `make check_maria`.\n\n### Manual Testing\n\n- There are sample migrations located at `./test/migrations`\n\n### Tearing down\n\nThe `denit` recipe in the `Makefile` should do the job.\n\n\n- - -\n\n\n## Licensing\n\nCode is licensed under [the MIT license](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzephinzer%2Fthemigrator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzephinzer%2Fthemigrator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzephinzer%2Fthemigrator/lists"}