mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
feat(PostgreSQL): tables addition
This commit is contained in:
@ -18,6 +18,7 @@ module.exports = {
|
|||||||
functions: false,
|
functions: false,
|
||||||
schedulers: false,
|
schedulers: false,
|
||||||
// Settings
|
// Settings
|
||||||
|
tableAdd: true,
|
||||||
databaseEdit: false,
|
databaseEdit: false,
|
||||||
tableSettings: true,
|
tableSettings: true,
|
||||||
viewSettings: false,
|
viewSettings: false,
|
||||||
|
@ -997,13 +997,10 @@ export class PostgreSQLClient extends AntaresCore {
|
|||||||
*/
|
*/
|
||||||
async createTable (params) {
|
async createTable (params) {
|
||||||
const {
|
const {
|
||||||
name,
|
name
|
||||||
collation,
|
|
||||||
comment,
|
|
||||||
engine
|
|
||||||
} = params;
|
} = params;
|
||||||
|
|
||||||
const sql = `CREATE TABLE \`${name}\` (\`${name}_ID\` INT NULL) COMMENT='${comment}', COLLATE='${collation}', ENGINE=${engine}`;
|
const sql = `CREATE TABLE ${name} (${name}_id INTEGER NULL)`;
|
||||||
|
|
||||||
return await this.raw(sql);
|
return await this.raw(sql);
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div v-if="workspace.customizations.comment" class="form-group">
|
||||||
<label class="form-label col-4">
|
<label class="form-label col-4">
|
||||||
{{ $t('word.comment') }}
|
{{ $t('word.comment') }}
|
||||||
</label>
|
</label>
|
||||||
@ -37,7 +37,7 @@
|
|||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div v-if="workspace.customizations.collations" class="form-group">
|
||||||
<label class="form-label col-4">
|
<label class="form-label col-4">
|
||||||
{{ $t('word.collation') }}
|
{{ $t('word.collation') }}
|
||||||
</label>
|
</label>
|
||||||
@ -53,7 +53,7 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div v-if="workspace.customizations.engines" class="form-group">
|
||||||
<label class="form-label col-4">
|
<label class="form-label col-4">
|
||||||
{{ $t('word.engine') }}
|
{{ $t('word.engine') }}
|
||||||
</label>
|
</label>
|
||||||
@ -103,10 +103,14 @@ export default {
|
|||||||
getDatabaseVariable: 'workspaces/getDatabaseVariable'
|
getDatabaseVariable: 'workspaces/getDatabaseVariable'
|
||||||
}),
|
}),
|
||||||
defaultCollation () {
|
defaultCollation () {
|
||||||
|
if (this.workspace.customizations.collations)
|
||||||
return this.getDatabaseVariable(this.selectedWorkspace, 'collation_server').value || '';
|
return this.getDatabaseVariable(this.selectedWorkspace, 'collation_server').value || '';
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
defaultEngine () {
|
defaultEngine () {
|
||||||
|
if (this.workspace.customizations.engines)
|
||||||
return this.workspace.engines.find(engine => engine.isDefault).name;
|
return this.workspace.engines.find(engine => engine.isDefault).name;
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
Reference in New Issue
Block a user