|
|
|
@ -92,14 +92,10 @@ async function migrateProjects(
|
|
|
|
|
is_meta: !!projectConfig.prefix, |
|
|
|
|
type: d.client, |
|
|
|
|
config: d, |
|
|
|
|
created_at: project.created_at, |
|
|
|
|
updated_at: project.updated_at, |
|
|
|
|
inflection_column: inflection.cn, |
|
|
|
|
inflection_table: inflection.tn, |
|
|
|
|
}; |
|
|
|
|
}), |
|
|
|
|
created_at: project.created_at, |
|
|
|
|
updated_at: project.updated_at, |
|
|
|
|
}; |
|
|
|
|
const p = await Project.createProject(projectBody, ncMeta); |
|
|
|
|
projectsObj[p.id] = p; |
|
|
|
@ -126,8 +122,6 @@ async function migrateProjectUsers(
|
|
|
|
|
project_id: projectUser.project_id, |
|
|
|
|
fk_user_id: projectUser.user_id, |
|
|
|
|
roles: projectUser.roles, |
|
|
|
|
created_at: projectUser.created_at, |
|
|
|
|
updated_at: projectUser.updated_at, |
|
|
|
|
}, |
|
|
|
|
ncMeta |
|
|
|
|
); |
|
|
|
@ -268,8 +262,6 @@ interface ModelMetav1 {
|
|
|
|
|
m_to_m_meta: string; |
|
|
|
|
order: number; |
|
|
|
|
view_order: number; |
|
|
|
|
created_at; |
|
|
|
|
updated_at; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type ObjModelColumnRefv1 = { |
|
|
|
@ -406,8 +398,6 @@ async function migrateProjectModels(
|
|
|
|
|
title: modelData.alias, |
|
|
|
|
// todo: sanitize
|
|
|
|
|
type: modelData.type === 'table' ? ModelTypes.TABLE : ModelTypes.VIEW, |
|
|
|
|
created_at: modelData.created_at, |
|
|
|
|
updated_at: modelData.updated_at, |
|
|
|
|
mm: !!modelData.mm, |
|
|
|
|
}, |
|
|
|
|
ncMeta |
|
|
|
@ -884,14 +874,7 @@ async function migrateProjectModelViews(
|
|
|
|
|
queryParams; |
|
|
|
|
|
|
|
|
|
const insertObj: Partial< |
|
|
|
|
View & |
|
|
|
|
GridView & |
|
|
|
|
KanbanView & |
|
|
|
|
FormView & |
|
|
|
|
GalleryView & { |
|
|
|
|
created_at; |
|
|
|
|
updated_at; |
|
|
|
|
} |
|
|
|
|
View & GridView & KanbanView & FormView & GalleryView |
|
|
|
|
> = { |
|
|
|
|
title: viewData.title, |
|
|
|
|
show: true, |
|
|
|
@ -899,8 +882,6 @@ async function migrateProjectModelViews(
|
|
|
|
|
fk_model_id: objModelRef[project.id][viewData.parent_model_title].id, |
|
|
|
|
project_id: project.id, |
|
|
|
|
base_id: baseId, |
|
|
|
|
created_at: viewData.created_at, |
|
|
|
|
updated_at: viewData.updated_at, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
if (viewData.show_as === 'grid') { |
|
|
|
@ -1083,8 +1064,6 @@ async function migrateUIAcl(ctx: MigrateCtxV1, ncMeta: any) {
|
|
|
|
|
tn: string; |
|
|
|
|
parent_model_title: string; |
|
|
|
|
project_id: string; |
|
|
|
|
created_at?; |
|
|
|
|
updated_at?; |
|
|
|
|
}> = await ncMeta.metaList(null, null, 'nc_disabled_models_for_role'); |
|
|
|
|
|
|
|
|
|
for (const acl of uiAclList) { |
|
|
|
@ -1117,8 +1096,6 @@ async function migrateUIAcl(ctx: MigrateCtxV1, ncMeta: any) {
|
|
|
|
|
role: acl.role, |
|
|
|
|
fk_view_id, |
|
|
|
|
disabled: acl.disabled, |
|
|
|
|
created_at: acl.created_at, |
|
|
|
|
updated_at: acl.updated_at, |
|
|
|
|
}, |
|
|
|
|
ncMeta |
|
|
|
|
); |
|
|
|
@ -1217,8 +1194,6 @@ async function migratePlugins(ncMeta: any) {
|
|
|
|
|
creator: plugin.creator, |
|
|
|
|
creator_website: plugin.creator_website, |
|
|
|
|
price: plugin.price, |
|
|
|
|
created_at: plugin.created_at, |
|
|
|
|
updated_at: plugin.updated_at, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1244,8 +1219,6 @@ async function migrateWebhooks(ctx: MigrateCtxV1, ncMeta: any) {
|
|
|
|
|
retry_interval: number; |
|
|
|
|
timeout: number; |
|
|
|
|
active: boolean; |
|
|
|
|
created_at?; |
|
|
|
|
updated_at?; |
|
|
|
|
}> = await ncMeta.metaList(null, null, 'nc_hooks'); |
|
|
|
|
|
|
|
|
|
for (const hookMeta of hooks) { |
|
|
|
@ -1275,8 +1248,6 @@ async function migrateWebhooks(ctx: MigrateCtxV1, ncMeta: any) {
|
|
|
|
|
retry_interval: hookMeta.retry_interval, |
|
|
|
|
timeout: hookMeta.timeout, |
|
|
|
|
active: hookMeta.active, |
|
|
|
|
created_at: hookMeta.created_at, |
|
|
|
|
updated_at: hookMeta.updated_at, |
|
|
|
|
}, |
|
|
|
|
ncMeta |
|
|
|
|
); |
|
|
|
@ -1326,8 +1297,6 @@ async function migrateAutitLog(
|
|
|
|
|
status: string; |
|
|
|
|
description: string; |
|
|
|
|
details: string; |
|
|
|
|
created_at: any; |
|
|
|
|
updated_at: any; |
|
|
|
|
}> = await ncMeta.metaList(null, null, 'nc_audit'); |
|
|
|
|
|
|
|
|
|
for (const audit of audits) { |
|
|
|
@ -1344,8 +1313,6 @@ async function migrateAutitLog(
|
|
|
|
|
status: audit.status, |
|
|
|
|
description: audit.description, |
|
|
|
|
details: audit.details, |
|
|
|
|
created_at: audit.created_at, |
|
|
|
|
updated_at: audit.updated_at, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
if (audit.model_name) { |
|
|
|
|