mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-23 23:05:59 +00:00
specificNullabilityImplementation
This commit is contained in:
@@ -246,7 +246,7 @@ export class SqlDumper implements AlterProcessor {
|
||||
|
||||
this.putRaw(' ');
|
||||
this.specialColumnOptions(column);
|
||||
if (includeNullable && !this.dialect?.specificNotNull) {
|
||||
if (includeNullable && !this.dialect?.specificNullabilityImplementation) {
|
||||
this.put(column.notNull ? '^not ^null' : '^null');
|
||||
}
|
||||
if (includeDefault && column.defaultValue?.trim()) {
|
||||
|
||||
2
packages/types/dialect.d.ts
vendored
2
packages/types/dialect.d.ts
vendored
@@ -34,7 +34,7 @@ export interface SqlDialect {
|
||||
createCheck?: boolean;
|
||||
dropCheck?: boolean;
|
||||
|
||||
specificNotNull?: boolean;
|
||||
specificNullabilityImplementation?: boolean;
|
||||
|
||||
// syntax for create column: ALTER TABLE table ADD COLUMN column
|
||||
createColumnWithColumnKeyword?: boolean;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<FormTextField name="columnName" label="Column name" focused disabled={isReadOnly} />
|
||||
<DataTypeEditor dialect={driver?.dialect} disabled={isReadOnly} />
|
||||
|
||||
{#if !driver?.dialect?.specificNotNull}
|
||||
{#if !driver?.dialect?.specificNullabilityImplementation}
|
||||
<FormCheckboxField name="notNull" label="NOT NULL" disabled={isReadOnly} />
|
||||
{/if}
|
||||
<FormCheckboxField name="isPrimaryKey" label="Is Primary Key" disabled={isReadOnly} />
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
on:clickrow={e => showModal(ColumnEditorModal, { columnInfo: e.detail, tableInfo, setTableInfo, driver })}
|
||||
onAddNew={isWritable ? addColumn : null}
|
||||
columns={[
|
||||
!driver?.dialect?.specificNotNull && {
|
||||
!driver?.dialect?.specificNullabilityImplementation && {
|
||||
fieldName: 'notNull',
|
||||
header: 'Nullability',
|
||||
sortable: true,
|
||||
|
||||
@@ -64,7 +64,7 @@ const dialect = {
|
||||
dropIndex: true,
|
||||
anonymousPrimaryKey: true,
|
||||
createColumnWithColumnKeyword: true,
|
||||
specificNotNull: true,
|
||||
specificNullabilityImplementation: true,
|
||||
|
||||
columnProperties: {
|
||||
columnComment: true,
|
||||
|
||||
Reference in New Issue
Block a user