1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

refactor: passing schema from table context options

This commit is contained in:
2021-07-14 18:15:13 +02:00
parent ed6e7fa72d
commit c87b8dc738
7 changed files with 38 additions and 31 deletions

View File

@ -72,7 +72,7 @@ import Schema from '@/ipc-api/Schema';
export default {
name: 'ModalEditSchema',
props: {
selectedDatabase: String
selectedSchema: String
},
data () {
return {
@ -99,7 +99,7 @@ export default {
async created () {
let actualCollation;
try {
const { status, response } = await Schema.getDatabaseCollation({ uid: this.selectedWorkspace, database: this.selectedDatabase });
const { status, response } = await Schema.getDatabaseCollation({ uid: this.selectedWorkspace, database: this.selectedSchema });
if (status === 'success')
actualCollation = response;
@ -112,8 +112,8 @@ export default {
}
this.database = {
name: this.selectedDatabase,
prevName: this.selectedDatabase,
name: this.selectedSchema,
prevName: this.selectedSchema,
collation: actualCollation || this.defaultCollation,
prevCollation: actualCollation || this.defaultCollation
};