I’m working on migrating data between tables. For context, let’s say I have designed these 2 tables for a tutoring company that offers bulk tutoring with different packages:
- Hours purchased - rollup from a purchases table
- Hours tutored - rollup from the classes table
- Hours remaining - formula, subtracting the above two from each other
- Student - relation to Students table
- Class Paid - checkbox of whether this class has been paid
The Classes table has a record of booked classes, but not all are paid. We use an automation script that monitors the Students table for any changes to the hours purchased for a student (say through Stripe, or a manual change by sales), and updates the field in the Class Paid column for any of that student’s classes accordingly.
This worked for a one-to-one relationship between a student and a class. However, we’ve begun offering classes to multiple students at a time. The “Class Paid” checkbox is now invalid, as two students could have paid for a different number of classes. This checkbox should instead be tied to the Student<>Class relationship.
I’d like to decouple the two tables and create a purely relational table (similar to how one might do this in SQL).
It’s a fairly straightforward piece of code to migrate these tables and remove the coupling. My question is is there an easy way to do this on airtable? TIA.