Remove unique constraint on subspace and product in SubspaceProductAllocationEntity; update product relation to nullable in NewTagEntity

This commit is contained in:
faris Aljohari
2025-06-01 21:16:51 -06:00
parent 59161d4049
commit 191d0dfaf6
2 changed files with 2 additions and 2 deletions

View File

@ -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',

View File

@ -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;