Fixed following issues after React Porting:

1. Unique constraint should not allow changing values for deferrable, deferred, included columns.
2. Primary keys should not allow changing values for deferrable, deferred, included columns.
3. Foreign keys should not allow changing match type. The referenced table name is empty.
4. Exclude - Column/Expression has incorrect values.
5. Save should not be enabled when Custom auto-vacuum is enabled but none of the parameters are edited.

Fixes #6777
This commit is contained in:
Aditya Toshniwal
2021-09-23 14:46:10 +05:30
committed by Akshay Joshi
parent 15a494c189
commit 9179b7464b
13 changed files with 79 additions and 61 deletions

View File

@@ -239,9 +239,10 @@ describe('ExclusionConstraintSchema', ()=>{
it('columns formatter', ()=>{
let formatter = _.find(schemaObj.fields, (f)=>f.id=='columns').cell().controlProps.formatter;
expect(formatter.fromRaw([{
local_column: 'lid',
referenced: 'rid',
}])).toBe('(lid) -> (rid)');
column: 'lid',
},{
column: 'rid',
}])).toBe('lid, rid');
expect(formatter.fromRaw([])).toBe('');
});

View File

@@ -165,6 +165,7 @@ describe('PrimaryKeySchema', ()=>{
});
state.index = undefined;
state.condeferrable = true;
expect(getFieldDepChange(schemaObj, 'spcname')(state)).toEqual({});
expect(getFieldDepChange(schemaObj, 'include')(state)).toEqual({});
expect(getFieldDepChange(schemaObj, 'fillfactor')(state)).toEqual({});

View File

@@ -164,6 +164,7 @@ describe('UniqueConstraintSchema', ()=>{
});
state.index = undefined;
state.condeferrable = true;
expect(getFieldDepChange(schemaObj, 'spcname')(state)).toEqual({});
expect(getFieldDepChange(schemaObj, 'include')(state)).toEqual({});
expect(getFieldDepChange(schemaObj, 'fillfactor')(state)).toEqual({});