diff --git a/apps/docs/content/guides/api/rest/generating-types.mdx b/apps/docs/content/guides/api/rest/generating-types.mdx
index 3f10c9dee37bd..c728c698795b4 100644
--- a/apps/docs/content/guides/api/rest/generating-types.mdx
+++ b/apps/docs/content/guides/api/rest/generating-types.mdx
@@ -46,6 +46,12 @@ or in case of local development:
npx supabase gen types typescript --local > database.types.ts
```
+or in case of a self-hosted instance (see [Accessing Postgres](/docs/guides/self-hosting/docker#accessing-postgres) for more information):
+
+```bash
+npx supabase gen types typescript --db-url postgres://postgres.[POOLER_TENANT_ID]:[POSTGRES_PASSWORD]@[your-domain-or-ip]:5432/postgres --schema public > database.types.ts
+```
+
These types are generated from your database schema. Given a table `public.movies`, the generated types will look like:
```sql
diff --git a/apps/docs/content/guides/storage/buckets/fundamentals.mdx b/apps/docs/content/guides/storage/buckets/fundamentals.mdx
index 72e27f0339f58..1a1ff75fb2439 100644
--- a/apps/docs/content/guides/storage/buckets/fundamentals.mdx
+++ b/apps/docs/content/guides/storage/buckets/fundamentals.mdx
@@ -17,7 +17,7 @@ When a bucket is set to **Private** all operations are subject to access control
The only ways to download assets within a private bucket is to:
-- Use the [download method](/docs/reference/javascript/storage-from-download) by providing a authorization header containing your user's JWT. The RLS policy you create on the `storage.objects` table will use this user to determine if they have access.
+- Use the [download method](/docs/reference/javascript/storage-from-download) by providing an authorization header containing your user's JWT. The RLS policy you create on the `storage.objects` table will use this user to determine if they have access.
- Create a signed URL with the [`createSignedUrl` method](/docs/reference/javascript/storage-from-createsignedurl) that can be accessed for a limited time.
#### Example use cases:
diff --git a/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx b/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx
index 043ee9cd303fa..c63dbd112e99c 100644
--- a/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx
+++ b/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx
@@ -4,12 +4,12 @@ import { noop } from 'lodash'
import { useQueryState } from 'nuqs'
import {
createContext,
- PropsWithChildren,
useCallback,
useContext,
useEffect,
useMemo,
useState,
+ type PropsWithChildren,
} from 'react'
import { useFeaturePreviews } from './useFeaturePreviews'
@@ -97,6 +97,12 @@ export const useIsBranching2Enabled = () => {
return gitlessBranchingEnabled && flags[LOCAL_STORAGE_KEYS.UI_PREVIEW_BRANCHING_2_0]
}
+export const useIsPgDeltaDiffEnabled = () => {
+ const { flags } = useFeaturePreviewContext()
+ const pgDeltaDiffEnabled = useFlag('pgdeltaDiff')
+ return pgDeltaDiffEnabled && flags[LOCAL_STORAGE_KEYS.UI_PREVIEW_PG_DELTA_DIFF]
+}
+
export const useIsAdvisorRulesEnabled = () => {
const { flags } = useFeaturePreviewContext()
const advisorRulesEnabled = useFlag('advisorRules')
diff --git a/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewModal.tsx b/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewModal.tsx
index cbf5eb934fe4c..106f6ea8d1559 100644
--- a/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewModal.tsx
+++ b/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewModal.tsx
@@ -24,6 +24,7 @@ import { APISidePanelPreview } from './APISidePanelPreview'
import { Branching2Preview } from './Branching2Preview'
import { CLSPreview } from './CLSPreview'
import { useFeaturePreviewContext, useFeaturePreviewModal } from './FeaturePreviewContext'
+import { PgDeltaDiffPreview } from './PgDeltaDiffPreview'
import { QueueOperationsPreview } from './QueueOperationsPreview'
import { TableFilterBarPreview } from './TableFilterBarPreview'
import { UnifiedLogsPreview } from './UnifiedLogsPreview'
@@ -33,6 +34,7 @@ const FEATURE_PREVIEW_KEY_TO_CONTENT: {
[key: string]: ReactNode
} = {
[LOCAL_STORAGE_KEYS.UI_PREVIEW_BRANCHING_2_0]: ,
+ [LOCAL_STORAGE_KEYS.UI_PREVIEW_PG_DELTA_DIFF]: ,
[LOCAL_STORAGE_KEYS.UI_PREVIEW_ADVISOR_RULES]: ,
[LOCAL_STORAGE_KEYS.UI_PREVIEW_API_SIDE_PANEL]: ,
[LOCAL_STORAGE_KEYS.UI_PREVIEW_CLS]: ,
diff --git a/apps/studio/components/interfaces/App/FeaturePreview/PgDeltaDiffPreview.tsx b/apps/studio/components/interfaces/App/FeaturePreview/PgDeltaDiffPreview.tsx
new file mode 100644
index 0000000000000..10d3743388671
--- /dev/null
+++ b/apps/studio/components/interfaces/App/FeaturePreview/PgDeltaDiffPreview.tsx
@@ -0,0 +1,32 @@
+import { InlineLink } from 'components/ui/InlineLink'
+
+const PG_DELTA_REPO_URL = 'https://github.com/supabase/pg-toolbelt'
+
+export const PgDeltaDiffPreview = () => {
+ return (
+
+
+ Use the pg-delta project to generate
+ schema diffs instead of migra when creating migrations from branch comparisons. pg-delta is
+ in alpha and is designed to better handle RLS (Row Level Security) and other schema
+ constructs.
+
+
+
Please note:
+
+
pg-delta is in alpha; behavior may change.
+
+ Generated migrations may contain errors. Review each migration carefully before
+ executing it.
+
+
+
+
+
Enabling this preview will:
+
+
Use pg-delta to compute schema diffs when comparing branches, instead of migra