Skip to content

Commit 86a88d5

Browse files
committed
feat: include migration guide in readme
1 parent 2388361 commit 86a88d5

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,38 @@ $ ssh -N -L 5432:aa1p6s0h1so0mf9.cp0uibxnlhse.us-east-2.rds.amazonaws.com:5432
127127
# Connect to the DB on localhost:5432
128128
$ psql -U cybersim --password -h 127.0.0.1 -p 5432
129129
```
130+
131+
# Data Migration
132+
133+
The application relies on a PostgreSQL database, but the initial data is sourced from an Airtable base. If you wish to customize the data for a new game, including events, locations, actions, and more, you can achieve this by modifying the data within the Airtable base.
134+
135+
Before running a new game with modified data, it is essential to perform a "migration" from Airtable to the PostgreSQL database.
136+
Go to the `<host>/migration` page (e.g. (https://cybersim.demcloud.org/migrate)[https://cybersim.demcloud.org/migrate]) and follow the step-by-step guide below to complete the migration process:
137+
138+
## Step-by-Step Migration Guide
139+
140+
1. **Master Password**
141+
142+
- Remember to set the `MIGRATION_PASSWORD` environment variable in the backend application to access the master password needed for the migration process.
143+
144+
2. **Access Airtable**
145+
146+
- Visit [https://airtable.com](https://airtable.com) and log in to your Airtable account.
147+
148+
3. **Navigate to Developer Hub**
149+
150+
- From the Airtable menu, navigate to the "Developer Hub."
151+
152+
4. **Generate a Personal Access Token**
153+
154+
- Create a new "Personal access token" within the Developer Hub.
155+
156+
5. **Retrieve Airtable Base ID**
157+
158+
- Go to the Airtable base you wish to migrate from and copy the BASE_ID segment from the page URL. It should look something like this: "https://airtable.com/BASE_ID/TABLE_ID/ETC...".
159+
- Paste the copied BASE_ID into the "Airtable base id" input field on the migration form.
160+
161+
6. **Initiate the Migration**
162+
- After filling in the relevant Airtable details, click the "Migrate the database" button.
163+
164+
By following these steps, you can successfully migrate data from Airtable to the PostgreSQL database, ensuring that your new game incorporates the customized data you have prepared.

0 commit comments

Comments
 (0)