Remove obsolete columns (#470)

This commit is contained in:
Sung Won Cho 2020-05-22 17:19:10 +10:00 committed by GitHub
commit a060176cbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 7 deletions

View file

@ -0,0 +1,9 @@
-- remove-billing-columns.sql drops billing related columns that are now obsolete.
-- +migrate Up
ALTER TABLE users DROP COLUMN IF EXISTS stripe_customer_id;
ALTER TABLE users DROP COLUMN IF EXISTS billing_country;
-- +migrate Down

View file

@ -65,13 +65,11 @@ type Note struct {
// User is a model for a user
type User struct {
Model
UUID string `json:"uuid" gorm:"type:uuid;index;default:uuid_generate_v4()"`
StripeCustomerID string `json:"-"`
BillingCountry string `json:"-"`
Account Account
LastLoginAt *time.Time `json:"-"`
MaxUSN int `json:"-" gorm:"default:0"`
Cloud bool `json:"-" gorm:"default:false"`
UUID string `json:"uuid" gorm:"type:uuid;index;default:uuid_generate_v4()"`
Account Account
LastLoginAt *time.Time `json:"-"`
MaxUSN int `json:"-" gorm:"default:0"`
Cloud bool `json:"-" gorm:"default:false"`
}
// Account is a model for an account