Noah
e42cebe4b8
* Add the Contact page where users can contact the site admins for feedback or to report a problematic user, photo or message. * Reports go into the admin Feedback table. * Admin nav bar indicates number of unread feedbacks. * Add "Report" button to profile pages, photo cards, and the top of Direct Message threads. Misc changes: * Send emails out asynchronously for more responsive page loads.
20 lines
443 B
Go
20 lines
443 B
Go
// Package models handles the database.
|
|
package models
|
|
|
|
import "gorm.io/gorm"
|
|
|
|
// DB to be set by calling app (SQLite or Postgres connection).
|
|
var DB *gorm.DB
|
|
|
|
// AutoMigrate the schema.
|
|
func AutoMigrate() {
|
|
DB.AutoMigrate(&User{})
|
|
DB.AutoMigrate(&ProfileField{})
|
|
DB.AutoMigrate(&Photo{})
|
|
DB.AutoMigrate(&CertificationPhoto{})
|
|
DB.AutoMigrate(&Message{})
|
|
DB.AutoMigrate(&Friend{})
|
|
DB.AutoMigrate(&Block{})
|
|
DB.AutoMigrate(&Feedback{})
|
|
}
|