First PR comment.
This commit is contained in:
parent
28189fa5ae
commit
4d1c749444
|
@ -72,7 +72,9 @@ export async function updateWithExport(
|
||||||
}
|
}
|
||||||
// get a temporary version of the import
|
// get a temporary version of the import
|
||||||
// don't need obj store, the existing app already has everything we need
|
// don't need obj store, the existing app already has everything we need
|
||||||
await backups.importApp(devId, tempDb, template, { objStore: false })
|
await backups.importApp(devId, tempDb, template, {
|
||||||
|
importObjStoreContents: false,
|
||||||
|
})
|
||||||
// get the documents to copy
|
// get the documents to copy
|
||||||
const documents = await getImportableDocuments(tempDb)
|
const documents = await getImportableDocuments(tempDb)
|
||||||
// clear out the old documents
|
// clear out the old documents
|
||||||
|
|
|
@ -8,11 +8,7 @@ import {
|
||||||
TABLE_ROW_PREFIX,
|
TABLE_ROW_PREFIX,
|
||||||
USER_METDATA_PREFIX,
|
USER_METDATA_PREFIX,
|
||||||
} from "../../../db/utils"
|
} from "../../../db/utils"
|
||||||
import {
|
import { DB_EXPORT_FILE, STATIC_APP_FILES } from "./constants"
|
||||||
DB_EXPORT_FILE,
|
|
||||||
GLOBAL_DB_EXPORT_FILE,
|
|
||||||
STATIC_APP_FILES,
|
|
||||||
} from "./constants"
|
|
||||||
import fs from "fs"
|
import fs from "fs"
|
||||||
import { join } from "path"
|
import { join } from "path"
|
||||||
import env from "../../../environment"
|
import env from "../../../environment"
|
||||||
|
|
|
@ -152,7 +152,7 @@ export async function importApp(
|
||||||
appId: string,
|
appId: string,
|
||||||
db: Database,
|
db: Database,
|
||||||
template: TemplateType,
|
template: TemplateType,
|
||||||
opts: { objStore: boolean } = { objStore: true }
|
opts: { importObjStoreContents: boolean } = { importObjStoreContents: true }
|
||||||
) {
|
) {
|
||||||
let prodAppId = dbCore.getProdAppID(appId)
|
let prodAppId = dbCore.getProdAppID(appId)
|
||||||
let dbStream: any
|
let dbStream: any
|
||||||
|
@ -166,7 +166,7 @@ export async function importApp(
|
||||||
}
|
}
|
||||||
const contents = fs.readdirSync(tmpPath)
|
const contents = fs.readdirSync(tmpPath)
|
||||||
// have to handle object import
|
// have to handle object import
|
||||||
if (contents.length && opts.objStore) {
|
if (contents.length && opts.importObjStoreContents) {
|
||||||
let promises = []
|
let promises = []
|
||||||
let excludedFiles = [GLOBAL_DB_EXPORT_FILE, DB_EXPORT_FILE]
|
let excludedFiles = [GLOBAL_DB_EXPORT_FILE, DB_EXPORT_FILE]
|
||||||
for (let filename of contents) {
|
for (let filename of contents) {
|
||||||
|
|
Loading…
Reference in New Issue