Skip to content

Commit

Permalink
Update README.md with db dchema
Browse files Browse the repository at this point in the history
  • Loading branch information
horeaporutiu authored Oct 12, 2023
1 parent 7f2fd6d commit a64cde4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions examples/github-appcards/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,22 @@ https://github.com/miroapp/app-examples/assets/10428517/70e7c32e-7206-42f7-b64d-
3. Click on `Create a new table`
4. Name this table `auth` and add in the following columns, with the respective `Format` as shown in the screenshot below. Note that capitalization is important for the table name. This table will hold access_tokens to be able to call the Miro REST API to sync changes which happen in the GitHub project. Disable Row Level security.

This is the schema for the `auth` table - make sure it is exactly the same to ensure this code works.

![auth-table-schema](https://github.com/miroapp/app-examples/assets/10428517/d816df58-0208-4fa1-ba1c-08ac82b67aac)

This is what the `auth` table should look like once it's been updated.

![auth-database-configuration](https://github.com/miroapp/app-examples/assets/10428517/bbbcefcf-0621-4f6f-812d-021ae4aab047)

6. Click on `Create a new table` and name this table `card-mapping` and add in the following columns, with the respective `Format` as shown in the screenshot below. This table will hold the app card ID from Miro and the GitHub issue ID along with the MiroUserId.

This is the schema for the `card-mapping` table - make sure it is exactly the same to ensure this code works.

![card-mapping-table-schema](https://github.com/miroapp/app-examples/assets/10428517/f38bb7b1-8c3c-4f27-ab14-6ba9e2300b4e)

This is what the `card-mapping` table should look like once it's been updated.

![card-mapping-database-configuration](https://github.com/miroapp/app-examples/assets/10428517/8eadeeb0-ab7a-4239-9961-c3dfcc038d1f)

8. Click on `Edit column` for the `miroUserId` in the `card-mapping` table, and then add in the following `Foreign Key Relation` as shown in the screenshot below.
Expand Down

0 comments on commit a64cde4

Please sign in to comment.