Variables in Oracle Triggers
It really sounds like you have an XY Problem.

Your Business Requirement can be summed up with this statement:


  I don't care about data, just structural changes.


I'm sure the Business Requirement to capture and manage Schema deltas is part of DevOps.  There are solutions that exist for this part of the entire DevOps process.  (eg Liquibase)  I suggest you don't reinvent the wheel.

Oracle Tools for Schema Deltas

The latest version of Oracle SQLcl (v19.2.1 - $0) has incorporated Liquibase.  This allows you to create schema deltas (and save the result in a Code Repository)

The third example in the documentation appears to be a good starting point for your needs.


capture base Schema
capture changes
(example applies base Schema to new Schema)
apply changes to base Schema


Make sure you keep the deltas in a Code Repository.

More Info?

There are a lot of articles that discuss how automate schema changes...especially with the context of DevOps.  Feel free to google for more information.