Skip to content

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

Remove Backups from self-hosting

Ruggero Tomaselli0f09af1336a8
diff --git a/studio/components/layouts/DatabaseLayout/DatabaseMenu.utils.ts b/studio/components/layouts/DatabaseLayout/DatabaseMenu.utils.ts
index b40ef67dba4..8ea9c65ca30 100644
--- a/studio/components/layouts/DatabaseLayout/DatabaseMenu.utils.ts
+++ b/studio/components/layouts/DatabaseLayout/DatabaseMenu.utils.ts
@@ -1,6 +1,7 @@
import { Project } from 'types'
import { ProductMenuGroup } from 'components/ui/ProductMenu/ProductMenu.types'
import { useFlag } from 'hooks'
+import { IS_PLATFORM } from 'lib/constants'
export const generateDatabaseMenu = (project?: Project): ProductMenuGroup[] => {
const ref = project?.ref ?? 'default'
@@ -62,12 +63,16 @@ export const generateDatabaseMenu = (project?: Project): ProductMenuGroup[] => {
},
]
: []),
- {
- name: 'Backups',
- key: 'backups',
- url: `/project/${ref}/database/backups/scheduled`,
- items: [],
- },
+ ...(IS_PLATFORM
+ ? [
+ {
+ name: 'Backups',
+ key: 'backups',
+ url: `/project/${ref}/database/backups/scheduled`,
+ items: [],
+ },
+ ]
+ : []),
],
},
]
diff --git a/studio/pages/api/database/[ref]/backups.ts b/studio/pages/api/database/[ref]/backups.ts
deleted file mode 100644
index 32e883b78d4..00000000000
--- a/studio/pages/api/database/[ref]/backups.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { NextApiRequest, NextApiResponse } from 'next'
-import apiWrapper from 'lib/api/apiWrapper'
-
-export default (req: NextApiRequest, res: NextApiResponse) => apiWrapper(req, res, handler)
-
-async function handler(req: NextApiRequest, res: NextApiResponse) {
- const { method } = req
-
- switch (method) {
- case 'GET':
- return handleGetAll(req, res)
- default:
- res.setHeader('Allow', ['GET'])
- res.status(405).json({ data: null, error: { message: `Method ${method} Not Allowed` } })
- }
-}
-
-const handleGetAll = async (req: NextApiRequest, res: NextApiResponse) => {
- return res.status(200).json({ tierKey: 'FREE', backups: [] })
-}