How to create rails migration for auto calculated columns like below.
a_column integer,
b_column integer,
total1 integer GENERATED ALWAYS AS (a_column+b_column) stored,
total2 integer GENERATED ALWAYS AS (a_column-b_column) stored,
total3 integer GENERATED ALWAYS AS (a_column/b_column) stored
);
I don't want to do using Models, because I want to use same table from another system having different technology.