-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
Package
- db
Describe the bug
No database index is created when using the Index decorator. see example below.
To Reproduce
The following should create an index like CREATE INDEX ON "Investment" ("projectId");, but the index is not created:
import { Entity, ManyToOne, PrimaryGeneratedColumn, BaseEntity, Index } from "@fullstack-one/db";
import { Emission } from "./Emission";
@Entity()
export default class Investment extends BaseEntity {
@PrimaryGeneratedColumn()
public readonly id!: string;
@ManyToOne((type) => Emission, "investments", { nullable: false, lazy: true })
@Index()
public emission!: Promise<Emission>;
}
Expected behavior
Index should be created.
Reactions are currently unavailable