How to implement a dynamic referral program? Example: Currently, we will provide 100 credits each to both the referrer and referred.

Then in the future, we might want to implement a different referral program. Such as change credits to 200 instead of 100.

Then again in the future, give each 100 credits as well give referrer 50 if the referred spends 100 with us for the first time.

Then again in the future, give each 100 credits as well give referrer 50 each time the referred spends 100 with us.

Also, sometimes restrict the program to a few users only.

"Dynamic referral": We should be able to create different referral programs in the long course. Should be dynamic and able to take stats from the data.

Is it OK to change the database every time we come up with a new referral program?

I'm confused. How to create a schema/design/table(model) for such? Please help.



Note: I didn't include any design attempt because I couldn't think of it. I'm confused. I want it to be generic. I could build models for different referral programs. But I'm looking for something more generic. Is it even possible? I wonder.
Separate data and business logic.

A database is a repository for data, so put those numbers in a table (let's call it Creds), possibly with date ranges of when they are applicable.

Your application code is where you build the "business logic" that interprets "referrer", "referree", "first time", etc, based on the data.

For example "first time" would come from some other table that, for example, has the entire list of "referred spends" for a user.  You would write a suitable query to determine "first time", then use Creds to and the current date to decide how much credit to give a user.