diff --git a/.github/workflows/config-preview.yaml b/.github/workflows/config-preview.yaml
new file mode 100644
index 00000000000..cca3c2d7de3
--- /dev/null
+++ b/.github/workflows/config-preview.yaml
@@ -0,0 +1,63 @@
+name: Config (Preview)
+
+on:
+ pull_request:
+ types:
+ - opened
+ - reopened
+ - synchronize
+ branches:
+ - master
+ paths:
+ - "supabase/**"
+ workflow_dispatch:
+
+jobs:
+ wait:
+ runs-on: ubuntu-latest
+ outputs:
+ status: ${{ steps.check.outputs.conclusion }}
+ steps:
+ - uses: fountainhead/action-wait-for-check@v1.2.0
+ id: check
+ with:
+ checkName: Supabase
+ ref: ${{ github.event.pull_request.head.sha }}
+ token: ${{ secrets.GITHUB_TOKEN }}
+
+ apply:
+ needs:
+ - wait
+ if: ${{ needs.wait.outputs.status == 'success' }}
+ runs-on: ubuntu-latest
+ env:
+ SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
+ TF_VAR_linked_project: xguihxuzqibwxjnimxev
+ TF_VAR_git_branch: ${{ github.head_ref }}
+ TF_CLI_ARGS_apply: -target=supabase_settings.preview
+ defaults:
+ run:
+ working-directory: supabase/remotes
+ outputs:
+ db_user: ${{ steps.branch.outputs.user }}
+ db_pass: ${{ steps.branch.outputs.password }}
+ db_host: ${{ steps.branch.outputs.host }}
+ db_port: ${{ steps.branch.outputs.port }}
+ jwt_secret: ${{ steps.branch.outputs.jwt_secret }}
+ ref: ${{ steps.branch.outputs.id }}
+ status: ${{ steps.branch.outputs.status }}
+ version: ${{ steps.branch.outputs.version }}
+
+ steps:
+ - uses: actions/checkout@v4
+ - uses: hashicorp/setup-terraform@v3
+ with:
+ terraform_wrapper: false
+
+ - run: terraform init
+ - run: terraform apply -auto-approve -no-color
+ - id: branch
+ run: |
+ terraform output -json branch_database \
+ | jq -r "to_entries|map(\"\(.key)=\(.value|tostring)\")|.[]" \
+ >> "$GITHUB_OUTPUT"
diff --git a/.github/workflows/config-production.yaml b/.github/workflows/config-production.yaml
new file mode 100644
index 00000000000..b7f3dd3d63c
--- /dev/null
+++ b/.github/workflows/config-production.yaml
@@ -0,0 +1,28 @@
+name: Config (Production)
+
+on:
+ push:
+ branches:
+ - master
+ paths:
+ - "supabase/remotes/**"
+ workflow_dispatch:
+
+jobs:
+ apply:
+ runs-on: ubuntu-latest
+ env:
+ SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
+ TF_VAR_linked_project: xguihxuzqibwxjnimxev
+ defaults:
+ run:
+ working-directory: supabase/remotes
+
+ steps:
+ - uses: actions/checkout@v4
+ - uses: hashicorp/setup-terraform@v3
+ with:
+ terraform_wrapper: false
+
+ - run: terraform init
+ - run: terraform apply -auto-approve -no-color
diff --git a/apps/studio/components/interfaces/Database/EnumeratedTypes/EnumeratedTypes.tsx b/apps/studio/components/interfaces/Database/EnumeratedTypes/EnumeratedTypes.tsx
index d0a826b5e03..a35e7ce1df9 100644
--- a/apps/studio/components/interfaces/Database/EnumeratedTypes/EnumeratedTypes.tsx
+++ b/apps/studio/components/interfaces/Database/EnumeratedTypes/EnumeratedTypes.tsx
@@ -1,3 +1,4 @@
+import { Edit, MoreVertical, Search, Trash } from 'lucide-react'
import { useState } from 'react'
import {
Button,
@@ -5,10 +6,6 @@ import {
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
- IconEdit,
- IconMoreVertical,
- IconSearch,
- IconTrash,
Input,
} from 'ui'
@@ -45,12 +42,13 @@ const EnumeratedTypes = () => {
projectRef: project?.ref,
connectionString: project?.connectionString,
})
- const enumeratedTypes =
+ const enumeratedTypes = (data ?? []).filter((type) => type.enums.length > 0)
+ const filteredEnumeratedTypes =
search.length > 0
- ? (data ?? []).filter(
+ ? enumeratedTypes.filter(
(x) => x.schema === selectedSchema && x.name.toLowerCase().includes(search.toLowerCase())
)
- : (data ?? []).filter((x) => x.schema === selectedSchema)
+ : enumeratedTypes.filter((x) => x.schema === selectedSchema)
const protectedSchemas = (schemas ?? []).filter((schema) =>
EXCLUDED_SCHEMAS.includes(schema?.name ?? '')
@@ -75,7 +73,7 @@ const EnumeratedTypes = () => {
className="w-64"
onChange={(e) => setSearch(e.target.value)}
placeholder="Search for a type"
- icon={
No enumerated types created yet
@@ -113,7 +111,7 @@ const EnumeratedTypes = () => {No results found
@@ -123,8 +121,8 @@ const EnumeratedTypes = () => {{type.schema}
@@ -136,23 +134,21 @@ const EnumeratedTypes = () => {Update type
Delete type
{cat.label}
+{cat.label}
-{currentReport?.description}
+{currentReport?.description}
+