Skip to content

Commit 4793071

Browse files
committed
Replaced extracting JAR content with the migration links.
1 parent 14c4fde commit 4793071

File tree

1 file changed

+17
-90
lines changed

1 file changed

+17
-90
lines changed

userguide/aviate/aviate-database-migrations.adoc

Lines changed: 17 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -130,54 +130,13 @@ If the schema already exists, Flyway must be aligned with the current database s
130130

131131
===== Step 1 — Retrieve the Migration Files
132132

133-
Migration scripts are packaged inside each Aviate plugin JAR.
133+
Download the migration scripts from the following link:
134134

135-
If you already know which Aviate plugin version created the schema, download that exact version:
135+
MySQL migrations:
136+
https://docs.killbill.io/latest/aviate-migrations/mysql/
136137

137-
----
138-
curl -O "https://dl.cloudsmith.io/<token>/killbill/aviate/maven/com/kill-bill/billing/plugin/java/aviate-plugin/<version>/aviate-plugin-<version>.jar"
139-
----
140-
141-
Otherwise, use the latest plugin version available on the Kill Bill node.
142-
143-
The plugin directory is controlled by:
144-
145-
----
146-
org.killbill.billing.plugin.kpm.bundlesPath
147-
----
148-
149-
Default location:
150-
151-
----
152-
/var/lib/killbill/bundles
153-
----
154-
155-
Example:
156-
157-
----
158-
/var/lib/killbill/bundles/plugins/java/aviate-plugin/
159-
├── 1.0.28
160-
├── 1.0.29
161-
└── SET_DEFAULT
162-
----
163-
164-
Each version contains a plugin JAR: `aviate-plugin-<version>.jar`
165-
166-
Select the version whose migrations most closely match the existing database schema.
167-
168-
Extract the plugin JAR:
169-
----
170-
unzip aviate-plugin-1.0.29.jar -d aviate-plugin-1.0.29
171-
----
172-
173-
Then inspect:
174-
----
175-
db/migration/mysql
176-
177-
or
178-
179-
db/migration/postgresql
180-
----
138+
PostgreSQL migrations:
139+
https://docs.killbill.io/latest/aviate-migrations/postgresql/
181140

182141
Migration files follow the following format:
183142

@@ -187,7 +146,7 @@ aviateV1.2.0__catalog_usage.sql
187146
aviateV1.3.0__catalog_meter.sql
188147
----
189148

190-
The last migration file represents the schema version created by that plugin release.
149+
After downloading, compare the migration files with your current Aviate schema to identify the latest version already reflected in your database. This version will be used as the Flyway baseline.
191150

192151
Example:
193152

@@ -393,29 +352,13 @@ Note the migration version where `success = 0`.
393352

394353
Review the migration script referenced in the error logs.
395354

396-
Migration scripts are packaged inside the Aviate plugin JAR.
355+
Download the migration scripts from the following link:
397356

398-
Locate the plugin directory (see the value of `org.killbill.billing.plugin.kpm.bundlesPath` property), by default its at the following location:
357+
MySQL migrations:
358+
https://docs.killbill.io/latest/aviate-migrations/mysql/
399359

400-
----
401-
/var/lib/killbill/bundles/plugins/java/aviate-plugin/<version>/
402-
----
403-
404-
Extract the JAR:
405-
406-
----
407-
unzip aviate-plugin-<version>.jar -d aviate-plugin
408-
----
409-
410-
Then navigate to:
411-
412-
----
413-
db/migration/mysql
414-
415-
or
416-
417-
db/migration/postgresql
418-
----
360+
PostgreSQL migrations:
361+
https://docs.killbill.io/latest/aviate-migrations/postgresql/
419362

420363
Open the migration file mentioned in the logs to understand what schema changes were attempted.
421364

@@ -526,31 +469,15 @@ Unknown column 'kb_account_id'
526469

527470
This indicates that the migration responsible for adding this column was never applied or was reverted.
528471

529-
===== Step 2 — Locate the Migration Script
472+
===== Step 2 — Check the Migration Script
530473

531-
Migration scripts are packaged inside the Aviate plugin JAR.
474+
Download the migration scripts from the following link:
532475

533-
Locate the plugin directory:
476+
MySQL migrations:
477+
https://docs.killbill.io/latest/aviate-migrations/mysql/
534478

535-
----
536-
/var/lib/killbill/bundles/plugins/java/aviate-plugin/<version>/
537-
----
538-
539-
Extract the JAR:
540-
541-
----
542-
unzip aviate-plugin-<version>.jar -d aviate-plugin
543-
----
544-
545-
Then navigate to:
546-
547-
----
548-
db/migration/mysql
549-
550-
or
551-
552-
db/migration/postgresql
553-
----
479+
PostgreSQL migrations:
480+
https://docs.killbill.io/latest/aviate-migrations/postgresql/
554481

555482
Locate the migration file referenced in the error logs and review it to determine which column, table, or object is missing from the schema.
556483

0 commit comments

Comments
 (0)