Use this to lock down the schema if you have JSON or JSONB columns

preview_player
Показать описание
pg_jsonschema lets you validate schema for your JSON and JSONB columns. In this video, Tyler Shukert walks you through how to restrict the schema of your JSON and JSONB columns to ensure the integrity of the database is kept.

JSON and JSONB columns allow you to be flexible with what type of data you want to store, but you might still want to restrict the schema of the JSON to some degree. pg_jsonschema is a light-weight Postgres extension that allows you to define a schema for your JSON and JSONB columns to ensure database integrity.

00:00 Intro
00:34 Go over the table
01:15 How to use pg_jsonschema
04:35 Apply constraints on table
06:02 Outro

💻 Videos to watch next:
▶ FASTEST way to host a Postgres database (2024):

👇 Learn more about Supabase 👇

📱 Connect with Us:

ABOUT SUPABASE:
Supabase is the open source Firebase alternative. Supabase provides a full Postgres database for every project with pgvector, backups, realtime, and more. Add and manage email and password, passwordless, OAuth, and mobile logins to your project through a suite of identity providers and APIs.

Build in a weekend, scale to millions.

#Supabase #AppDevelopment #RealtimeApps #DeveloperTools
Рекомендации по теме
Комментарии
Автор

Thanks for tuning in! JSON Schema has an amazing docs that walk you through various examples of how you can use it.

Supabase
Автор

Robert Downey Jr. always has killer tips! 💪Great tutorial!

skrobonja
Автор

Exactly what I needed, keep the tips coming! Loving Supabase (and PostgreSQL) everyday more and more! Thanks!

EmielvanGoor
Автор

Please tell me it has support for your typescript types codegen.

luisandrade
Автор

wow you are still updating this series, cute, good luck, i started this whole project through the login profile videos 😆!

Автор

This is super helpful!! Any performance concerns with this extension? (esp if you have a large object schema)

ipranay
Автор

Wow - thanks for sharing. Was looking for this video and as I have used RXDB before I can see how it works. Thanks a lot.

rembautimes
Автор

Have you any tips for having types in our code when processing jsonb data?

mrbjjackson
Автор

Adding types support for the json in the javascript sdk anytime soon?

yarapolana
Автор

how install it in postgreql inside docker? or is there ready to use docker image with this extension?

kuqmua
Автор

How do you handle evolving schemas? migrations?

AymericRabot
Автор

What is the use case for this? If your schema needs to be strict, isnt it better to create other tables?

williamliu
Автор

Great feature and tutorial :)
Anyone think it’d be useful to have a tool that can convert these schemas into zod object schemas?

andylee
Автор

Thank you for sharing this.
As a self-taught developer, I have learned a lot with Supabase.

Can you create a Postgres tutorial as well?

takeshikriang
Автор

Great! How do you do this via the dashboard gui?

AmitKapadiaUK