mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03:00
Add trims to table and column names (#22170)
This commit is contained in:
1 parent
ccae568eac
commit
8b43a2b564
3 files changed
+10
-5
No files matched your search
+2
-2
@@ -92,8 +92,8 @@ export const generateCreateColumnPayload = (
|
||||
const payload: CreateColumnPayload = {
|
||||
tableId,
|
||||
isIdentity,
|
||||
name: field.name,
|
||||
comment: field.comment,
|
||||
name: field.name.trim(),
|
||||
comment: field.comment?.trim(),
|
||||
type: field.isArray ? `${field.format}[]` : field.format,
|
||||
check: field.check?.trim() || undefined,
|
||||
isUnique: field.isUnique,
|
||||
|
||||
+5
-2
@@ -179,7 +179,7 @@ const TableEditor = ({
|
||||
const payload = {
|
||||
name: tableFields.name.trim(),
|
||||
schema: snap.selectedSchemaName,
|
||||
comment: tableFields.comment,
|
||||
comment: tableFields.comment?.trim(),
|
||||
...(!isNewRecord && { rls_enabled: tableFields.isRLSEnabled }),
|
||||
}
|
||||
const configuration = {
|
||||
@@ -191,8 +191,11 @@ const TableEditor = ({
|
||||
existingForeignKeyRelations: foreignKeys,
|
||||
primaryKey,
|
||||
}
|
||||
const columns = tableFields.columns.map((column) => {
|
||||
return { ...column, name: column.name.trim() }
|
||||
})
|
||||
|
||||
saveChanges(payload, tableFields.columns, fkRelations, isNewRecord, configuration, resolve)
|
||||
saveChanges(payload, columns, fkRelations, isNewRecord, configuration, resolve)
|
||||
} else {
|
||||
resolve()
|
||||
}
|
||||
|
||||
@@ -33,7 +33,9 @@ const LayoutHeader = ({ customHeaderComponents, breadcrumbs = [], headerBorder =
|
||||
}
|
||||
}, [orgUsage])
|
||||
|
||||
const { data: subscription } = useOrgSubscriptionQuery({ orgSlug: selectedOrganization?.slug })
|
||||
const { data: subscription } = useOrgSubscriptionQuery({
|
||||
orgSlug: selectedOrganization?.slug,
|
||||
})
|
||||
|
||||
const projectHasNoLimits = subscription?.usage_billing_enabled === true
|
||||
|
||||
|
||||
Reference in new issue
Block a user