-
Notifications
You must be signed in to change notification settings - Fork 0
Adding or Updating or Deleting an Airtable Column or Airtable Table
This page will guide an Admin on the procedure to add a new column, updating an existing column type, or adding an Airtable table to the main Airtable base and have it be usable in the app for development. These steps should be done in quick succession if possible to minimize the discrepancy between the code's Airtable schema and the Airtable UI's Airtable schema. If you are not technical, you will want a developer on hand to help you update the code's Airtable schema. This guide assumes you already know how to make your intended change via the Airtable UI
NOTE: Users using the app may run into technical difficulties refreshing their data while you're completing this workflow. Please try to do this workflow when minimal users are using the app or during off hours. It would also be wise to announce this maintenance change in advance so that users are aware that technical difficulties may occur during this time.
You only need to follow this guide if you perform one of the following:
- Add a new column to an Airtable table
- Add a new table to the Airtable base
- Updating a column by changing something within "Customize field type"
- Add lookup field
- Insert right/left
- Deleting an existing column / table
You do not need to follow this guide if you perform one of the following:
- Create an airtable form
- Sort using the Airtable UI (A->Z or Z->A)
- Adding a filter to the Airtable UI
- "Group by" this field
- Do your change in the Airtable UI (Adding / Updating / Deleting a column or table)
- The schemas for the backend and the frontend need to be regenerated so that they have the new changes in #1
-
In the
meepanyar-node
repo, update the airtable schema by runningnpm run generate-schema
- Do not commit the newly generated
airtable.js
. Only commit the newschema.js
andrequest.js
files that are modified. This is because theairtable.js
contains changes that permit certain requests in the app - I recommend you locally run
npm run start
to make sure the service still runs properly.
- Do not commit the newly generated
-
In the
meepanyar
repo, you need to update the airtable schema as well as apply the necessary schema patches.- Run
npm run generate-schema
to get the most - Run
npm run apply-schema-patches
. If a patch conflict occurs, see the "How to update Patches" section of the Airtable Schema Generator page.
- Run
-
Make the necessary change to
interface.ts
(add/remove/update the field to the appropriate record, add a new, appropriately typedXRecord
if a new table was created) -
Update any necessary
EMPTY_X
records (ie:EMPTY_CUSTOMER
,EMPTY_INVENTORY_UPDATE
, etc...) to include / exclude the updated field. -
I recommend you locally run
npm run start
in order to check any compile-time typescript errors that this might've introduced.
-
- Commit and push the
meepanyar/
andmeepanyar-node/
repos - Redeploy the frontend and backend repositories so the Users can use the most updated version of the app.
- Creating a New User and Assigning them a Site
- Adding or Updating or Deleting an Airtable Column or Table
- Testing Translations in a Production Environment