mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 09:45:04 +01:00
clean-up migrate data param
This commit is contained in:
parent
aba5b9362e
commit
1bb33f7aff
@ -76,7 +76,6 @@ async function checkV2Tables() {
|
||||
// run v2 prisma migration steps
|
||||
await runSqlFile('../prisma/migrations/01_init/migration.sql');
|
||||
console.log(execSync('prisma migrate resolve --applied 01_init').toString());
|
||||
// console.log(execSync('prisma migrate deploy').toString());
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,8 +90,8 @@ async function checkMigrationReady() {
|
||||
}
|
||||
}
|
||||
|
||||
async function migrateData(databaseType) {
|
||||
const filePath = `../db/${databaseType}/migration_v2.sql`;
|
||||
async function migrateData() {
|
||||
const filePath = `../prisma/migration_v2.sql`;
|
||||
console.log('Starting v2 data migration. Please do no cancel this process, it may take a while.');
|
||||
await runSqlFile(filePath);
|
||||
|
||||
@ -264,7 +263,7 @@ async function runSqlFile(filePath) {
|
||||
deleteV1TablesPrompt,
|
||||
]) {
|
||||
try {
|
||||
['checkV1Tables', 'migrateData'].includes(fn.name) ? await fn(databaseType) : await fn();
|
||||
fn.name === 'checkV1Tables' ? await fn(databaseType) : await fn();
|
||||
} catch (e) {
|
||||
error(e.message);
|
||||
err = true;
|
||||
|
Loading…
Reference in New Issue
Block a user