I have two tables a
and a_history
, how can I determine when a
has been altered, a column has been removed or added or modified and then change it in a_history
.
a_history
keeps record of a
a = (id,name,status)
a_history = (id,name,status,id_history,operation,date_op,...)
For example you add "code" varchar to a
, then a_history
must have "code" varchar
If you change to "code" int
in a
, then a_history
must have "code" int
and not varchar