mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-10-31 08:34:01 -05:00
Fix an issue where sequence owner is remove on sequence edit. #5810
This commit is contained in:
1 parent
0e9d59fe51
commit
004e777032
3 files changed
+9
-2
No files matched your search
+7
@@ -51,6 +51,13 @@ export class OwnedBySchema extends BaseUISchema {
|
||||
optionsReloadBasis: state.owned_table,
|
||||
};
|
||||
},
|
||||
depChange: (state)=>{
|
||||
if(!state.owned_table) {
|
||||
return {
|
||||
owned_column: null,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
+1
-1
@@ -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) %}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user