fabiopires1011
Power Member
Boas, tenho duas tabelas às quais preciso de adicionar uma coluna. Os nomes das tabelas são saft_2020_1_111_nc_generalledgerentriestotals e saft_2017_2_112_nc_generalledgerentriestotals, ou seja, ambas terminam em generalledgerentriestotals. Existe alguma forma de escrever a migração para todas as tabelas com este sufixo? Por exemplo utilizar regex? Deixo abaixo uma tentativa que não teve resultado
Código:
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd">
<changeSet author="fabio" id="changelog-4.0">
<addColumn tableName="*_generalledgerentriestotals">
<column name="multiple_added" type="varchar(255)"/>
</addColumn>
<rollback>
<dropColumn tableName="*_generalledgerentriestotals">
<column name="multiple_added" type="varchar(255)"/>
</dropColumn>
</rollback>
</changeSet>
</databaseChangeLog>