Hey there, I have a question regarding NestJS and typeORM. My issue is with inserting default values into tables after creating them. For example, I have a priority table where I need to insert High/Medium/Low values. Despite trying everything in the typeorm and NestJS documentation, as well as reading related questions on various forums, I still haven't been successful.
import {getConnection} from "typeorm";
await getConnection()
.createQueryBuilder()
.insert()
.into(User)
.values([
{ firstName: "Timber", lastName: "Saw" },
{ firstName: "Phantom", lastName: "Lancer" }
])
.execute();
I came across the code above and believe this might be the solution. However, I'm uncertain about which file to add this code chunk to. Any guidance provided will be greatly appreciated. Thank you!