mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-15 10:25:23 +00:00
Remove unique constraint on subspace and product in SubspaceProductAllocationEntity; update product relation to nullable in NewTagEntity
This commit is contained in:
@ -14,7 +14,7 @@ import { AbstractEntity } from '@app/common/modules/abstract/entities/abstract.e
|
||||
import { SubspaceProductAllocationDto } from '../../dtos/subspace-product-allocation.dto';
|
||||
|
||||
@Entity({ name: 'subspace_product_allocation' })
|
||||
@Unique(['subspace', 'product'])
|
||||
// @Unique(['subspace', 'product'])
|
||||
export class SubspaceProductAllocationEntity extends AbstractEntity<SubspaceProductAllocationDto> {
|
||||
@Column({
|
||||
type: 'uuid',
|
||||
|
@ -25,7 +25,7 @@ export class NewTagEntity extends AbstractEntity<NewTagDto> {
|
||||
name: string;
|
||||
|
||||
@ManyToOne(() => ProductEntity, (product) => product.newTags, {
|
||||
nullable: false,
|
||||
nullable: true,
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
public product: ProductEntity;
|
||||
|
Reference in New Issue
Block a user