The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Make grid editable for non public schemas
Joshen Limab819041ac08
diff --git a/studio/components/interfaces/TableGridEditor/TableGridEditor.tsx b/studio/components/interfaces/TableGridEditor/TableGridEditor.tsxindex 085a3fbe76d..36fdf52627a 100644--- a/studio/components/interfaces/TableGridEditor/TableGridEditor.tsx+++ b/studio/components/interfaces/TableGridEditor/TableGridEditor.tsx@@ -66,6 +66,8 @@ const TableGridEditor: FC<Props> = ({const tableId = selectedTable?.idconst isViewSelected = Object.keys(selectedTable).length === 2+ const isLocked = meta.excludedSchemas.includes(selectedSchema || '')+const gridTable = !isViewSelected? parseSupaTable({table: selectedTable as PostgresTable,@@ -102,6 +104,7 @@ const TableGridEditor: FC<Props> = ({// For some reason, selectedTable here is stale after adding a table// temporary workaround is to list grab the selected table againconst tables: PostgresTable[] = meta.tables.list()+ // @ts-ignoreconst table = tables.find((table) => table.id === Number(tableId))const column = find(table!.columns, { name }) as PostgresColumnif (column) {@@ -135,11 +138,14 @@ const TableGridEditor: FC<Props> = ({theme={theme}gridProps={{ height: '100%' }}storageRef={projectRef}- editable={!isViewSelected && selectedTable.schema === 'public'}+ editable={!isViewSelected && !isLocked}schema={selectedTable.schema}table={gridTable}headerActions={- !isViewSelected && selectedTable.schema === 'public' && <GridHeaderActions table={selectedTable as PostgresTable} />+ !isViewSelected &&+ selectedTable.schema === 'public' && (+ <GridHeaderActions table={selectedTable as PostgresTable} />+ )}onAddColumn={onAddColumn}onEditColumn={onSelectEditColumn}