platform/packages/orm/angel_migration_runner/README.md

34 lines
1.3 KiB
Markdown
Raw Normal View History

2021-07-19 04:49:31 +00:00
# Angel3 Migration Runner
2021-12-20 04:25:43 +00:00
![Pub Version (including pre-releases)](https://img.shields.io/pub/v/angel3_migration_runner?include_prereleases)
2021-05-18 14:36:40 +00:00
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
[![Gitter](https://img.shields.io/gitter/room/angel_dart/discussion)](https://gitter.im/angel_dart/discussion)
2023-12-25 03:45:10 +00:00
[![License](https://img.shields.io/github/license/dart-backend/angel)](https://github.com/dart-backend/angel/tree/master/packages/orm/angel_migration_runner/LICENSE)
2021-05-18 14:36:40 +00:00
2022-07-24 05:10:23 +00:00
Database migration runner for Angel3 ORM.
2021-07-19 04:49:31 +00:00
Supported database:
2022-07-27 14:21:36 +00:00
* PostgreSQL 10.x or greater
* MariaDB 10.2.x or greater
* MySQL 8.x or greater
2022-05-01 09:40:42 +00:00
## Usage
2022-07-27 14:21:36 +00:00
* Use `PostgresMigrationRunner` to perform database migration for PostgreSQL.
2022-05-01 09:40:42 +00:00
2022-07-27 14:21:36 +00:00
* Use `MySqlMigrationRunner` to perform database migration for MySQL and MariaDB. This runner is using [`mysql_client`](https://pub.dev/packages?q=mysql_client) driver.
2022-05-01 09:40:42 +00:00
2024-01-25 04:48:43 +00:00
* Use `MariaDbMigrationRunner` to perform database migration for MariaDB. This runner is using [`mysql1`](https://pub.dev/packages?q=mysql1) driver.
2022-07-27 14:21:36 +00:00
## Supported Operations
2024-01-25 04:48:43 +00:00
* reset - Clear out all records in the `migrations` table and drop all the ORM related tables.
* up - Generate all the tables based on the ORM models.
2022-07-27 14:21:36 +00:00
* refresh - Run `reset` follow by `up`
2024-01-25 04:48:43 +00:00
## To do
* Update existing tables
* Reverse engineer tables into models