mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 11:55:05 +03:00
feat(sql-editor): add 'truncate' to destructive operations list
This commit is contained in:
1 parent
d51a2ef75f
commit
cfdaf283af
2 files changed
+7
-3
No files matched your search
@@ -1255,3 +1255,5 @@ export const sqlAiDisclaimerComment = stripIndent`
|
||||
`
|
||||
|
||||
export const untitledSnippetTitle = 'Untitled query'
|
||||
|
||||
export const destructiveSqlRegex = [/drop/i, /delete/i, /truncate/i]
|
||||
@@ -47,7 +47,11 @@ import {
|
||||
Input,
|
||||
} from 'ui'
|
||||
import AISettingsModal from './AISettingsModal'
|
||||
import { sqlAiDisclaimerComment, untitledSnippetTitle } from './SQLEditor.constants'
|
||||
import {
|
||||
destructiveSqlRegex,
|
||||
sqlAiDisclaimerComment,
|
||||
untitledSnippetTitle,
|
||||
} from './SQLEditor.constants'
|
||||
import { IStandaloneCodeEditor, IStandaloneDiffEditor } from './SQLEditor.types'
|
||||
import { createSqlSnippetSkeleton } from './SQLEditor.utils'
|
||||
import UtilityPanel from './UtilityPanel/UtilityPanel'
|
||||
@@ -59,8 +63,6 @@ const DiffEditor = dynamic(
|
||||
{ ssr: false }
|
||||
)
|
||||
|
||||
const destructiveSqlRegex = [/drop/i, /delete/i]
|
||||
|
||||
type ContentDiff = {
|
||||
original: string
|
||||
modified: string
|
||||
|
||||
Reference in new issue
Block a user