Skip to content
Module
Module 3 of 6Lesson 1 of 2~22 min

Have the agent create your tables, then check them

A shaky data model costs you with every new feature, especially when an agent wrote it unchecked. This lesson teaches you to have the agent design tables linked to your users, to have them applied as versioned migrations, then to check in the database that everything is attached to the right account.

Lesson objective

By the end of this lesson, you will be able to have the agent design a data model linked to users, have it written as versioned migrations applied to Supabase, then check in the database that an entry made in the app is stored and linked to the right account.

Topics covered

  • data model
  • database migrations
  • Supabase
  • PostgreSQL
  • AI coding agent

In the glossary

Full glossary

Where it fits

Store the data and protect access to it

How do I have the agent create tables, and guarantee that everyone only sees their own data?

Lessons in this module

  1. Have the agent create your tables, then check them (this lesson)
  2. Row Level Security: everyone's own data, proven with two accounts

What you will learn in this module

This lesson is part of the course Add a database, authentication and payments to your app

  • Have the agent design a data model and its migrations, then check that data is actually stored and linked to the right user.
  • Write, have written and test Row Level Security rules that guarantee each user only accesses their own data and that plan limits are enforced in the database.