Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

added in realtime column on table list

Ollie Halliday22be1fe49310
diff --git a/studio/components/interfaces/Database/Tables/TableList.tsx b/studio/components/interfaces/Database/Tables/TableList.tsx
index 2c4b60c1acb..850c720fe03 100644
--- a/studio/components/interfaces/Database/Tables/TableList.tsx
+++ b/studio/components/interfaces/Database/Tables/TableList.tsx
@@ -10,6 +10,7 @@ import {
IconColumns,
Listbox,
IconLock,
+ IconCheck,
} from 'ui'
import { partition } from 'lodash'
@@ -54,6 +55,10 @@ const TableList: FC<Props> = ({
: // @ts-ignore
allTables.filter((table: PostgresTable) => table.name.includes(filterString))
+ const publications = meta.publications.list()
+ const realtimePublication = publications.find(
+ (publication) => publication.name === 'supabase_realtime'
+ )
// @ts-ignore
const schema = schemas.find((schema) => schema.name === selectedSchema)
const isLocked = protectedSchemas.some((s) => s.id === schema?.id)
@@ -137,6 +142,9 @@ const TableList: FC<Props> = ({
<Table.th key="size" className="hidden xl:table-cell">
Size (Estimated)
</Table.th>,
+ <Table.th key="realtime" className="hidden xl:table-cell text-center">
+ Realtime Enabled
+ </Table.th>,
<Table.th key="buttons"></Table.th>,
]}
body={tables.map((x: any, i: any) => (
@@ -157,6 +165,13 @@ const TableList: FC<Props> = ({
<Table.td className="hidden xl:table-cell">
<code className="text-sm">{x.size}</code>
</Table.td>
+ <Table.td className="hidden xl:table-cell text-center">
+ {realtimePublication.tables.find((table: any) => table.id === x.id) && (
+ <div className="flex justify-center">
+ <IconCheck strokeWidth={2} />
+ </div>
+ )}
+ </Table.td>
<Table.td>
<div className="flex justify-end gap-2">
<Button