Deprecate dataSource table with dual-write to workspace.databaseSchema (#19059)
## Summary - Starts deprecation of the `core.dataSource` table by introducing a dual-write system: `DataSourceService.createDataSourceMetadata` now writes to both `core.dataSource` and `core.workspace.databaseSchema` - Migrates read sites (`WorkspaceDataSourceService.checkSchemaExists`, `WorkspaceSchemaFactory`, `MiddlewareService`, `WorkspacesMigrationCommandRunner`) to read from `workspace.databaseSchema` instead of querying the `dataSource` table - Removes the unused `databaseUrl` field from `WorkspaceEntity` and drops the column via migration - Adds a 1.20 upgrade command to backfill `workspace.databaseSchema` from `dataSource.schema` for existing workspaces
This commit is contained in:
@@ -234,13 +234,9 @@ export class WorkspaceEntity {
|
||||
@Column({ default: 1 })
|
||||
metadataVersion: number;
|
||||
|
||||
@Field()
|
||||
@Column({ default: '' })
|
||||
databaseUrl: string;
|
||||
|
||||
@Field()
|
||||
@Column({ default: '' })
|
||||
databaseSchema: string;
|
||||
@Field(() => String, { nullable: true })
|
||||
@Column({ type: 'varchar', nullable: true, default: null })
|
||||
databaseSchema: string | null;
|
||||
|
||||
@Field()
|
||||
@Column({ unique: true })
|
||||
|
||||
Reference in New Issue
Block a user