-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added some features #530
Added some features #530
Conversation
Added check is user already exists when create new user
* Run ater_failure script only if error * Run ater_success script only if no errors * Add color functions
@@ -8,7 +8,7 @@ type ( | |||
ID uint `gorm:"primary_key;auto_increment;not null" json:"id"` | |||
Email string `gorm:"not null;size:255;unique_index" json:"email"` | |||
Password string `gorm:"not null;size:255;column:password" json:"-"` | |||
Name string `gorm:"not null;size:255" json:"name"` | |||
Name string `gorm:"not null;size:255;unique_index" json:"name"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not meant to be username originally, this is full name such as John Smith
, I don't mind if you add additional property for username
though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I'm thinking to add "Login" field so that there won't be any confusion with "Name" later (and we wouldn't need to rename all occurrences of the Name -> Full Name later)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I will close this PR and split it into three separate PRs with the correct commit format. Thank for your advice!
@@ -8,7 +8,7 @@ type ( | |||
ID uint `gorm:"primary_key;auto_increment;not null" json:"id"` | |||
Email string `gorm:"not null;size:255;unique_index" json:"email"` | |||
Password string `gorm:"not null;size:255;column:password" json:"-"` | |||
Name string `gorm:"not null;size:255" json:"name"` | |||
Name string `gorm:"not null;size:255;unique_index" json:"name"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I'm thinking to add "Login" field so that there won't be any confusion with "Name" later (and we wouldn't need to rename all occurrences of the Name -> Full Name later)
after_success
script only if all previous scripts exit normally. Also runafter_failure
script immediately after any previous script exit with errors