From 6ff5c9c3ea873794b437e26333880184d1826155 Mon Sep 17 00:00:00 2001 From: zhangminghua Date: Wed, 22 Mar 2023 14:48:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=AD=97=E6=AE=B5=E5=85=83?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=B1=BB=E5=9E=8B=E7=9A=84=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/latestMetadata/index.js | 4 ++-- .../01_alter_t_metadata_database&t_resource_consumption.sql | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 scripts/0.0.4/01_alter_t_metadata_database&t_resource_consumption.sql diff --git a/api/app/lib/controllers/latestMetadata/index.js b/api/app/lib/controllers/latestMetadata/index.js index 301613f..686dfdd 100644 --- a/api/app/lib/controllers/latestMetadata/index.js +++ b/api/app/lib/controllers/latestMetadata/index.js @@ -122,7 +122,7 @@ async function getMetadataDatabases(ctx) { include: [ { model: models.User, - attributes: ['id', 'name'], + attributes: ['id', 'name', 'username'], }, { model: models.TagDatabase, @@ -202,7 +202,7 @@ async function getMetadataRestapis(ctx) { include: [ { model: models.User, - attributes: ['id', 'name'], + attributes: ['id', 'name', 'username'], }, { model: models.TagRestapi, diff --git a/scripts/0.0.4/01_alter_t_metadata_database&t_resource_consumption.sql b/scripts/0.0.4/01_alter_t_metadata_database&t_resource_consumption.sql new file mode 100644 index 0000000..303dcd9 --- /dev/null +++ b/scripts/0.0.4/01_alter_t_metadata_database&t_resource_consumption.sql @@ -0,0 +1,2 @@ +alter table t_metadata_database alter column type type varchar(255) using type::varchar(255); +alter table t_resource_consumption alter column approve_state type varchar(20) using approve_state::varchar(20);