-
Default Value
+
+
Default value
-
-
+
+
+ }
+ />
Can either be a literal or an expression. When using an expression wrap your
@@ -252,15 +281,15 @@ export const ColumnManagement = ({
-
+
Primary
{/* Empty space */}
-
+ {hasImportContent &&
}
{/* More config button */}
-
+
{/* Delete button */}
- {!hasImportContent &&
}
+ {!hasImportContent &&
}
{primaryKeyColumns.length > 0 && (
@@ -286,6 +315,7 @@ export const ColumnManagement = ({
hasForeignKeys={checkIfHaveForeignKeys(column)}
isNewRecord={isNewRecord}
hasImportContent={hasImportContent}
+ gridTemplateColumns={columnGridTemplate}
shouldAutoFocusName={column.id === columnIdToFocus}
onUpdateColumn={(changes) => onUpdateColumn(column, changes)}
onRemoveColumn={() => onRemoveColumn(column)}
@@ -318,6 +348,7 @@ export const ColumnManagement = ({
isNewRecord={isNewRecord}
hasForeignKeys={checkIfHaveForeignKeys(column)}
hasImportContent={hasImportContent}
+ gridTemplateColumns={columnGridTemplate}
shouldAutoFocusName={column.id === columnIdToFocus}
onUpdateColumn={(changes) => onUpdateColumn(column, changes)}
onRemoveColumn={() => onRemoveColumn(column)}
diff --git a/apps/www/_blog/2021-10-04-supabase-beta-sept-2021.mdx b/apps/www/_blog/2021-10-04-supabase-beta-sept-2021.mdx
index 3d029fa3edc..239a29c975c 100644
--- a/apps/www/_blog/2021-10-04-supabase-beta-sept-2021.mdx
+++ b/apps/www/_blog/2021-10-04-supabase-beta-sept-2021.mdx
@@ -40,11 +40,11 @@ We've improved the column Type field so that it supports your [custom types](htt

-### Is Unique
+### Is unique
We've made it simple to add a unique constraint when creating or editing a table.
-
+
### Edit columns
diff --git a/e2e/studio/features/column-editor-types.spec.ts b/e2e/studio/features/column-editor-types.spec.ts
index 02c47c91d3e..b049413c036 100644
--- a/e2e/studio/features/column-editor-types.spec.ts
+++ b/e2e/studio/features/column-editor-types.spec.ts
@@ -58,8 +58,8 @@ test.describe('column editor complex types', () => {
'Type dropdown should show the bare base type, not the raw _int4 pg format'
).toBeVisible()
await expect(
- columnEditor.getByRole('checkbox', { name: 'Define as Array' }),
- 'Define as Array should be checked for an existing array column'
+ columnEditor.getByRole('checkbox', { name: 'Define as array' }),
+ 'Define as array should be checked for an existing array column'
).toBeChecked()
// Make an unrelated change and save - this must not corrupt the column's type.
diff --git a/e2e/studio/features/table-editor.spec.ts b/e2e/studio/features/table-editor.spec.ts
index 3cf3afea341..c46a6cc57dd 100644
--- a/e2e/studio/features/table-editor.spec.ts
+++ b/e2e/studio/features/table-editor.spec.ts
@@ -263,10 +263,10 @@ testRunner('table editor', () => {
await page.getByRole('button', { name: 'New table', exact: true }).click()
await page.getByTestId('table-name-input').fill(tableNameEnum)
await page.getByTestId('created_at-extra-options').click()
- await page.getByText('Is Nullable').click()
+ await page.getByText('Is nullable').click()
await page.getByTestId('created_at-extra-options').click()
await page.getByRole('button', { name: 'Add column' }).click()
- await page.getByLabel('Column name').nth(2).fill(columnNameEnum)
+ await page.getByLabel('Column name').nth(3).fill(columnNameEnum)
await page.getByRole('combobox').filter({ hasText: 'Choose a column type...' }).click()
await page.getByPlaceholder('Search types...').fill(enum_name)
// wait for response, then click
@@ -357,7 +357,7 @@ testRunner('table editor', () => {
.click()
await page.getByRole('menuitem', { name: 'Edit table' }).click()
await page.getByTestId('table-name-input').fill(tableNameUpdated)
- await page.getByLabel('Column name').nth(2).fill(columnNameUpdated)
+ await page.getByLabel('Column name').nth(3).fill(columnNameUpdated)
const updateTablePromise = waitForApiResponse(page, 'pg-meta', ref, 'query?key=column-update', {
method: 'POST',
})
@@ -948,7 +948,7 @@ testRunner('table editor', () => {
// Add boolean column
await page.getByRole('button', { name: 'Add column' }).click()
- await page.getByLabel('Column name').nth(3).fill(boolColName)
+ await page.getByLabel('Column name').nth(4).fill(boolColName)
await page.getByText('Choose a column type...').click()
await page.getByPlaceholder('Search types...').fill('bool')
await page.getByRole('option', { name: 'bool' }).first().click()
@@ -1064,7 +1064,7 @@ testRunner('table editor', () => {
// Add nullable boolean column
await page.getByRole('button', { name: 'Add column' }).click()
- await page.getByLabel('Column name').nth(3).fill(boolColName)
+ await page.getByLabel('Column name').nth(4).fill(boolColName)
await page.getByText('Choose a column type...').click()
await page.getByPlaceholder('Search types...').fill('bool')
await page.getByRole('option', { name: 'bool' }).first().click()
@@ -1985,14 +1985,14 @@ testRunner('table editor', () => {
await page.getByRole('button', { name: 'New table' }).click()
await page.getByLabel('Name', { exact: true }).fill(tableName)
await page.getByRole('button', { name: 'Add column' }).click()
- await page.getByLabel('Column name').nth(2).fill('pw_column')
+ await page.getByLabel('Column name').nth(3).fill('pw_column')
await page.getByRole('combobox').filter({ hasText: 'Choose a column type...' }).click()
await page.getByRole('option').filter({ hasText: 'int8' }).click()
- await page.getByLabel('Column default value').nth(2).fill('invalid')
+ await page.getByLabel('Column default value').nth(3).fill('invalid')
await page.getByRole('button', { name: 'Save' }).click()
await expect(page.getByText('invalid input syntax')).toBeVisible()
- await page.getByLabel('Column default value').nth(2).fill('10')
+ await page.getByLabel('Column default value').nth(3).fill('10')
await page.getByRole('button', { name: 'Save' }).click()
await expect(page.getByText(`Table ${tableName} is good to go!`)).toBeVisible()
await expect(page.getByRole('button', { name: `View ${tableName}`, exact: true })).toBeVisible()