From 9274ebc630d00d7c5909a58a12221d19647dd2b2 Mon Sep 17 00:00:00 2001 From: August Date: Mon, 17 Jun 2024 15:45:45 +0800 Subject: [PATCH] chore: update migration doc, add DATABASE_URL env example (#17276) --- src/meta/model_v2/migration/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/meta/model_v2/migration/README.md b/src/meta/model_v2/migration/README.md index 527d4ba53807..d68a624ced8a 100644 --- a/src/meta/model_v2/migration/README.md +++ b/src/meta/model_v2/migration/README.md @@ -9,11 +9,11 @@ > **DO NOT** modify already published migration files. ## How to run the migrator CLI -- Generate a new migration file +- Generate a new migration file, a database endpoint is required but not used. ```sh - cargo run -- generate MIGRATION_NAME + export DATABASE_URL=sqlite::memory:; cargo run -- generate MIGRATION_NAME ``` -- Apply all pending migrations for test purposes, `DATABASE_URL` required. +- Apply all pending migrations for test purposes, change `DATABASE_URL` to the actual database endpoint. ```sh cargo run ```