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
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
- Have the agent create your tables, then check them (this lesson)
- 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.
Related courses
- AI & DevelopmentJuniorSome basics are useful: introductory knowledge of the topic.
Build and ship a web app with an AI coding agent
2 hr 45 min
- AI & DevelopmentAdvancedRegular practice: you already use the tools or work on this topic.
Work with Claude Code on a real project: context, planning, review
3 hr
- Product ManagementAdvancedRegular practice: you already use the tools or work on this topic.
Git for PMs: ship as a team without putting production at risk
3 hr 30 min