Skip to content

Commit de749af

Browse files
authored
Update README.md
1 parent 9a1a8cf commit de749af

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

README.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,27 @@
22

33
Github action to create a release on Bytebase.
44

5+
6+
# Naming scheme
7+
8+
The migration files matched by `file-pattern` are assumed to follow a naming scheme.
9+
It should start with digit version numbers, separated by underscore, and optionally end with
10+
a change type. Format: `path/to/migrations/<<version>>_xxxx_<<changeType>>.sql`
11+
This action determines the change type of a file by how its filename ends. The
12+
default change type is schema change.
13+
14+
Examples:
15+
- 20250101001_add_column.sql
16+
- 20250101002_fill_default_data_dml.sql
17+
18+
19+
| Ends with | Type |
20+
| --------- | -------------------- |
21+
| ddl | schema change |
22+
| ghost | online schema change |
23+
| dml | data change |
24+
25+
526
# Inputs
627

728
| Input Name | Required | Default Value | Description | Type |
@@ -14,12 +35,6 @@ Github action to create a release on Bytebase.
1435
| validate-only | No | `false` | Used to check release only. Won't create the release. | Boolean |
1536
| targets | No | N/A | The database group or databases to check the release against. This must be provided if `check-release` is set to `FAIL_ON_ERROR` or `FAIL_ON_WARNING`. Either a comma separated list of the databases or a database group. Databases example: `instances/mysql1/databases/db1,instances/mysql1/databases/db2`. Database format: instances/{instance}/databases/{database} Database group example: `projects/exa/databaseGroups/mygroup` Database group format: `projects/{project}/databaseGroups/{databaseGroup}` | String |
1637

17-
The migration filename **must** start with digits indicating its version. It can optionally end with `dml` or `ghost` to indicate its change type. The default change type is `ddl`.
18-
19-
Examples:
20-
- 20250101001_add_column.sql
21-
- 20250101002_fill_default_data_dml.sql
22-
2338
## Example
2439

2540
```yaml

0 commit comments

Comments
 (0)