Seed Medusa Database More than ones #5069
Unanswered
Rahul-jain01
asked this question in
Q&A
Replies: 1 comment
-
Yes, you can create and run multiple seed files. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Initially, I seeded the database with default data from the
seed.json
file. Then, I created new entities and performed a migration, resulting in the creation of new tables in the database. Now, I want to seed the database again with new data according to my requirements.Scenario i have table SearchHistory in which I am maintain the customer search history
@entity()
export class SearchHistory extends BaseEntity {
@column({ type: "numeric" })
count: number | null;
@column({ type: "varchar" })
name: string | null;
@column()
customer_id: string;
@manytoone(() => Customer)
@joincolumn({ name: "customer_id" })
customer: Customer;
@column("jsonb", { nullable: true })
meta_data?: object[];
}
so for that entity can I create the new seed file and seed again
Beta Was this translation helpful? Give feedback.
All reactions