This commit is contained in:
Terry Sutton committed 2023-08-07 22:20:24 -02:30
1 parent 576f00c09e
commit 55c58c1fde
7 files changed
+33 -70

No files matched your search

@@ -37,12 +37,12 @@ Here's the highlight reel:
</li>
<li>[**Schema Visualizer**](#visualizer): — see all your table schemas visually.</li>
<li>[**Role Management**](#roles): — fine-grained access to table data</li>
<li>[**Shared SQL Snippets**](#snippets): — share your AI-crafted snippets with the team</li>
<li>[**Shared SQL Snippets**](#snippets): — share your snippets with the team</li>
<li>[**Database Migration UI**](#migrations): — your database, with receipts</li>
<li>[**Wrappers UI**](#wrappers): — easily query foregin data</li>
</ul>
## Supabase AI — assisted database development
## Supabase AI, right in the SQL Editor
<video width="99%" autoPlay loop muted playsInline controls={true}>
<source
@@ -51,25 +51,30 @@ Here's the highlight reel:
/>
</video>
One of our guiding principles at Supabase is to make SQL more accessible to developers. We don't want to just abstract it away with a custom implementation. By embracing SQL, developers learn important, transferable skills while they build on top of Supabase.
In Launch Week 7, [we added Supabase AI to the Studio](https://supabase.com/blog/supabase-studio-2.0). Through our ⌘K menu, you could ask Supabase AI to do all sorts of common tasks — create tables, views and indexes, write database functions, write RLS policies, and more.
In the past few months, AI advancements have made this easy! Writing a complex SQL query is now as simple as asking ChatGPT, and we're leaning into this approach with our Studio. AI gives developers superpowers, and by providing relevant context, Supabase gives AI superpowers.
After this release, we made two key realizations:
AI has already changed a lot about the way we work as developers. We can use ChatGPT to write code for us as fast as we can prompt it. We wanted to bring this power into the Studio with integrations that will help you work even faster than before.
1. people love having computers write their SQL for them!
2. many of you are using the SQL Editor as the heart (and engine!) of your projects.
Today you'll be able to do many common SQL operations with the help of AI. You can create tables, views and indexes, write functions and triggers, and more, right from the ⌘K menu.
Today, we're releasing a huge improvement to our SQL Editor. First up, we've added Supabase AI directly inline in the editor. It's always accessible, and always ready to help. As before, you can give it a prompt (`create an orders table for me`) and it will return the SQL for you, but now it does so much more.
Soon, we'll also let you opt-in to sending your table schemas to OpenAI to help fine tune queries to your project. All this should result in a dramatic boost in development speed. Maybe you'll only need half a weekend to scale to millions now!
![New query](/images/blog/launch-week-8/day-3/supabase-ai-blank.png)
As with every ⌘K menu, quick navigation is at the heart of things. You'll now be able to jump to any page in the Studio in a couple of keystrokes. You can also search the Docs directly from the menu.
Supabase AI is aware of the SQL snippet in the editor and can modify it for you. You can ask it to change `customers` to `customer_orders`, for example. You can interact with the code the same way you would converse with ChatGPT until its just right.
We'll be actively working on our ⌘K menu in the coming months to make it faster and even more useful for you. Next, we're going to focus on better support for writing RLS policies. Stay tuned, and make sure to explore how we're integrating AI [behind the scenes](https://supabase.com/blog/tags/AI)!
![Create a table](/images/blog/launch-week-8/day-3/create-orders.png)
Huge props for the amazing work done on the [⌘K package](https://cmdk.paco.me/) we've built on top of here.
Next, we've added a diffing view for changes that Supabase AI has made to your SQL snippet. You can tell Supabase AI what you want changed, and visualize is as you would a Git diff. From this view, you can accept or reject the diffs, and keep asking Supabase AI to make changes until you're satisfied.
---
![Create a table diff](/images/blog/launch-week-8/day-3/create-orders-diff.png)
Along with the new AI features, we also doubled-down on some of the critical missing pieces for a Postgres UI. Before we started to work on any of these, we combed through user feedback and tallied up the most submitted Feature Requests on GitHub.
For a long time we've wondered how we could make it easier to teach developers how to use SQL. It's a good thing we didn't solve that problem too fast, because it turns out that AI does a much better job than we could have ourselves.
With Supabase AI, you won't even need the whole weekend to scale to millions.
Along with these huge AI features, we also managed to add a bunch of new improvements elsewhere around the Studio. Several of these features have come either from requests from the community, or are contributions by community members themselves.
<div className="bg-gray-300 rounded-lg px-6 py-2 italic">
@@ -77,79 +82,37 @@ Along with the new AI features, we also doubled-down on some of the critical mis
</div>
## GraphiQL
## Schema Visualizer
![Logs UI](/images/blog/lw7-studio/graphiql.png)
![Schema Visualizer](/images/blog/launch-week-8/day-3/visualizer.png)
While GraphQL has been available in Supabase for just over a year, we haven't provided a visual tool for using it. You can now use the very popular GraphiQL directly from the Studio. GraphiQL is a browser tool for writing, validating, and testing GraphQL testing. Being able to use a fully integrated GraphQL IDE is a huge DX win.
For a while now, many Supabase users have been using [Zernonia's](https://github.com/zernonia) [Supabase Schema visualization tool](https://supabase-schema.vercel.app/). While this was an amazing tool, many users wanted to see something like this directly integrated into the Studio.
## Cascade deletes
We opened an [Issue for it on Github](https://github.com/supabase/supabase/issues/15585) and within a day or two the wheels were in motion. Within a couple of weeks, the feature was polished up and merged. It's inspiring to see the power of open source at work. This feature wasn't trivial, and to see community members take it from feature request to production in just a couple of weeks is mind-blowing. We unquestionably have one of the best open source communities out there. Huge thanks to [kamilogorek](https://github.com/kamilogorek) and [adiologydev](https://github.com/adiologydev) for their work on this!
<video width="99%" autoPlay loop muted playsInline controls={true}>
<source
src="https://xguihxuzqibwxjnimxev.supabase.co/storage/v1/object/public/videos/docs/cascade-delete.mp4"
type="video/mp4"
/>
</video>
Special thanks as well to [Zernonia](https://twitter.com/zernonia) for providing the inspiration for this great new feature! OSS FTW.
Cascade deletes are a core feature of Postgres, but have not been available in the Studio UI until now. This has been the #1 feature request from the community for a long time. You can now choose what you want to happen when deleting a referenced row in another table, right from Table Editor side panel.
## Role Management
## Query Performance
Postgres has built-in support for managing users and roles, and this release, we're happy to release a UI for it in the Studio. We're delighted to report that this is another extremely common feature request, fulfilled almost completely by a community member.
![Logs UI](/images/blog/lw7-studio/query-performance.png)
A few months back, we saw this [PR](https://github.com/supabase/supabase/pull/13745) come in out of the blue from [HTMHell](https://github.com/HTMHell). They'd built the entire thing with zero help or direction from our team at all. We were blown away. We had some changes to make on the backend to properly accommodate the UI, and now we're almost ready to get this out into the wild!
We've just released a new Query Performance tool to help you identify slow queries. Using this tool, along with our new [guide](https://supabase.com/docs/guides/platform/performance#examining-query-performance) should help you speed things up. These tools can help you uncover where you might have inefficient queries or schemas, or where you might need indexes or even additional compute resources.
![Role management](/images/blog/launch-week-8/day-3/role-management.png)
## Foreign key selector
Given the security focus of this feature, we want to make sure we do a very thorough job of testing, so we're hoping to make this generally available in the next week or so.
<video width="99%" autoPlay loop muted playsInline controls={true}>
<source
src="https://xguihxuzqibwxjnimxev.supabase.co/storage/v1/object/public/videos/docs/fk-lookup.mp4"
type="video/mp4"
/>
</video>
Massive thanks to [HTMHell](https://github.com/HTMHell) (amazing handle btw) for the work on this!
You can now select a referencing row from another table, rather than having to pass a value manually.
You can also quickly jump to the row being referenced in another table with the _View referencing_ record
button from the grid itself.
## Project-level SQL Snippets
## Postgres Roles
Speaking of commonly requested features, this one has to be in the all-time top 5. Your beautiful, hand-crafted SQL snippets used to be yours and yours alone. Now you can share them with team members and let them bask in your technical prowess.
![Logs UI](/images/blog/lw7-studio/roles.png)
![Share SQL Snippets](/images/blog/launch-week-8/day-3/share-query.png)
The Roles page got a huge revision, making it easy for you to manage access control through users, groups, and permissions. It's now easy to see how many connections you're using and where they're coming from.
You can create a set of project-wide snippets for doing common tasks, making it faster to collaborate and build. To share a snippet, just take a personal snippet that ~~Supabase AI~~ you wrote and share it with the project. It will show up in a new Project Snippets list that's visible to everyone on the team.
## Database Webhooks
![Logs UI](/images/blog/lw7-studio/webhooks.png)
We've wanted to improve the webhooks interface for a long time, and we've finally gotten to it. We now have full support for editing your webhooks, and you can now select an edge function to call instead of having to pass in a url. We're happy to roll this very common request out to the community.
## Table/View definitions
![Logs UI](/images/blog/lw7-studio/definitions.png)
You can now see the SQL definitions for your tables and views, directly from the Table Editor. This is a great way to see how Supabase is translating your UI changes into SQL. This can be useful for creating migrations, getting help, or just for learning more about how Supabase and SQL works.
## API Autodocs
![Logs UI](/images/blog/lw7-studio/api-autodocs.png)
You can now view the auto-generated API docs right from the Table Editor. Grab the SQL and `supabase-js` code for all of the CRUD operations, straight from the table. You can also quickly generate and download a Typescript types file for your table, right from the editor.
### Quality of life improvements
#### Support for many tables
Previously, the Table Editor would get slow and unresponsive when you had many tables. We've made a number of improvements to make it much faster and more responsive. Feel free to make all the tables you need!
#### JSON editing
You've always been able to use the JSON data type in your tables, but editing the data wasn't easy. We've improved the inline Table Editor, and also now allow you open json cells from the side panel for a more spacious editing experience. Next Launch Week we're hoping to decide if it's pronounced “Jason” or “Jay-sawn”. Stay tuned.
#### Nullable columns
Speaking of extremely common feature requests, we've gotten this one a lot in the past few months. You used to have to handle this manually, but now you can now allow text/boolean cells to be null or empty. Supabase, where productivity is more than just an empty (or null) promise.
Teamwork makes the dream work!
## Wrapping Up
Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 KiB