eb85b2e090
* Add "Browse" tab to the forums to view them all. * Text search * Show all, official, community, or "My List" forums. * Add a Follow/Unfollow button into the header bar of forums to add it to "My List" * On the Categories page, a special "My List" category appears at the top if the user follows categories, with their follows in alphabetical order. * On the Categories & Browse pages: forums you follow will have a green bookmark icon by their name. Permissions: * The forum owner is able to Delete comments by others, but not Edit. Notes: * Currently a max limit of 100 follow forums (no pagination yet).
40 lines
1.0 KiB
Go
40 lines
1.0 KiB
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{})
|
|
DB.AutoMigrate(&TwoFactor{})
|
|
DB.AutoMigrate(&ChangeLog{})
|
|
DB.AutoMigrate(&IPAddress{})
|
|
DB.AutoMigrate(&PushNotification{})
|
|
DB.AutoMigrate(&WorldCities{})
|
|
DB.AutoMigrate(&ForumMembership{})
|
|
}
|