diff --git a/pkg/server/database/migrations/20200522170529-remove-billing-columns.sql b/pkg/server/database/migrations/20200522170529-remove-billing-columns.sql new file mode 100644 index 00000000..a814f26b --- /dev/null +++ b/pkg/server/database/migrations/20200522170529-remove-billing-columns.sql @@ -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 + diff --git a/pkg/server/database/models.go b/pkg/server/database/models.go index 3344efbb..c7905158 100644 --- a/pkg/server/database/models.go +++ b/pkg/server/database/models.go @@ -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