Create your database table
We’ll use Data Tables to store feedback from our users. Data Tables are an out-of-the-box option for data storage in Anvil, and they’re backed by PostgreSQL.
Step 1: Add the Data Tables service
Step 2: Feedback
Now set up your “feedback” table, with the following columns:
created(Date and Time column)
Here’s how to do that:
Click ‘Add a table’ in the light blue box at the top, then ‘Create new table…’. You’ll be prompted to give your table a name - let’s call it ‘feedback’.
Next, add a column for the name of the person submitting feedback, by clicking ‘+ New Column’ and choosing ‘Add text column…’. Call this column ‘name’.
Keep adding columns until your Data Table has the structure we described above. Column titles are case sensitive, so let’s stick to lower case.
Your Data Table should look something like this:
In Chapter 3, we’ll write some server-side code to store data in the new Data Table.