platform/packages/orm/angel_migration_runner/README.md

29 lines
1.4 KiB
Markdown
Raw Normal View History

# Protevus Migration Runner
2021-07-19 04:49:31 +00:00
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)
2024-07-07 15:02:49 +00:00
[![Discord](https://img.shields.io/discord/1060322353214660698)](https://discord.gg/3X6bxTUdCM)
[![License](https://img.shields.io/github/license/dart-backend/protevus)](https://github.com/dart-backend/protevus/tree/master/packages/orm/angel_migration_runner/LICENSE)
2021-05-18 14:36:40 +00:00
This package contains the implementation of the database migration for the following databases. It is designed to work with Protevus ORM.
2021-07-19 04:49:31 +00:00
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.
* Use `MySqlMigrationRunner` to perform database migration for MySQL and MariaDB. This runner is using [`mysql_client`](https://pub.dev/packages?q=mysql_client) driver.
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
* up - Generate all the tables based on the ORM models.
2024-07-21 03:16:49 +00:00
* reset - Clear out all records in the `migrations` table and drop all the ORM related tables.
2022-07-27 14:21:36 +00:00
* refresh - Run `reset` follow by `up`
2024-01-25 04:48:43 +00:00
2024-07-21 03:16:49 +00:00
## Limitation
2024-01-25 04:48:43 +00:00
2024-07-21 03:16:49 +00:00
* Update schema changes is not supported