{"id":15295779,"url":"https://github.com/dlevsha/nasgrate","last_synced_at":"2025-04-13T18:22:57.971Z","repository":{"id":36595494,"uuid":"40901520","full_name":"dlevsha/nasgrate","owner":"dlevsha","description":"Database migration tool","archived":false,"fork":false,"pushed_at":"2023-09-01T10:34:19.000Z","size":287,"stargazers_count":29,"open_issues_count":1,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-27T09:11:23.526Z","etag":null,"topics":["database-changes","database-migrations","database-schema","database-tools","mysql-database"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/dlevsha.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-08-17T14:29:57.000Z","updated_at":"2024-12-16T11:36:26.000Z","dependencies_parsed_at":"2024-11-15T05:33:19.461Z","dependency_job_id":null,"html_url":"https://github.com/dlevsha/nasgrate","commit_stats":{"total_commits":45,"total_committers":1,"mean_commits":45.0,"dds":0.0,"last_synced_commit":"77c37eaf292b54e2ca01dce2b8320a19366afd74"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlevsha%2Fnasgrate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlevsha%2Fnasgrate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlevsha%2Fnasgrate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlevsha%2Fnasgrate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dlevsha","download_url":"https://codeload.github.com/dlevsha/nasgrate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248759136,"owners_count":21157097,"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":["database-changes","database-migrations","database-schema","database-tools","mysql-database"],"created_at":"2024-09-30T18:08:10.521Z","updated_at":"2025-04-13T18:22:57.949Z","avatar_url":"https://github.com/dlevsha.png","language":"PHP","readme":"README\n======\n\nWhat is Nasgrate?\n-----------------\n\nNasgrate is a console utility that let you organise database schema migration process at a consistent and easy way.\nIt supports mysql, mssql, postgresql, oracle and other databases (you can find informaton [here](http://php.net/manual/en/pdo.drivers.php) )\n\nThe key features:\n\n- native SQL syntaxes for migrations\n- automatically generates migrations based on saved database states (you don't need to write migrations yourself, for MySQL database only, but I plan to add support for PostgreSQL, MS SQL and Oracle databases later). \n- user-friendly interface to view saved migrations\n\nRequirements\n------------\n\nNasgrate is only supported by PHP 5.3.0 and up with PDO extension.\n\nUse Docker (preferred)\n------------\nThe easiest way to use Nasgrate is to use Docker.\n\nYou can build your own container using Dockerfile or use Docker Hub image:\n\n```bash \n$ docker run -it --rm -v $(pwd)/data:/usr/src/nasgrate/data  \\\n-e DATABASE_DRIVER=mysql  \\\n-e DATABASE_HOST=host.docker.internal  \\\n-e DATABASE_NAME=[database name]  \\\n-e DATABASE_USER=[database user]  \\\n-e DATABASE_PASSWORD=[database password]  \\\n-e DATABASE_PORT=[database port]  \\\n-e VERSION_TABLE_NAME=__migrationVersions  \\\n-e DIR_MIGRATION=data/migrations  \\\n-e DIR_DBSTATE=data/dbstate  \\\n-e DEFAULT_DESCRIPTION_MESSAGE='Created by CURRENT_USER, CURRENT_DATE'  \\\n-e CURRENT_USER=[your name] \\\ndlevsha/nasgrate generate MyFirstMigration\n```\n\nYou need to change variables for your own\n\n`$(pwd)/data` will contain your migration files and current database state\n\nYou can also use `.env` file (please see `.env.example`). In this case you can use one line command\n\n```bash\n$ docker run -it --rm -v $(pwd)/data:/usr/src/nasgrate/data --env-file=.env dlevsha/nasgrate generate MyFirstMigration\n```\n\nPlease remember:\n\n- if you want to connect to your local database, use special docker variable `host.docker.internal` (for Mac and Windows user).\n- if you want to use `Nasgrate` with your existing docker network (for example created with docker-compose) you need to connect to container __inside__ your docker network. \nTo do this first run `docker network ls` command and find you network name. \n\n```\nNETWORK ID     NAME             DRIVER    SCOPE\n27feae2bb848   bridge           bridge    local\n6ef8cb27a7fd   docker_default   bridge    local\nd2f3d581bf31   host             host      local\n318fd5030260   none             null      local\n```\nFor example, I use `docker_default` network inside my application and you need to add `--net=docker_default` parameter to you command\n\nThe second thing - you need to know your database container IP in order to connect to it.\n\nPlease run `docker exec [your database container name] cat /etc/hosts`. \nUsually the last line will show the IP address\n\n```\n127.0.0.1\tlocalhost\n::1\tlocalhost ip6-localhost ip6-loopback\nfe00::0\tip6-localnet\nff00::0\tip6-mcastprefix\nff02::1\tip6-allnodes\nff02::2\tip6-allrouters\n172.25.0.3\t980280f59bd3\n```\n\nIn my case IP is `172.25.0.3` and my command will be \n\n```bash \n$ docker run -it --rm -v $(pwd)/data:/usr/src/nasgrate/data \\ \n--net=docker_default  \\\n-e DATABASE_DRIVER=mysql  \\\n-e DATABASE_HOST=172.25.0.3  \\\n-e DATABASE_NAME=[database name]  \\\n-e DATABASE_USER=[database user]  \\\n-e DATABASE_PASSWORD=[database password]  \\\n-e DATABASE_PORT=[database port]  \\\n-e VERSION_TABLE_NAME=__migrationVersions  \\\n-e DIR_MIGRATION=data/migrations  \\\n-e DIR_DBSTATE=data/dbstate  \\\n-e DEFAULT_DESCRIPTION_MESSAGE='Created by CURRENT_USER, CURRENT_DATE'  \\\n-e CURRENT_USER=[your name] \\\ndlevsha/nasgrate generate MyFirstMigration\n```\n\nYou can run this line to obtain current ip \n\n```bash\ndocker exec [mysql container name] cat /etc/hosts | tail -n 1 | cut -d$'\\t' -f 1\n```\n\nYou can also run bin/migration.sh script (please change params inside it)\n\n```bash\n./migration.sh help\n```\n\nAnother option is you can view all transactions (executed and non-executed) via web interface. Just run command\n\n```bash \n$ docker run -it --rm -v $(pwd)/data:/usr/src/nasgrate/data \\ \n-e DATABASE_DRIVER=mysql  \\\n-e DATABASE_HOST=host.docker.internal  \\\n-e DATABASE_NAME=[database name]  \\\n-e DATABASE_USER=[database user]  \\\n-e DATABASE_PASSWORD=[database password]  \\\n-e DATABASE_PORT=[database port]  \\\n-e VERSION_TABLE_NAME=__migrationVersions  \\\n-e DIR_MIGRATION=data/migrations  \\\n-e DIR_DBSTATE=data/dbstate  \\\n-e DEFAULT_DESCRIPTION_MESSAGE='Created by CURRENT_USER, CURRENT_DATE'  \\\n-e CURRENT_USER=[your name] \\\n-p 9001:9000 \\\n--entrypoint php \\\ndlevsha/nasgrate -S localhost:9000  \n```\nor (if you use .env file)\n\n\tdocker run -it --rm -v $(pwd)/data:/usr/src/nasgrate/data --env-file=docker/nasgrate/.env -p 9001:9000 --entrypoint php dlevsha/nasgrate -S 0.0.0.0:9000 \n\nand type in your browser `http://localhost:9001/app/`.\n\nYou'll see your migrations\n\n![Migrations list](https://cloud.githubusercontent.com/assets/1639576/12373875/dbb39fc4-bc9a-11e5-9d54-202e7c221bb5.png)\n\n\nInstallation\n------------\n\nClone project from GitHub\n\n```bash\n$ git clone https://github.com/dlevsha/nasgrate.git\n$ cd nasgrate\n```\n\nor use composer\n\t\n    $ composer require dlevsha/nasgrate\t\n\t\nRename `.env.example` to `.env` and change your settings:\n\n```ini\n# [Primary connection params]\n# possible drivers: 'mysql' - MySQL database, 'sqlsrv' - MS SQL Server and SQL Azure databases\n# 'mssql' - FreeTDS, 'pgsql' - PostgreSQL, 'oci' - Oracle\nDATABASE_DRIVER=mysql\n# you can use special variable 'host.docker.internal' for docker\nDATABASE_HOST=127.0.0.1\nDATABASE_NAME=testdb\nDATABASE_USER=testuser\nDATABASE_PASSWORD=testdbpass\nDATABASE_PORT=3306\n\n# [Migration params]\nVERSION_TABLE_NAME=__migrationVersions\nFILE_EXTENSION=sql\nDIR_MIGRATION=DIR_ROOT/data/migrations\nDEFAULT_DESCRIPTION_MESSAGE=Created by CURRENT_USER, CURRENT_DATE\n\n# [Database version control]\nDIR_DBSTATE=DIR_ROOT/data/dbstate\n# possible values - file / database\nVERSION_CONTROL_STRATEGY=file\n\n\n# --------------------------------------------------------------------\n# This params need only if you use second database as data source\n# to compare database structure. Please read documentation.\n#[Secondary connection params]\nDATABASE_HOST_SECONDARY=localhost\nDATABASE_NAME_SECONDARY=test\nDATABASE_USER_SECONDARY=root\nDATABASE_PASSWORD_SECONDARY=\nDATABASE_PORT_SECONDARY=\n```\n`[Primary connection params]` section describes connection settings\n\t\n`DATABASE_DRIVER` - set one of the drivers which is supported by PHP PDO extension\n\n* mysql - MySQL database\n* sqlsrv - MS SQL Server and SQL Azure databases\n* mssql - FreeTDS\n* pgsql - PostgreSQL\n* oci - Oracle \n\nYou can find more information at official [PHP PDO documentation](http://php.net/manual/en/pdo.drivers.php) \n\n`DATABASE_HOST` - database host name or IP\n\n`DATABASE_NAME` - database name\n\n`DATABASE_USER` and `DATABASE_PASSWORD` - login and password to access your database\n\n`DATABASE_PORT` - the port number where the database server is listening (not required if using standard port)\n\nNext section `[Migration params]` describes how the script stores information about migrations\n\n`VERSION_TABLE_NAME` - name of a table, where migration script stores service information\n\n`FILE_EXTENSION` - migration file extension (by default `sql`)\n\n`DIR_MIGRATION`  - where script stores migration files. By default it stores it inside  `migrations` directory. \n\nIf you plan to share your migrations between team members or servers using version control system  (git for example) you need to move this directory to your project folder and change this path.\n\nFor example if you have project in `/var/www/project/` and plan to store migrations in `/var/www/project/service/scripts/migrations` directory, you need to change `DIR_MIGRATION` to\n\n\tDIR_MIGRATION = /var/www/project/service/scripts/migrations\n\n\n`DEFAULT_DESCRIPTION_MESSAGE` - each migration has its own description.\n\nBy default a message looks like `Created by CURRENT_USER, CURRENT_DATE`, where `CURRENT_USER` and `CURRENT_DATE` - is a predefined constant which is changed to user name and current date respectively. So this message becomes `Created by dlevsha, 2020-12-21 17:53:41` in my case.\n\nNext section `[Database version control]` describes version control settings. The most powerful feature of this script is ability to track database changes and automatically create diff file which contains all database changes between migrations. \n\n`VERSION_CONTROL_STRATEGY` - describes which strategy you use to store database changes. There are two possible values - `file` and `database`.\n\nIf you have two databases (`prod` and `test` for example ) and you want to generate diff file which describes differences between databases, your choice will be `database` and you need to feel next section `[Secondary connection params]` which describes  connection settings to reference database.\n\nOr you can set `file` value and script will automatically save database state each time you create migration (in this case you do not need to feel `[Secondary connection params]` section).\n\nYou can check your settings by simply running \n\n\t$ php bin/nasgrate\n\nand you are to see the help page describing base commands\n\n\tNasgrate is a console utility that let you organise database schema migration process at a consistent and easy way.\n\tIt supports mysql, mssql, postgresql, oracle (you can find informaton here http://php.net/manual/en/pdo.drivers.php)\n\t\n\tUsage:\n\t  php nasgrate [command] [options]\n\t\n\tCommand:\n\t  status     - displays migration status\n\t  generate   - creates new migration (migration file)\n\t  diff       - save current database state and create migration with database schema diff\n\t  up:show    - displays (but not executes) SQL-query, executed by migration update\n\t  down:show  - displays (but not executes) SQL-query, executed by migration revert\n\t  up         - executes migration update\n\t  down       - executes migration revert\n\t  help       - shows this help page\n\nIf you use Linux or MacOS for your convenience you can setup nasgrate script\n\nGo to console and run \n\n\t$ chmod +x bin/nasgrate\n\t\nNow you can run Nasgrate by simply typing\n\n\t$ ./bin/nasgrate\t\n\t\nLets check your database connection settings\n\n\t$ ./bin/nasgrate status\n\t\nIf all is ok you will see\n\n\tLast Migration ID:  no migrations\n\tAvailable Migrations: No actual migrations\n\t\nIf you have a connection problem you'll see an error description. For example:\n\n\tDATABASE ERROR :: SQLSTATE[HY000] [1049] Unknown database 'test2'\n\n\t\n\nDocumentation\n-------------\n\n### Create migration\n\nEvery time you create migration - you create `.sql` file having at least two sections: `-- UP --` and `-- DOWN --`.\n\n`-- UP --` section contains SQL-queries that are used to update exist database schema. For example:\n\n```sql\nCREATE TABLE test (\n  id int(11) unsigned NOT NULL AUTO_INCREMENT,\n  PRIMARY KEY (id)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n```\n\t\n`-- DOWN --` method conatains SQL-queries that are used to revert database schema. For example:\n\n```sql\nDROP TABLE test\n```\n\t\nLet's\tcreate our first migration\n\n```bash\n$ ./bin/nasgrate generate CreateTestMigration\n```\n\t\nand it will display \n\t\n\tGenerate new migration ID: 20200821112753_CreateTestMigration\n\tPlease edit file: /migrations/20200821112753_CreateTestMigration.sql\n\t\nBy default migration will be placed in `migrations` directory. You can change this location in `.environment` file at `DIR_MIGRATION` param. \n\nIf you look closely you'll see that migration ID is a timestamp:\n\n`20200821112753` -\u003e `2020-08-21 11:27:53`\n\nThe created file looks like\n\n```sql\n-- Skip: no\n-- Name: Test\n-- Date: 01.12.2020 20:28:08\n-- Description: Created by dlevsha, 2020-12-01 20:28:08\n\n-- UP --\n\n-- DOWN --\n```\n\n`Skip:` - if migration needs to be skiped. Possible values `yes|no`. Default: `no`. Sometimes you need to skip certain migration for any reason. You can do this by setting `Skip:` to `yes`.\n\n`Name:` - your migration name\n\n`Date:` - the date when the file was created\n\n`Description:` - describes current migration\n\n`-- UP --` and `-- DOWN --` section contains SQL-expressions. You can add as many sql queries as you want. Each sql query needs to be at a new line. Each sql query at `-- UP --` section needs to have mirrow sql query at `-- DOWN --` section.\n\nFor example:\n\n```sql\n-- Skip: no\n-- Name: Test\n-- Date: 01.12.2020 20:28:08\n-- Description: The first migration. Created by dlevsha, 2020-12-01 20:28:08\n\n-- UP --\nCREATE TABLE test (\n  id int(11) unsigned NOT NULL AUTO_INCREMENT,\n  PRIMARY KEY (id)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\nCREATE TABLE test2 (\n  id int(11) unsigned NOT NULL AUTO_INCREMENT,\n  PRIMARY KEY (id)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\n-- DOWN --\nDROP TABLE test;\nDROP TABLE test2;\n```\n\n### Create migration (database schema diff) automatically \n\nYou can automaticaly create database schema diff, so you don't need describe changes in database.\n\nIf you don't know what `database schema` is, read this StackOverflow answer: [what is purpose of database schema?](http://stackoverflow.com/questions/2674222/what-is-purpose-of-database-schema)\n\nEach time you create new migration, Nasgrate saves current `database schema state` in a special file at `dbstate` directory. This file contain snapshot of you database schema as a php serialized array (tables, rows name and type, indexes and etc.).\n\nWhen you change you database schema later, you can compare it with saved state and automatically create new migration with all database changes.\n\nAnother option is if you have two databases (`prod` and `test` for example), you make changes in `test` database and want to create new migration which contains all changes, the script can automatically do it. \n \nYou can use prefered database tools to modify database schema (for example Sequel Pro or phpMyAdmin) and no need to remember what you have changed in the database since the last migration.\n\nBy default script use `file` strategy to track changes in your database. If you want to compare changes in two databases using one of them as a standart - change `VERSION_CONTROL_STRATEGY` in `.environment` file to `database` and fill `[Secondary connection params]` section.\n\nLet me give you an example\n\nSuppose you add a new table at your database using Sequel Pro: \n\n![UI example](https://cloud.githubusercontent.com/assets/1639576/11975111/840f5d62-a97b-11e5-9a2a-8b3c6845df80.png)\n\nRun\n\n\t$ ./bin/nasgrate diff AddNewTable\n\nand it will display (in my case)\n\n\tGenerate new migration ID: 20201223133618\n\tPlease edit file: /migrations/20201223133618_AddNewTable.sql\n\tThis migration marked as executed\n\t\nWhen you look at `20201223133618_AddNewTable.sql` you will see that this file already has `-- UP --` and `-- DOWN --` sections with SQL-queries. \n\n```sql\n-- Skip: no\n-- Name: AddNewTable\n-- Date: 23.12.2020 13:36:18\n-- Description: Created by dlevsha, 2020-12-23 13:36:18\n\n-- UP --\n\nCREATE TABLE `test` (\n    `id` int(11) unsigned NOT NULL  auto_increment,\n    `name` varchar(200)  DEFAULT NULL ,\n    PRIMARY KEY (`id`)\n) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;\n\n\n-- DOWN --\n\nDROP TABLE IF EXISTS `test`;\n```\n\nSuppose you decide to change `name` field to `VARCHAR(255)` and add index for `name` field using the program.\n\n![](https://cloud.githubusercontent.com/assets/1639576/11975178/22726562-a97c-11e5-9f5a-49e0e5a9fc13.png)\n\nRun\n\n\t$ ./bin/nasgrate generate ChangeMyTestTable diff\n\ndisplay \t\n\n\tGenerate new migration ID: 20201223135246\n\tPlease edit file: /migrations/20201223135246_ChangeMyTestTable.sql\n\tThis migration marked as executed\t\n\nand create automatically\n\n```sql\n-- Skip: no\n-- Name: ChangeMyTestTable\n-- Date: 23.12.2020 13:52:46\n-- Description: Created by dlevsha, 2020-12-23 13:52:46\n\n-- UP --\n\nALTER TABLE `test` CHANGE `name` `name` varchar(255)  DEFAULT NULL;\n\nALTER TABLE `test` ADD KEY `name` (`name`);\n\n\n-- DOWN --\n\nALTER TABLE `test` CHANGE `name` `name` varchar(200)  DEFAULT NULL;\n\nALTER TABLE `test` DROP  KEY `name`;\n```\n\n### View migrations list\n\nBefore we run our first migation let's view query at our migration\n\n\t$ ./bin/nasgrate up:show\n\t\nand it will display\n\n```\nMigration :: 20200821112753_CreateTestMigration\nDescription: The first migration. Created by dlevsha, 2020-12-01 20:28:08 \n\t\nCREATE TABLE test (\n  id int(11) unsigned NOT NULL AUTO_INCREMENT,\n  PRIMARY KEY (id)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8\n\t\nCREATE TABLE test2 (\n  id int(11) unsigned NOT NULL AUTO_INCREMENT,\n  PRIMARY KEY (id)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8\n```\n\nWe can see each query which will be executed during migration process. \n\nAnother option is you can view all transactions (executed and non-executed) via web interface. Just run command\n\n\tphp -S localhost:9000 \n\t\ninside script directory and type in your browser `http://localhost:9000/app/`. \n\nYou'll see your migrations\n\n![Migrations list](https://cloud.githubusercontent.com/assets/1639576/12373875/dbb39fc4-bc9a-11e5-9d54-202e7c221bb5.png)\t\n\t\n### Update database schema (run migration)\t\nIf all is ok let's run migration.\n\n\t./bin/nasgrate up\n\t\nand it will display\n\n```\nMigration :: 20200821112753_CreateTestMigration\n\t\nCREATE TABLE test (\n  id int(11) unsigned NOT NULL AUTO_INCREMENT,\n  PRIMARY KEY (id)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8\n\t\n\t\nCREATE TABLE test2 (\n  id int(11) unsigned NOT NULL AUTO_INCREMENT,\n  PRIMARY KEY (id)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8\n\t\n... complete\n```\n\nIf you look at your database you will see three tables.\n\n\t__migrationVersions\n\ttest\n\ttest2\n\n`__migrationVersions` is a service table created by migration script. It contains an executed migration ID. If you want to change the name of this table edit `VERSION_TABLE_NAME` constant at `.environment` file. Never remove this table or you will loose you migration information. \n\n`test` and `test2` are the tables created through migration process.\n\nIf you want to update database schema before a certain migration you need to set this migration ID as an argument\n\n\t$ ./bin/nasgrate up:run 20200821132420\n\n### Revert database schema\n\nIf something goes wrong and you want to rollback your changes you need to use revert process. Before you run this update you need to know migration ID to which you want to apply revert database schema process. \n\nYou can display all migration IDs at your database by runing\n\n\t$ ./bin/nasgrate list\n\nor using web-interface described above and it will display\n\n\tMigration list:\n\t - [26.08.2020 19:39:39] 20200826193939_CreateFirstMigration - new\n\t - [26.08.2020 19:30:33] 20200826193033_New_Table_Test - executed\n\t \nYou see that you have two migrations at your database. Migration `20200821112753` is already executed, `20200826193939_CreateFirstMigration` is not executed.\n\nLet's imagine you want to revert `20200821112753_CreateFirstMigration` migration.\n\n\t$ ./bin/nasgrate down:show 20200821112753\n\t\nor\t\n\n\t$ ./bin/nasgrate down:show 20200821112753_CreateFirstMigration\n\n\t\nand it will display\n\n\tMigration :: 20200821112753_CreateFirstMigration\n\tDescription: The first migration. Created by dlevsha, 2020-08-21 11:27:53\n\t\n\tDROP TABLE test\n\tDROP TABLE test2\t\n\nLets run revert process\n\n\t$ ./bin/nasgrate down:run 20200821112753_CreateFirstMigration\n\t\nand it will display\n\n\tMigration :: 20200821112753_CreateFirstMigration\n\t\n\tDROP TABLE test\n\tDROP TABLE test2\n\t\n\t... complete\t\n\nIf you look at your database you can see that `test` and `test2` tables were removed.\n\nRun again `list` command\n\n\t$ ./bin/nasgrate list\n\t\nand it will display\n\n\tMigration list:\n\t - [26.08.2020 19:39:39] 20200826193939_CreateFirstMigration - new\n\t - [26.08.2020 19:30:33] 20200826193033_New_Table_Test - new\n\t \n\nLICENSE\n-------\n\nCopyright (c) 2021, Levsha Dmitry\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlevsha%2Fnasgrate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdlevsha%2Fnasgrate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlevsha%2Fnasgrate/lists"}