Fix an issue where sequence owner is remove on sequence edit. #5810

This commit is contained in:
Aditya Toshniwal authored and Akshay Joshi committed 2023-03-01 13:39:27 +05:30
1 parent 0e9d59fe51
commit 004e777032
3 files changed
+9 -2

No files matched your search

@@ -51,6 +51,13 @@ export class OwnedBySchema extends BaseUISchema {
optionsReloadBasis: state.owned_table,
};
},
depChange: (state)=>{
if(!state.owned_table) {
return {
owned_column: null,
};
}
}
}
];
}
@@ -11,7 +11,7 @@ ALTER SEQUENCE IF EXISTS {{ conn|qtIdent(o_data.schema, data.name) }}
OWNER TO {{ conn|qtIdent(data.seqowner) }};
{% endif %}
{% if (data.owned_table == None or data.owned_table is not defined) and (o_data.owned_table is defined and o_data.owned_table != None) and (data.owned_column == None or data.owned_column is not defined) %}
{% if (data.owned_table == None) and (data.owned_column == None) %}
ALTER SEQUENCE IF EXISTS {{ conn|qtIdent(o_data.schema, data.name) }}
OWNED BY NONE;
{% elif (data.owned_table is defined or data.owned_column is defined) and (data.owned_table != o_data.owned_table or data.owned_column != o_data.owned_column) %}
+1 -1
View File
@@ -73,7 +73,7 @@ function getForQueryParams(data) {
let retData = {...data};
Object.keys(retData).forEach((key)=>{
let value = retData[key];
if(_.isObject(value)) {
if(_.isObject(value) || _.isNull(value)) {
retData[key] = JSON.stringify(value);
}
});