## Summary - **Drop the `objectMetadata.dataSourceId` foreign key and index** via a 1-22 fast instance command — column kept nullable for data preservation - **Delete `DataSourceService`, `DataSourceModule`, and `DataSourceException`** — all code now uses `workspace.databaseSchema` directly - **Remove `IS_DATASOURCE_MIGRATED` feature flag** from default flags and all branching logic - **Simplify workspace/object creation pipelines** — `WorkspaceManagerService`, `DevSeederService`, and the object creation action handler no longer route through `DataSourceService` - **Keep `DataSourceEntity` and the `dataSource` table** for historical data — entity stripped of all ORM relations
24 lines
746 B
TypeScript
24 lines
746 B
TypeScript
import { type JestConfigWithTsJest } from 'ts-jest';
|
|
import 'tsconfig-paths/register';
|
|
|
|
import { DataSeedWorkspaceCommand } from 'src/database/commands/data-seed-dev-workspace.command';
|
|
import { rawDataSource } from 'src/database/typeorm/raw/raw.datasource';
|
|
|
|
import { createApp } from './create-app';
|
|
|
|
export default async (_: unknown, projectConfig: JestConfigWithTsJest) => {
|
|
const app = await createApp({});
|
|
|
|
if (!projectConfig.globals) {
|
|
throw new Error('No globals found in project config');
|
|
}
|
|
|
|
await rawDataSource.initialize();
|
|
|
|
await app.listen(projectConfig.globals.APP_PORT as number);
|
|
|
|
global.app = app;
|
|
global.testDataSource = rawDataSource;
|
|
global.dataSeedWorkspaceCommand = app.get(DataSeedWorkspaceCommand);
|
|
};
|