Skip to content

Commit b6b43ce

Browse files
bikramHarnessHarness
authored andcommitted
feat: [DBOPS-1543]: flyway schema changes and migration type (#694)
* d43330 feat: [DBOPS-1543]: flyway schema changes and migration type * 3aea1d feat: [DBOPS-1543]: flyway schema changes and migration type * a2986a feat: [DBOPS-1543]: flyway schema changes and migration type
1 parent e8d2e23 commit b6b43ce

12 files changed

+62
-0
lines changed

harness/dbops/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ Class | Method | HTTP request | Description
6464
- [MigrationStateInstance](docs/MigrationStateInstance.md)
6565
- [MigrationStateInstanceIn](docs/MigrationStateInstanceIn.md)
6666
- [MigrationStateOut](docs/MigrationStateOut.md)
67+
- [MigrationType](docs/MigrationType.md)
6768
- [ModelError](docs/ModelError.md)
6869
- [NgTag](docs/NgTag.md)
6970
- [OrderInstance](docs/OrderInstance.md)

harness/dbops/api/swagger.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,6 +1592,8 @@ components:
15921592
$ref: "#/components/schemas/DBSchemaType"
15931593
changeLogScript:
15941594
$ref: "#/components/schemas/ChangeLogScript"
1595+
migrationType:
1596+
$ref: "#/components/schemas/MigrationType"
15951597
description: 'Database Schema Request '
15961598
x-examples:
15971599
Example 1:
@@ -1611,6 +1613,7 @@ components:
16111613
- created
16121614
- identifier
16131615
- instanceCount
1616+
- migrationType
16141617
- name
16151618
- type
16161619
type: object
@@ -1657,6 +1660,8 @@ components:
16571660
$ref: "#/components/schemas/ChangeLogScript"
16581661
type:
16591662
$ref: "#/components/schemas/DBSchemaType"
1663+
migrationType:
1664+
$ref: "#/components/schemas/MigrationType"
16601665
description: Database Schema Response
16611666
example:
16621667
identifier: identifier
@@ -1870,6 +1875,11 @@ components:
18701875
description: path excluding the repo till the archive file
18711876
x-stoplight:
18721877
id: 53mqhpfa5038m
1878+
toml:
1879+
type: string
1880+
description: config file for Flyway migration type
1881+
x-stoplight:
1882+
id: 7m9n0umenjjhf
18731883
additionalProperties: false
18741884
description: |
18751885
location of the changelog file containing schema changes in a git repository
@@ -2487,6 +2497,11 @@ components:
24872497
example: folder/changelog.yaml
24882498
x-stoplight:
24892499
id: sn916ihq297p3
2500+
toml:
2501+
type: string
2502+
description: config file for Flyway migration type
2503+
x-stoplight:
2504+
id: s0cp5j17j45dk
24902505
description: if schemaType is Script location of the changelog file after using
24912506
a custom script to download
24922507
example:
@@ -2506,6 +2521,15 @@ components:
25062521
- Script
25072522
x-stoplight:
25082523
id: 21ikm27shlnsf
2524+
MigrationType:
2525+
title: MigrationType
2526+
type: string
2527+
description: DB Migration tool type
2528+
enum:
2529+
- Liquibase
2530+
- Flyway
2531+
x-stoplight:
2532+
id: 2vj413xlt5qrp
25092533
responses:
25102534
DBSchemaListResponse:
25112535
description: Response body for List Database Schema

harness/dbops/docs/ChangeLogScript.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
77
**Command** | **string** | command script used to download the changelog file | [default to null]
88
**Shell** | **string** | shell type | [default to null]
99
**Location** | **string** | location of the changelog file | [default to null]
10+
**Toml** | **string** | config file for Flyway migration type | [optional] [default to null]
1011

1112
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1213

harness/dbops/docs/Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
77
**Location** | **string** | path to the change log file | [default to null]
88
**Repo** | **string** | repo name of the git based connector when ConnectionType is Account | [optional] [default to null]
99
**ArchivePath** | **string** | path excluding the repo till the archive file | [optional] [default to null]
10+
**Toml** | **string** | config file for Flyway migration type | [optional] [default to null]
1011

1112
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1213

harness/dbops/docs/DbSchemaIn.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
1010
**Service** | **string** | harness service corresponding to database schema | [optional] [default to null]
1111
**Type_** | [***DbSchemaType**](DBSchemaType.md) | | [optional] [default to null]
1212
**ChangeLogScript** | [***ChangeLogScript**](ChangeLogScript.md) | | [optional] [default to null]
13+
**MigrationType** | [***MigrationType**](MigrationType.md) | | [optional] [default to null]
1314

1415
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1516

harness/dbops/docs/DbSchemaOut.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
1414
**SchemaSourceType** | **string** | | [optional] [default to null]
1515
**ChangeLogScript** | [***ChangeLogScript**](ChangeLogScript.md) | | [optional] [default to null]
1616
**Type_** | [***DbSchemaType**](DBSchemaType.md) | | [default to null]
17+
**MigrationType** | [***MigrationType**](MigrationType.md) | | [default to null]
1718

1819
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1920

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# MigrationType
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
7+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
8+

harness/dbops/model_change_log_script.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@ type ChangeLogScript struct {
1919
Shell string `json:"shell"`
2020
// location of the changelog file
2121
Location string `json:"location"`
22+
// config file for Flyway migration type
23+
Toml string `json:"toml,omitempty"`
2224
}

harness/dbops/model_changelog.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@ type Changelog struct {
1919
Repo string `json:"repo,omitempty"`
2020
// path excluding the repo till the archive file
2121
ArchivePath string `json:"archivePath,omitempty"`
22+
// config file for Flyway migration type
23+
Toml string `json:"toml,omitempty"`
2224
}

harness/dbops/model_db_schema_in.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ type DbSchemaIn struct {
2222
Service string `json:"service,omitempty"`
2323
Type_ *DbSchemaType `json:"type,omitempty"`
2424
ChangeLogScript *ChangeLogScript `json:"changeLogScript,omitempty"`
25+
MigrationType *MigrationType `json:"migrationType,omitempty"`
2526
}

0 commit comments

Comments
 (0)