mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
- Add language column (javascript/python) - Add runtime_version column for semver tracking - Add bundle_binary BYTEA column for binary storage - Add unique index on (app_version_id, language) - Add data migration for existing JS bundles 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
16 lines
739 B
TypeScript
16 lines
739 B
TypeScript
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
|
|
export class AddWorkflowBundleLanguageUniqueIndex1767294792000 implements MigrationInterface {
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
// Add unique index on (app_version_id, language) to support per-language bundles
|
|
// This allows each app version to have one bundle per language (javascript, python, etc.)
|
|
await queryRunner.query(`
|
|
CREATE UNIQUE INDEX IF NOT EXISTS idx_workflow_bundles_app_version_language
|
|
ON workflow_bundles (app_version_id, language)
|
|
`);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`DROP INDEX IF EXISTS idx_workflow_bundles_app_version_language`);
|
|
}
|
|
}
|