49b5387750
New feature: User Notes * Add a "Notes" tab to user profile pages and galleries. * Users can create one private note about another user. * Admins can see all notes left about a user. * Admins also see Feedback & Reports regarding the user on that page. Bring back the online chatters list * The Usernames are filtered down based on blocklist status.
34 lines
859 B
Go
34 lines
859 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(&PrivatePhoto{})
|
|
DB.AutoMigrate(&CertificationPhoto{})
|
|
DB.AutoMigrate(&Message{})
|
|
DB.AutoMigrate(&Friend{})
|
|
DB.AutoMigrate(&Block{})
|
|
DB.AutoMigrate(&Feedback{})
|
|
DB.AutoMigrate(&Forum{})
|
|
DB.AutoMigrate(&Thread{})
|
|
DB.AutoMigrate(&Comment{})
|
|
DB.AutoMigrate(&Like{})
|
|
DB.AutoMigrate(&Notification{})
|
|
DB.AutoMigrate(&Subscription{})
|
|
DB.AutoMigrate(&CommentPhoto{})
|
|
DB.AutoMigrate(&Poll{})
|
|
DB.AutoMigrate(&PollVote{})
|
|
DB.AutoMigrate(&AdminGroup{})
|
|
DB.AutoMigrate(&AdminScope{})
|
|
DB.AutoMigrate(&UserLocation{})
|
|
DB.AutoMigrate(&UserNote{})
|
|
}
|