feat: serve the quiz API under /_quizzes/api/v1 behind jwt.auth
This commit is contained in:
22
updates/20261002120625_add_category_to_attempts.go
Normal file
22
updates/20261002120625_add_category_to_attempts.go
Normal file
@@ -0,0 +1,22 @@
|
||||
// Code generated by summer make. DO NOT EDIT.
|
||||
|
||||
package updates
|
||||
|
||||
import (
|
||||
"github.com/go-gormigrate/gormigrate/v2"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// AddCategoryToAttempts returns the 20261002120625_add_category_to_attempts gormigrate entry.
|
||||
// An attempt started with a category covers only that category's questions.
|
||||
func AddCategoryToAttempts() *gormigrate.Migration {
|
||||
return &gormigrate.Migration{
|
||||
ID: "20261002120625_add_category_to_attempts",
|
||||
Migrate: func(tx *gorm.DB) error {
|
||||
return tx.Exec("ALTER TABLE golem15_quizzes_attempts ADD COLUMN category VARCHAR(255) NULL").Error
|
||||
},
|
||||
Rollback: func(tx *gorm.DB) error {
|
||||
return tx.Exec("ALTER TABLE golem15_quizzes_attempts DROP COLUMN IF EXISTS category").Error
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user