fix(customer): Unique constraint on customer email (#7439)

**What**
Prevent creating multiple customers with the same email
This commit is contained in:
Adrien de Peretti
2024-05-24 16:20:54 +02:00
committed by GitHub
parent 066fd3c3d2
commit 77d72c5791
11 changed files with 186 additions and 35 deletions

View File

@@ -1,8 +1,12 @@
import * as entities from "./src/models"
import { TSMigrationGenerator } from "@medusajs/utils"
module.exports = {
entities: Object.values(entities),
schema: "public",
clientUrl: "postgres://postgres@localhost/medusa-customer",
type: "postgresql",
migrations: {
generator: TSMigrationGenerator,
},
}