Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB
DB is the global database instance
Functions ¶
func NewTestDB ¶
NewTestDB creates an in-memory SQLite database for testing. Callers that need a users table should prefer SetupTestDB(t) which also creates the table and registers cleanup. This function is kept for compatibility with test helpers that manage their own schema.
func RollbackMigration ¶
RollbackMigration rolls back the last migration
func RunMigrations ¶
RunMigrations runs all pending database migrations
Types ¶
Click to show internal directories.
Click to hide internal directories.