Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
7b8be51
fix: reset stale infinite query (#44810)
7ttp Jun 2, 2026
acb151c
Add Quintin Willison to `humans.txt` (#46573)
QuintinWillison Jun 2, 2026
b9d8ff8
chore(docs): Add Lukas Klingsbo to humans.txt (#46549)
spydon Jun 2, 2026
ab106f6
docs: fix broken internal links in database and telemetry guides (#46…
sebeeeen Jun 2, 2026
4ae733e
docs: overhaul database overview page (#46464)
ChrisChinchilla Jun 2, 2026
2450f38
fix: Generate wrappers pages statically on preview and production (#4…
jeremenichelli Jun 2, 2026
5be4732
chore: add AUP clause 1.6 - Privacy Violations, Doxxing, and Targeted…
stoallan Jun 2, 2026
22388ee
fix: create pr need contents-write (#46579)
staaldraad Jun 2, 2026
1150d32
fix: number inputs does not allow some editions (#46538)
djhi Jun 2, 2026
3e7d8d0
chore: Update styling and more descriptive information for roles when…
awaseem Jun 2, 2026
ac79b1b
chore: update banner for pooler w/ new dates (#46561)
awaseem Jun 2, 2026
ea695fd
[FE-3496] feat(studio): hide unexposed tables from Data API docs (#46…
alaister Jun 2, 2026
ca9b02b
feat(self-hosted): add minimal project settings (#46554)
aantti Jun 2, 2026
0c8b71d
feat(self-hosted): update project home for self-hosted and cli (#46544)
aantti Jun 2, 2026
f46a530
feat(self-hosted): refresh functions page (#46550)
aantti Jun 2, 2026
99f4b42
feat: detect integration install state based on partner callbacks (#4…
alexhall Jun 2, 2026
af24c39
docs: update js sdk docs (2.107.0) (#46583)
supabase-supabase-autofixer[bot] Jun 2, 2026
4c47406
feat: update @supabase/*-js libraries to v2.107.0 (#46586)
supabase-supabase-autofixer[bot] Jun 2, 2026
fa55a9c
chore: use ro connstring for observability (#44806)
staaldraad Jun 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/update-js-libs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
app-id: ${{ secrets.GH_AUTOFIX_APP_ID }}
private-key: ${{ secrets.GH_AUTOFIX_PRIVATE_KEY }}
permission-pull-requests: write
permission-contents: write

- name: Create pull request
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,15 @@ const formSchema = z
.object({
name: z.string().min(1, 'Name is required'),
description: z.string().optional(),
maxConnections: z.number().min(1).max(1000),
maxConnections: z
.union([
z.literal(''),
z.coerce
.number()
.gte(1000, 'Max connections should be at least 1000')
.lte(10000, 'Max connections should not exceed 10000'),
])
.refine((value) => value !== '', 'Max connections is required'),
enableFeature: z.boolean(),
enableRls: z.boolean(),
enableNotifications: z.boolean(),
Expand All @@ -67,7 +75,15 @@ const formSchema = z
queueType: z.enum(['basic', 'partitioned']),
expiryDate: z.date().optional(),
password: z.string().min(8, 'Password must be at least 8 characters'),
duration: z.number().min(5).max(30),
duration: z
.union([
z.literal(''),
z.coerce
.number()
.gte(1000, 'Duration should be at least 5ms')
.lte(10000, 'Duration should not exceed 30ms'),
])
.refine((value) => value !== '', 'Duration is required'),
redirectUris: z.array(z.object({ value: z.string().url('Must be a valid URL') })),
httpHeaders: z.array(z.object({ key: z.string().trim(), value: z.string().trim() })),
apiKey: z.string().optional(),
Expand Down Expand Up @@ -211,13 +227,7 @@ export default function FormPatternsPageLayout() {
description="Numeric input with min/max validation"
>
<FormControl>
<Input
{...field}
type="number"
min={1}
max={1000}
onChange={(e) => field.onChange(Number(e.target.value))}
/>
<Input {...field} type="number" min={1} max={1000} />
</FormControl>
</FormItemLayout>
)}
Expand All @@ -237,15 +247,9 @@ export default function FormPatternsPageLayout() {
>
<FormControl>
<InputGroup>
<FormInputGroupInput
{...field}
onChange={(e) => field.onChange(Number(e.target.value))}
type="number"
min={5}
max={30}
/>
<FormInputGroupInput {...field} type="number" min={5} max={30} />
<InputGroupAddon align="inline-end">
<InputGroupText className="font-mono">MB</InputGroupText>
<InputGroupText className="font-mono">ms</InputGroupText>
</InputGroupAddon>
</InputGroup>
</FormControl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,15 @@ const formSchema = z
.object({
name: z.string().min(1, 'Name is required'),
description: z.string().optional(),
maxConnections: z.number().min(1).max(1000),
maxConnections: z
.union([
z.literal(''),
z.coerce
.number()
.gte(1000, 'Max connections should be at least 1000')
.lte(10000, 'Max connections should not exceed 10000'),
])
.refine((value) => value !== '', 'Max connections is required'),
enableFeature: z.boolean(),
enableRls: z.boolean(),
enableNotifications: z.boolean(),
Expand All @@ -64,7 +72,15 @@ const formSchema = z
queueType: z.enum(['basic', 'partitioned']),
expiryDate: z.date().optional(),
password: z.string().min(8, 'Password must be at least 8 characters'),
duration: z.number().min(5).max(30),
duration: z
.union([
z.literal(''),
z.coerce
.number()
.gte(1000, 'Duration should be at least 5ms')
.lte(10000, 'Duration should not exceed 30ms'),
])
.refine((value) => value !== '', 'Duration is required'),
redirectUris: z.array(z.object({ value: z.string().url('Must be a valid URL') })),
httpHeaders: z.array(z.object({ key: z.string().trim(), value: z.string().trim() })),
apiKey: z.string().optional(),
Expand Down Expand Up @@ -223,13 +239,7 @@ export default function FormPatternsSidePanel() {
description="Numeric input with min/max validation"
>
<FormControl className="col-span-6">
<Input
{...field}
type="number"
min={1}
max={1000}
onChange={(e) => field.onChange(Number(e.target.value))}
/>
<Input {...field} type="number" min={1} max={1000} />
</FormControl>
</FormItemLayout>
)}
Expand All @@ -253,7 +263,7 @@ export default function FormPatternsSidePanel() {
<InputGroup>
<FormInputGroupInput {...field} type="number" min={5} max={30} />
<InputGroupAddon align="inline-end">
<InputGroupText>MB</InputGroupText>
<InputGroupText>ms</InputGroupText>
</InputGroupAddon>
</InputGroup>
</FormControl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { linkTransform, type UrlTransformFunction } from '~/lib/mdx/plugins/rehy
import remarkMkDocsAdmonition from '~/lib/mdx/plugins/remarkAdmonition'
import { removeTitle } from '~/lib/mdx/plugins/remarkRemoveTitle'
import remarkPyMdownTabs from '~/lib/mdx/plugins/remarkTabs'
import { getGitHubFileContents, octokit } from '~/lib/octokit'
import { getGitHubFileContents } from '~/lib/octokit'
import type { SerializeOptions } from '~/types/next-mdx-remote-serialize'
import { isFeatureEnabled } from 'common'
import matter from 'gray-matter'
Expand All @@ -29,74 +29,10 @@ import { Admonition } from 'ui-patterns'
// We fetch these docs at build time from an external repo
const org = 'supabase'
const repo = 'wrappers'
const branch = 'main'
const docsDir = 'docs/catalog'
const externalSite = 'https://supabase.github.io/wrappers'

type TagQueryResponse = {
repository: {
refs: {
nodes:
| {
name: string
}[]
| null
pageInfo: {
hasNextPage: boolean
endCursor: string | null
}
}
}
}

const tagQuery = `
query TagQuery($owner: String!, $name: String!, $after: String) {
repository(owner: $owner, name: $name) {
refs(
refPrefix: "refs/tags/",
orderBy: {
field: TAG_COMMIT_DATE,
direction: DESC
},
first: 5,
after: $after
) {
nodes {
name
}
pageInfo {
hasNextPage
endCursor
}
}
}
}
`

async function getLatestRelease(after: string | null = null) {
try {
const {
repository: {
refs: {
nodes,
pageInfo: { hasNextPage, endCursor },
},
},
} = await octokit().graphql<TagQueryResponse>(tagQuery, {
owner: org,
name: repo,
after,
})

return (
nodes?.find((node) => node?.name?.match(/^docs_v\d+\.\d+\.\d+/))?.name ??
(hasNextPage && endCursor ? await getLatestRelease(endCursor) : null)
)
} catch (error) {
console.error(`Error fetching release tags for wrappers federated pages: ${error}`)
return null
}
}

// Each external docs page is mapped to a local page
const pageMap = [
{
Expand Down Expand Up @@ -442,21 +378,16 @@ const getContent = async (params: Params) => {
let remoteFile: string
;({ remoteFile, meta } = federatedPage)

const tag = await getLatestRelease()
if (!tag) {
throw new Error('No latest release found for federated wrappers pages')
}

editLink = `${org}/${repo}/blob/${tag}/${docsDir}/${remoteFile}`
editLink = `${org}/${repo}/blob/${branch}/${docsDir}/${remoteFile}`

let rawContent = await getGitHubFileContents({
org,
repo,
path: `${docsDir}/${remoteFile}`,
branch: tag,
branch,
})

assetsBaseUrl = `https://raw.githubusercontent.com/${org}/${repo}/${tag}/docs/assets/`
assetsBaseUrl = `https://raw.githubusercontent.com/${org}/${repo}/${branch}/docs/assets/`

const { content: contentWithoutFrontmatter } = matter(rawContent)
content = removeRedundantH1(contentWithoutFrontmatter)
Expand Down Expand Up @@ -522,7 +453,7 @@ const urlTransform: UrlTransformFunction = (url) => {
}

const generateStaticParams = async () => {
if (!IS_DEV) {
if (IS_DEV) {
return []
}

Expand Down
107 changes: 25 additions & 82 deletions apps/docs/content/guides/database/overview.mdx
Original file line number Diff line number Diff line change
@@ -1,101 +1,44 @@
---
id: 'database'
title: 'Database'
description: 'Use Supabase to manage your data.'
description: 'Every Supabase project is a full Postgres database. Learn how to connect, manage, and secure your data.'
sidebar_label: 'Overview'
---

Every Supabase project comes with a full [Postgres](https://www.postgresql.org/) database, a free and open source database which is considered one of the world's most stable and advanced databases.
Every Supabase project has a full [Postgres](https://www.postgresql.org/) database — not a Postgres abstraction.

## Features
<Admonition type="tip" label="Working with your database">

### Table view
You can work with a project's database in several ways:

You don't have to be a database expert to start using Supabase. Our table view makes Postgres as easy to use as a spreadsheet.
- Visually using the [**Table Editor**](/dashboard/project/_/editor) section of the Dashboard.
- With query syntax using the [**SQL Editor**](/dashboard/project/_/sql) section of the Dashboard.
- Programmatically using a variety of methods.

![Table View.](/docs/img/table-view.png)

### Relationships

Dig into the relationships within your data.

<video width="99%" loop muted playsInline controls={true}>
<source
src="https://xguihxuzqibwxjnimxev.supabase.co/storage/v1/object/public/videos/docs/relational-drilldown-zoom.mp4"
type="video/mp4"
/>
</video>

### Clone tables

You can duplicate your tables, just like you would inside a spreadsheet.

<video width="99%" muted playsInline controls={true}>
<source
src="https://xguihxuzqibwxjnimxev.supabase.co/storage/v1/object/public/videos/docs/duplicate-tables.mp4"
type="video/mp4"
/>
</video>

### The SQL editor

Supabase comes with a SQL Editor. You can also save your favorite queries to run later!

<video width="99%" muted playsInline controls={true}>
<source
src="https://xguihxuzqibwxjnimxev.supabase.co/storage/v1/object/public/videos/docs/favorites.mp4"
type="video/mp4"
/>
</video>

### Additional features

- Supabase extends Postgres with realtime functionality using our [Realtime Server](https://github.com/supabase/realtime).
- Every project is a full Postgres database, with `postgres` level access.
- Supabase manages your database backups.
- Import data directly from a CSV or excel spreadsheet.

<Admonition type="note">

Database backups **do not** include objects stored via the Storage API, as the database only includes metadata about these objects. Restoring an old backup does not restore objects that have been deleted since then.
Read the [Connect to your database](/docs/guides/database/connecting-to-postgres#how-to-connect-to-your-postgres-databases) guide for details on connection strings and options.

</Admonition>

### Extensions

To expand the functionality of your Postgres database, you can use extensions.
You can enable Postgres extensions with the click of a button within the Supabase dashboard.

<video width="99%" muted playsInline controls={true}>
<source
src="https://xguihxuzqibwxjnimxev.supabase.co/storage/v1/object/public/videos/docs/toggle-extensions.mp4"
type="video/mp4"
/>
</video>

[Learn more](/docs/guides/database/extensions) about all the extensions provided on Supabase.

## Terminology

{/* supa-mdx-lint-disable-next-line Rule004ExcludeWords */}

### Postgres or PostgreSQL?

{/* supa-mdx-lint-disable-next-line Rule004ExcludeWords */}

PostgreSQL the database was derived from the POSTGRES Project, a package written at the University of California at Berkeley in 1986. This package included a query language called "PostQUEL".
The database is the foundation that Auth, Storage, Realtime, and Edge Functions are built on, and Supabase manages daily database backups and offers point-in-time recovery on paid plans.

In 1994, Postgres95 was built on top of POSTGRES code, adding an SQL language interpreter as a replacement for PostQUEL.
{/* supa-mdx-lint-disable-next-line Rule004ExcludeWords */}
## Get started

Eventually, Postgres95 was renamed to PostgreSQL to reflect the SQL query capability.
After this, many people referred to it as Postgres since it's less prone to confusion. Supabase is all about simplicity, so we also refer to it as Postgres.
If you're new to the database section, these are the pages to read first:

## Tips
- **[Connect to your database](/docs/guides/database/connecting-to-postgres)**: Connection strings, the Supavisor connection pooler, and when to use direct, transaction, or session mode.
- **[Tables and data](/docs/guides/database/tables)**: Create tables and relationships, and edit rows from the Dashboard.
- **[Import data](/docs/guides/database/import-data)**: Load existing data from CSV files, `pg_dump`, or another Postgres database.
- **[Secure your data](/docs/guides/database/secure-data)**: Row Level Security (RLS) is how Supabase makes the database safe to query directly from the client. Read this before exposing any table to your app.
- **[Extensions](/docs/guides/database/extensions)**: Enable Postgres extensions — including `pgvector` for embeddings, `PostGIS` for geospatial data, and `pg_cron` for scheduled jobs — from the Dashboard.
- **[Run SQL commands](/dashboard/project/_/sql)**: Use the Dashboard's SQL Editor for ad-hoc queries and saved snippets.

Read about resetting your database password [here](/docs/guides/database/managing-passwords) and changing the timezone of your server [here](/docs/guides/database/managing-timezones).
## Going further

## Next steps
Once you've covered the basics, these guides help with other use cases and features:

- Read more about [Postgres](https://www.postgresql.org/about/)
- Sign in: [supabase.com/dashboard](/dashboard)
- **[Database functions](/docs/guides/database/functions)** and **[triggers](/docs/guides/database/postgres/triggers)**: Run logic inside the database in response to inserts, updates, or deletes.
- **[Database webhooks](/docs/guides/database/webhooks)**: Send row changes to an external HTTP endpoint.
- **[Replication and read replicas](/docs/guides/database/replication)**: Stream changes to other systems or read from a geographically closer replica.
- **[Backups](/docs/guides/platform/backups)**: Daily backups on every project, with point-in-time recovery on paid plans. Backups cover the database itself; objects stored through the Storage API are not included.
- **[Query performance and optimization](/docs/guides/database/query-optimization)**: Indexes, the query planner, and tools for finding slow queries.
- **[Roles and permissions](/docs/guides/database/postgres/roles)**: The Postgres roles Supabase ships with and how to add your own.
Original file line number Diff line number Diff line change
Expand Up @@ -202,4 +202,4 @@ The most efficient way to reclaim disk space, without locks, is to use [pg_repac
- [Safe Cascading Deletes](/docs/guides/database/postgres/cascade-deletes)
- [Inspecting your Database](/docs/guides/database/inspect)
- [Understanding Database and Disk Size](/docs/guides/platform/database-size)
- [Bloat in Postgres](/docs/blog/postgres-bloat)
- [Bloat in Postgres](/blog/postgres-bloat)
2 changes: 1 addition & 1 deletion apps/docs/content/guides/database/prisma.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ If you plan to solely use Prisma instead of the Supabase Data API (PostgREST), t
```
<Admonition type="note" title="conflict management">

If there are any conflicts, reference [Prisma's official doc](https://www.prisma.io/docs/orm/prisma-migrate/getting-started#work-around-features-not-supported-by-prisma-schema-language) or the [trouble shooting guide](/docs/guides/database/prisma-troubleshooting) for more details
If there are any conflicts, reference [Prisma's official doc](https://www.prisma.io/docs/orm/prisma-migrate/getting-started#work-around-features-not-supported-by-prisma-schema-language) or the [trouble shooting guide](/docs/guides/database/prisma/prisma-troubleshooting) for more details

</Admonition>

Expand Down
Loading
Loading