meysamhadeli / shop-golang-microservices

Practical microservices based on different software architecture and technologies like Golang, CQRS, Vertical Slice Architecture, Docker, RabbitMQ, OpenTelemetry, Postgresql, ...

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does this application support database backup?

lexuanquynh opened this issue · comments

Does this application support database backup?
If so, how will it be done?

No, it doesn't support it. We usually do it in our database and DBA creates a job for doing this.

@meysamhadeli
Thank you for your response.
My personal question is that when I add a unique value to Email, I can't seem to migrate it.
Please let me know how to fix it.

	Email     string    `json:"email" gorm:"unique;not null"`

@meysamhadeli Thank you for your response. My personal question is that when I add a unique value to Email, I can't seem to migrate it. Please let me know how to fix it.

	Email     string    `json:"email" gorm:"unique;not null"`

You're welcome :)
I am not advanced in gorm. But you can follow the documentation of Gorm to fix this issue. In the documentation mention to email property and other usage of constraints.
You can find it here: https://v1.gorm.io/docs/models.html#Declaring-Models