Skip to content

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

Revert "chore: utilize initWithKps flag"

dragarciae07a9d3b403f
diff --git a/studio/components/layouts/ProjectLayout/ProjectPausedState.tsx b/studio/components/layouts/ProjectLayout/ProjectPausedState.tsx
index e57fe2cb52a..a3b11e308dc 100644
--- a/studio/components/layouts/ProjectLayout/ProjectPausedState.tsx
+++ b/studio/components/layouts/ProjectLayout/ProjectPausedState.tsx
@@ -21,7 +21,6 @@ const ProjectPausedState: FC<Props> = ({ project }) => {
const freeProjectsLimit = ui.profile?.free_project_limit ?? DEFAULT_FREE_PROJECTS_LIMIT
const enablePermissions = useFlag('enablePermissions')
- const kpsEnabled = useFlag('initWithKps')
const isOwner = ui.selectedOrganization?.is_owner
const [showConfirmRestore, setShowConfirmRestore] = useState(false)
@@ -42,7 +41,7 @@ const ProjectPausedState: FC<Props> = ({ project }) => {
}
const onConfirmRestore = async () => {
- await post(`${API_URL}/projects/${project.ref}/restore`, { kps_enabled: kpsEnabled })
+ await post(`${API_URL}/projects/${project.ref}/restore`, {})
app.onProjectUpdated({ ...project, status: PROJECT_STATUS.RESTORING })
ui.setNotification({ category: 'success', message: 'Restoring project' })
}
diff --git a/studio/pages/new/[slug].tsx b/studio/pages/new/[slug].tsx
index c5104c1c2ae..589a768b650 100644
--- a/studio/pages/new/[slug].tsx
+++ b/studio/pages/new/[slug].tsx
@@ -41,7 +41,6 @@ const Wizard: NextPageWithLayout = () => {
const enablePermissions = useFlag('enablePermissions')
const projectCreationDisabled = useFlag('disableProjectCreationAndUpdate')
- const kpsEnabled = useFlag('initWithKps')
const subscriptionStats = useSubscriptionStats()
const [projectName, setProjectName] = useState('')
@@ -164,7 +163,6 @@ const Wizard: NextPageWithLayout = () => {
db_pass: dbPass,
db_region: dbRegion,
db_pricing_tier_id: (PRICING_TIER_PRODUCT_IDS as any)[dbPricingTierKey],
- kps_enabled: kpsEnabled,
}
const response = await post(`${API_URL}/projects`, data)
if (response.error) {
diff --git a/studio/pages/project/[ref]/reports/index.tsx b/studio/pages/project/[ref]/reports/index.tsx
index 3c8315fd8e4..7d1972b6381 100644
--- a/studio/pages/project/[ref]/reports/index.tsx
+++ b/studio/pages/project/[ref]/reports/index.tsx
@@ -4,7 +4,7 @@ import { useRouter } from 'next/router'
import { PermissionAction } from '@supabase/shared-types/out/constants'
import { NextPageWithLayout } from 'types'
-import { checkPermissions, useFlag, useStore } from 'hooks'
+import { checkPermissions, useStore } from 'hooks'
import { post } from 'lib/common/fetch'
import { API_URL, PROJECT_STATUS } from 'lib/constants'
import { useProjectContentStore } from 'stores/projectContentStore'
@@ -28,11 +28,9 @@ export const UserReportPage: NextPageWithLayout = () => {
subject: { id: ui.profile?.id },
})
- const kpsEnabled = useFlag('initWithKps')
-
useEffect(() => {
if (project && project.status === PROJECT_STATUS.INACTIVE) {
- post(`${API_URL}/projects/${ref}/restore`, { kps_enabled: kpsEnabled })
+ post(`${API_URL}/projects/${ref}/restore`, {})
}
}, [project])
diff --git a/studio/pages/project/[ref]/storage/buckets/[bucketId].tsx b/studio/pages/project/[ref]/storage/buckets/[bucketId].tsx
index 721cd9cc538..901c93ae87c 100644
--- a/studio/pages/project/[ref]/storage/buckets/[bucketId].tsx
+++ b/studio/pages/project/[ref]/storage/buckets/[bucketId].tsx
@@ -4,7 +4,7 @@ import { observer } from 'mobx-react-lite'
import { find } from 'lodash'
import { API_URL } from 'lib/constants'
-import { useFlag, useStore } from 'hooks'
+import { useStore } from 'hooks'
import { post } from 'lib/common/fetch'
import { PROJECT_STATUS } from 'lib/constants'
import { StorageLayout } from 'components/layouts'
@@ -26,11 +26,9 @@ const PageLayout: NextPageWithLayout = () => {
const storageStore = useStorageStore()
const { buckets, loaded, openCreateBucketModal } = storageStore
- const kpsEnabled = useFlag('initWithKps')
-
useEffect(() => {
if (project && project.status === PROJECT_STATUS.INACTIVE) {
- post(`${API_URL}/projects/${ref}/restore`, { kps_enabled: kpsEnabled })
+ post(`${API_URL}/projects/${ref}/restore`, {})
}
}, [project])
diff --git a/studio/pages/project/[ref]/storage/buckets/index.tsx b/studio/pages/project/[ref]/storage/buckets/index.tsx
index 80ca79f9f03..1204c62c4fe 100644
--- a/studio/pages/project/[ref]/storage/buckets/index.tsx
+++ b/studio/pages/project/[ref]/storage/buckets/index.tsx
@@ -3,7 +3,7 @@ import { useRouter } from 'next/router'
import { observer } from 'mobx-react-lite'
import { API_URL } from 'lib/constants'
-import { useFlag, useStore } from 'hooks'
+import { useStore } from 'hooks'
import { post } from 'lib/common/fetch'
import { PROJECT_STATUS } from 'lib/constants'
import { StorageLayout } from 'components/layouts'
@@ -24,11 +24,9 @@ const PageLayout: NextPageWithLayout = ({}) => {
const storageStore = useStorageStore()
const { openCreateBucketModal } = storageStore
- const kpsEnabled = useFlag('initWithKps')
-
useEffect(() => {
if (project && project.status === PROJECT_STATUS.INACTIVE) {
- post(`${API_URL}/projects/${ref}/restore`, { kps_enabled: kpsEnabled })
+ post(`${API_URL}/projects/${ref}/restore`, {})
}
}, [project])
diff --git a/studio/pages/project/[ref]/storage/policies.tsx b/studio/pages/project/[ref]/storage/policies.tsx
index 09d5f8d667f..50f477bbfb5 100644
--- a/studio/pages/project/[ref]/storage/policies.tsx
+++ b/studio/pages/project/[ref]/storage/policies.tsx
@@ -5,7 +5,7 @@ import { observer } from 'mobx-react-lite'
import { API_URL } from 'lib/constants'
import { post } from 'lib/common/fetch'
import { PROJECT_STATUS } from 'lib/constants'
-import { useFlag, useStore } from 'hooks'
+import { useStore } from 'hooks'
import { StorageLayout } from 'components/layouts'
import { StoragePolicies } from 'components/to-be-cleaned/Storage'
import { NextPageWithLayout } from 'types'
@@ -20,11 +20,9 @@ const PageLayout: NextPageWithLayout = () => {
const { ui, meta } = useStore()
const project = ui.selectedProject
- const kpsEnabled = useFlag('initWithKps')
-
useEffect(() => {
if (project && project.status === PROJECT_STATUS.INACTIVE) {
- post(`${API_URL}/projects/${ref}/restore`, { kps_enabled: kpsEnabled })
+ post(`${API_URL}/projects/${ref}/restore`, {})
}
meta.roles.load()
}, [project])
diff --git a/studio/pages/project/[ref]/storage/settings.tsx b/studio/pages/project/[ref]/storage/settings.tsx
index 84101380950..4de917bef40 100644
--- a/studio/pages/project/[ref]/storage/settings.tsx
+++ b/studio/pages/project/[ref]/storage/settings.tsx
@@ -3,7 +3,7 @@ import { useRouter } from 'next/router'
import { observer } from 'mobx-react-lite'
import { API_URL, PROJECT_STATUS } from 'lib/constants'
-import { useFlag, useStore } from 'hooks'
+import { useStore } from 'hooks'
import { post } from 'lib/common/fetch'
import { StorageLayout } from 'components/layouts'
import { StorageSettings } from 'components/to-be-cleaned/Storage'
@@ -19,11 +19,9 @@ const PageLayout: NextPageWithLayout = () => {
const { ui } = useStore()
const project = ui.selectedProject
- const kpsEnabled = useFlag('initWithKps')
-
useEffect(() => {
if (project && project.status === PROJECT_STATUS.INACTIVE) {
- post(`${API_URL}/projects/${ref}/restore`, { kps_enabled: kpsEnabled })
+ post(`${API_URL}/projects/${ref}/restore`, {})
}
}, [project])
diff --git a/studio/pages/project/[ref]/storage/usage.tsx b/studio/pages/project/[ref]/storage/usage.tsx
index 01482b0a520..3f3e7fc2849 100644
--- a/studio/pages/project/[ref]/storage/usage.tsx
+++ b/studio/pages/project/[ref]/storage/usage.tsx
@@ -3,7 +3,7 @@ import { useRouter } from 'next/router'
import { observer } from 'mobx-react-lite'
import { API_URL } from 'lib/constants'
-import { useFlag, useStore } from 'hooks'
+import { useStore } from 'hooks'
import { post } from 'lib/common/fetch'
import { PROJECT_STATUS } from 'lib/constants'
import { StorageLayout } from 'components/layouts'
@@ -20,11 +20,9 @@ const PageLayout: NextPageWithLayout = () => {
const { ui } = useStore()
const project = ui.selectedProject
- const kpsEnabled = useFlag('initWithKps')
-
useEffect(() => {
if (project && project.status === PROJECT_STATUS.INACTIVE) {
- post(`${API_URL}/projects/${ref}/restore`, { kps_enabled: kpsEnabled })
+ post(`${API_URL}/projects/${ref}/restore`, {})
}
}, [project])