@YifanBTH

Supabase is super based (sry for the pun, couldn't resist πŸ˜…). It's been really fun tinkering with this workflow to fully automate most of my database work using AI agents. 

After traveling for the past 2 months, it feels great to get back into the production rhythm with videos like this. What part of database management do you find most tedious? I might cover more specific aspects in future videos.

If you're using Supabase or considering it, drop a comment about your experience or questions. Always happy to chat about dev tools that actually save time rather than create more work!

@Geoffrey_White

Thank you for a very useful and well presented video. I feel your teaching style has a very good pace and an appropriate depth for newer developers. Yes, I would like to see a video on auth via Supabase and or Clerk. I would also love to see you publish a video with additional detail on setting up and working from local to production with db environments.

@AlfredNutile

So glad someone else is blown away by how good  Supabase is. The ability to write Apis in a function and enjoy the dev process (Ai and human) is what I am enjoying right now with it.

@OnlyMon0

This is a really good video and sets up a great foundation for using supabase. This is the video I wish I had when first starting!!

@richardsloan9395

Great video. Would love to hear more about the Postgres MCP server side of things!

@ascend5

Thanks for the awesome video Yifan! A couple of questions (from a new AI coder):

- Syncing schema in DB with schema in code: when asking AI to write code based on existing DB schema, do you want it to get the schema info from the migration files or by queryinging the DB through CLI command? Supbase's RLS policies create many restrictions that cause many migrations to fail, therefore many migration files in the code will be 'wrong' and AI won't know it.  

- Major Supabase flaw: Point in time recovery costs $100pm. $25pm plan offers daily backup (not good enough). How do you deal with backups??

- MCP video: Yes, that would be very helpful

@ed_tech_tales

Is it possible to create an app without a backend using Supa base?

@blakenator123

Thanks Yifan, so useful! Definitely interested in a video like this about auth.

@matiaspenas827

great video! one question, is there a previous video of this one? I see that the first prompt is updating some files πŸ€”

@richardadonnell

🎯 Key points for quick navigation:

00:00 πŸ€– AI-powered methods now reduce production database management from hours to minutes.
00:25 πŸ“š The video introduces core database concepts like schemas, tables, and columns, assuming basic PostgreSQL knowledge.
00:54 🐳 Supabase acts as a robust wrapper around PostgreSQL, offering a local CLI tool for streamlined testing using Docker.
02:16 πŸ”— Local deployment prints API endpoints (including DB URLs), enabling seamless connection and testing without risking production data.
03:27 🚫 A strong recommendation is made to always use a local environment for testing to prevent production mishaps.
04:35 ✍️ AI integration automates the creation of migration files, significantly reducing the need for manual SQL changes.
08:01 ⚑ AI reads the existing database schema to generate both migrations and TypeScript types, enhancing development efficiency.
09:11 ⏱️ Database triggers and functions are used to automatically manage 'created_at' and 'updated_at' columns, ensuring consistency.
16:06 πŸ” The Supabase β€˜db diff’ command generates schema differences to keep code and UI changes perfectly in sync.
18:47 πŸ› οΈ Integrating Postgres MCP allows direct debugging and verification of schema changes against the local database.
22:39 🎯 Automatically generated types files boost TypeScript autocompletion and enable compile-time error checking.
23:50 πŸ” Database-level management of timestamp columns via triggers eliminates the need for manual code updates.
25:37 πŸ—ƒοΈ Seed Data Setup: Use C.SQL and seed.sql files to separate schema migrations from initial data insertion.
26:44 πŸ“€ Data Dumping: Leverage Superbase's CLI to dump your local database data into a seed file for consistent testing.
28:05 πŸ”„ Database Reset: The db reset command clears data, reapplies migrations, and reloads seed data to maintain a pristine local environment.
29:10 🀝 CI Consistency: Integrate Superbase CLI with CI tools (like GitHub Actions) to ensure every test starts with an identical database state.
30:31 🌿 Database Branching: Use migration files to create branch-specific database snapshots for isolated feature testing.
31:53 πŸš€ Production Deployment: Apply migration diffs to production seamlessly with the superbase db push command.
32:08 ⚠️ Backwards Compatibility: Design migrations to avoid breaking changes by phasing out dependencies before column removal.
33:44 πŸ”’ Role Level Security: Enforce RLS policies to ensure users only access data linked to their own user IDs.
36:11 🀫 RLS Caveats: Be aware that RLS may cause silent failures on read queries, masking unauthorized access issues.
37:31 🏁 Finalizing Deployments: Once migrations and tests pass, push all changes to production to minimize direct SQL edits.
38:51 πŸŽ‰ Free Tier & Upgrades: Enjoy robust Superbase features on the free tier, with paid plans offering extra benefits like data backup.
39:33 🌟 Feature-Rich Simplicity: Superbase simplifies database management with migrations, seeding, branching, and securityβ€”all with minimal manual intervention.

Made with HARPA AI

@EimantasK

I wish someone would explain me why I'm always getting supabase auth issues... I use email and pass authentication but I often get user is not athenticated error. Don't understand why...

@gpt10

Have you considered releasing a SAAS template with all your cursor rules, project structure, .requirement files etc. already set?

@bobjones7274

most businesses have maybe 100 or columns and complex joins and millions of rows, and NLP queries do not work very well...Did you read Uber's article about how they still cannot prevent hallucinations?  Do you have any solutions which do not cost thousands of dollars per month???

@techfren

Subscribed ty!

@alexrobschmitt

Could you please enable automatic dubbing on your videos? They are great and this would be very useful for those who have difficulty reading.

@huvisoft

why not just prisma, super easy to migrate

@AlohaEru

Postgres terrible