Setting up the database
As with previous chapters, we’ll start this chapter by setting up our database. We’ll create another project called quiz
, set a strong database password, and select a geographically close region.
Remember to note the Project URL and API Key values!
Note
The intent of this chapter is not to focus on database management and the following settings should not be considered a best practice for a production app!
Follow these steps to set up the database:
- Go to Table Editor and choose Create a new table. Here, do the following:
- For the name, insert
quiz
. - Uncheck Enable Row Level Security (RLS) and confirm the dialog after reading its warning.
- In the Columns section, change the type of the id field to uuid.
- That’s enough for this table, so click Save.
We will only use this table as a grouping mechanism for questions, so we’re keeping it as simple as possible.
- For the name, insert
- Now, return to Table Editor and click Create a new table. Apply...