mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 09:55:06 +03:00
Allow to use the `pg-delta` capability for merge requests diffing. Feature flag it behind an auto opt-in flag. Must be merged after: https://github.com/supabase/platform/pull/29776 <img width="921" height="623" alt="Screenshot 2026-02-17 at 16 50 38" src="https://github.com/user-attachments/assets/bfe704e9-4137-45e1-b0b5-1cecce284d6e" /> Also updated the loading + final state of the diff view to: 1. Take all the height available - From: <img width="1894" height="893" alt="Screenshot 2026-02-16 at 20 46 15" src="https://github.com/user-attachments/assets/22ed8c72-2d9d-4b68-b315-6d40aefc0b3c" /> - To: <img width="1629" height="1396" alt="Screenshot 2026-02-16 at 20 57 26" src="https://github.com/user-attachments/assets/6e83c8e9-607d-4077-977e-046058ce3e44" /> 2. Show a proper loading state rather than just a plain grey skeleton - From: <img width="2232" height="1137" alt="Screenshot 2026-02-20 at 15 02 51" src="https://github.com/user-attachments/assets/0c924b04-d60f-49b5-a5a0-3bf1942bfdef" /> - To: <img width="2231" height="1129" alt="Screenshot 2026-02-20 at 15 05 46" src="https://github.com/user-attachments/assets/49751001-1818-4842-a0c8-b74683c2e9bc" />
33 lines
1.3 KiB
TypeScript
33 lines
1.3 KiB
TypeScript
import { InlineLink } from 'components/ui/InlineLink'
|
|
|
|
const PG_DELTA_REPO_URL = 'https://github.com/supabase/pg-toolbelt'
|
|
|
|
export const PgDeltaDiffPreview = () => {
|
|
return (
|
|
<div>
|
|
<p className="text-sm text-foreground-light mb-4">
|
|
Use the <InlineLink href={PG_DELTA_REPO_URL}>pg-delta</InlineLink> 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.
|
|
</p>
|
|
<div className="my-6">
|
|
<p className="text-sm text-foreground mb-2 font-medium">Please note:</p>
|
|
<ul className="list-disc pl-6 text-sm text-foreground-light space-y-1">
|
|
<li>pg-delta is in alpha; behavior may change.</li>
|
|
<li>
|
|
Generated migrations may contain errors. Review each migration carefully before
|
|
executing it.
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div className="space-y-2 !mt-4">
|
|
<p className="text-sm">Enabling this preview will:</p>
|
|
<ul className="list-disc pl-6 text-sm text-foreground-light space-y-1">
|
|
<li>Use pg-delta to compute schema diffs when comparing branches, instead of migra</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|