Skip to content

Commit

Permalink
fix: migrate script
Browse files Browse the repository at this point in the history
  • Loading branch information
okjodom committed Oct 30, 2024
1 parent af05979 commit 5e0f6d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function findPackagesWithMigrations(dir: string): string[] {
const packageJsonPath = path.join(fullPath, 'package.json');
if (fs.existsSync(packageJsonPath)) {
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
if (packageJson.scripts && packageJson.scripts.migrate) {
if (packageJson.scripts && packageJson.scripts["migrate:dev"]) {
packages.push(fullPath);
}
}
Expand All @@ -34,7 +34,7 @@ function runMigrations(): void {
for (const packagePath of packagesWithMigrations) {
try {
execSync('bun install', { cwd: packagePath, stdio: 'inherit' });
execSync('bun run migrate', { cwd: packagePath, stdio: 'inherit' });
execSync('bun run migrate:dev', { cwd: packagePath, stdio: 'inherit' });
} catch (error) {
console.error(`Error running migrations for ${packagePath}:`, error);
}
Expand Down

0 comments on commit 5e0f6d5

Please sign in to comment.