Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AsciiDoc list numbering issue in Flyway CLI instructions. #601

Merged
merged 1 commit into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ Execute the SQL scripts obtained above directly on your database.
Migrations can also be executed using the Flyway command-line tool.

1. *Install Flyway Command-Line Tool:*

+
Follow the installation guide here: https://documentation.red-gate.com/fd/quickstart-command-line-184127576.html[Flyway CLI Installation].

2. *Run the Baseline Command (First-Time Use Only):*

+
If Flyway is being used the first time, run the `baseline` command to create the `flyway_schema_history` table.
+
*Command*
Expand All @@ -57,8 +57,8 @@ flyway -url=jdbc:mysql://127.0.0.1:3306/killbill -user=<db_user> -password=<db_p
flyway -url=jdbc:mysql://127.0.0.1:3306/killbill -user=root -password=killbill -table=analytics_schema_history baseline
----

+
2. Run the `migrate` command to execute the migrations.

3. *Run the `migrate` command to execute the migrations.*
+
*Command*
+
Expand All @@ -79,7 +79,7 @@ flyway -url=jdbc:mysql://127.0.0.1:3306/killbill -user=root -password=killbill -

In production environments, database access is often restricted and developers don’t necessarily have rights to execute DDL commands (i.e. CREATE, ALTER, DROP, etc. statements). In such cases, migrations can be executed as follows:

1. Create the `<plugin_name>_schema_history` table manually by running the following SQL statements:
1. *Create the `<plugin_name>_schema_history` table manually:*
+
[source, sql]
----
Expand All @@ -102,9 +102,9 @@ insert into <plugin_name>_schema_history (installed_rank, version, description,
----
+
Ensure that you replace `<plugin_name>` with the name of a plugin like `analytics`.
+
2. *Run a Dry Run (if needed for review before applying migrations):*

2. *Run a Dry Run (if needed for review before applying migrations):*
+
Flyway CLI does not support dryRun directly, but you can use `-outputType=json` to review pending migrations:
+
*Command*
Expand All @@ -120,5 +120,5 @@ flyway -url=jdbc:mysql://127.0.0.1:3306/<db_name> -user=<db_user> -password=<db_
----
flyway -url=jdbc:mysql://127.0.0.1:3306/killbill -user=root -password=password -locations=filesystem:C:/var/migrations-table=analytics_schema_history info -outputType=json
----

+
This will list pending migrations without applying them.
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ Execute the SQL scripts obtained in Step 1 directly in the database.
Migrations can also be executed using the Flyway command-line tool.

1. *Install Flyway Command-Line Tool:*

+
Follow the installation guide here: https://documentation.red-gate.com/fd/quickstart-command-line-184127576.html[Flyway CLI Installation].

2. *Run the Baseline Command (First-Time Use Only):*

+
If Flyway is being used the first time, run the `baseline` command to create the `flyway_schema_history` table.
+
*Command*
Expand All @@ -57,8 +57,7 @@ flyway -url=jdbc:mysql://127.0.0.1:3306/killbill -user=<db_user> -password=<db_p
flyway -url=jdbc:mysql://127.0.0.1:3306/killbill -user=root -password=killbill baseline
----

+
2. Run the `migrate` command to execute the migrations.
3. *Run the `migrate` command to execute the migrations.*
+
*Command*
+
Expand Down Expand Up @@ -101,7 +100,7 @@ insert into flyway_schema_history (installed_rank, version, description, type, s
----
+
2. *Run a Dry Run (if needed for review before applying migrations):*

+
Flyway CLI does not support dryRun directly, but you can use `-outputType=json` to review pending migrations:
+
*Command*
Expand All @@ -117,9 +116,9 @@ flyway -url=jdbc:mysql://127.0.0.1:3306/<db_name> -user=<db_user> -password=<db_
----
flyway -url=jdbc:mysql://127.0.0.1:3306/killbill -user=root -password=password -locations=filesystem:C:/var/migrations info -outputType=json
----

+
This will generate a JSON output similar to the following, which includes details such as the migration version, description, and the file path containing the SQL queries that will be executed:

+
[source, bash]
----
{
Expand Down Expand Up @@ -180,5 +179,5 @@ This will generate a JSON output similar to the following, which includes detail
"htmlReport": "/home/killbill/Downloads/flyway-commandline-9.22.3-linux-x64/flyway-9.22.3/report.html"
}
----

+
This helps in reviewing the changes before executing them.
Loading