alterTableApi extension
🌐 This document is available in both English and Ukrainian. Use the language toggle in the top right corner to switch between versions. |
1. General description
Liquibase’s extension tag alterTableApi
allows changing configurations that influence the behavior of the generated API code for the created registry tables.
2. Liquibase scheme
<changeSet author="..." id="change api behavior">
<ext:alterTableApi table="table_from_attribute">
<ext:attribute name="bulkLoad" value="true"/>
<ext:attribute name="readMode" value="async"/>
</ext:alterTableApi>
<ext:alterTableApi table="example_bulk">
<ext:attribute name="bulkLoad" value="true"/>
</ext:alterTableApi>
</changeSet>
3. Parameter description
Main tag parameters
Parameter name |
Allowed values |
Description |
table |
Names of the tables created by previous Liquibase-changesets |
Table that requires the applied changes |
Parameters for the nested attribute tags
Attribute name |
Allowed values |
Description |
bulkLoad |
true/false |
if the endpoint, which allows for the transactional storing of several entities in one request, will be generated |
readMode |
sync/async |
how will data reading be performed, synchronously or asynchronously (sync - on the registry-rest_api level, async - via rest-api→ registry-kafka-api → rest-api) |
4. Generated requests to the DB
Processing this tag will result in requests to the registry DB, similar to the following:
For the bulkLoad attribute
INSERT INTO public.ddm_liquibase_metadata(
change_type, change_name, attribute_name, attribute_value)
VALUES ("bulkLoad", "table_from_attribute", "bulkLoad", "true");
For the readMode attribute
INSERT INTO public.ddm_liquibase_metadata(
change_type, change_name, attribute_name, attribute_value)
VALUES ("readMode", "alterTableApi", "table_from_attribute", "async");