Add is system flag to object metadata (#2481)
* Add isSystem flag to objectMetadata * squash migrations and add dataSource->objects FK * fix missing datasource enum type
This commit is contained in:
@@ -5,8 +5,11 @@ import {
|
||||
PrimaryGeneratedColumn,
|
||||
UpdateDateColumn,
|
||||
DataSourceOptions,
|
||||
OneToMany,
|
||||
} from 'typeorm';
|
||||
|
||||
import { ObjectMetadataEntity } from 'src/metadata/object-metadata/object-metadata.entity';
|
||||
|
||||
type DataSourceType = DataSourceOptions['type'];
|
||||
|
||||
@Entity('dataSource')
|
||||
@@ -29,6 +32,11 @@ export class DataSourceEntity {
|
||||
@Column({ default: false })
|
||||
isRemote: boolean;
|
||||
|
||||
@OneToMany(() => ObjectMetadataEntity, (object) => object.dataSource, {
|
||||
cascade: true,
|
||||
})
|
||||
objects: ObjectMetadataEntity[];
|
||||
|
||||
@Column({ nullable: false })
|
||||
workspaceId: string;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user