Is there some way to prefix table names with the user name in sql tags so that the generated sql would have the user name?
Liquibase supported tags work
eg.
<changeSet author="john" id="4331-1" dbms="oracle">
<dropUniqueConstraint tableName="user_type" constraintName="uk_user_type"/>
</changeSet>
generates
ALTER TABLE service_account.user_type DROP CONSTRAINT uk_user_type DROP INDEX;
However,
<changeSet author="john" id="4331-2" dbms="oracle">
<sql>
alter table user_type drop constraint uk_user_type
</sql>
</changeSet>
generates
alter table user_type drop constraint uk_user_type
Is there some variable prefix I can add to the sql statement that would get substituted with the user name in Oracle?
eg.
<sql>
${db.username}.alter table user_type drop constraint uk_user_type
</sql>
I export the sql so the DBA can run it and they insist (correctly) that the schema name has to be prefixed on all the statements. They run it as a DBA and these statements fail with table or view does not exist. At the moment, I'm exporting the sql and then manually searching for statements like this (which is difficult) and then running them.
I'm not sure of this is already supported or not. Alternatively, if you could point me to some way to do this, that would be awesome.
Thanks
Liquibase supported tags work
eg.
<changeSet author="john" id="4331-1" dbms="oracle">
<dropUniqueConstraint tableName="user_type" constraintName="uk_user_type"/>
</changeSet>
generates
ALTER TABLE service_account.user_type DROP CONSTRAINT uk_user_type DROP INDEX;
However,
<changeSet author="john" id="4331-2" dbms="oracle">
<sql>
alter table user_type drop constraint uk_user_type
</sql>
</changeSet>
generates
alter table user_type drop constraint uk_user_type
Is there some variable prefix I can add to the sql statement that would get substituted with the user name in Oracle?
eg.
<sql>
${db.username}.alter table user_type drop constraint uk_user_type
</sql>
I export the sql so the DBA can run it and they insist (correctly) that the schema name has to be prefixed on all the statements. They run it as a DBA and these statements fail with table or view does not exist. At the moment, I'm exporting the sql and then manually searching for statements like this (which is difficult) and then running them.
I'm not sure of this is already supported or not. Alternatively, if you could point me to some way to do this, that would be awesome.
Thanks