All checks were successful
check / check (push) Successful in 57s
Remove SESSION_KEY env var requirement. On first startup, a cryptographically secure 32-byte key is generated and stored in a new settings table. Subsequent startups load the key from the database. - Add Setting model (key-value table) for application config - Add Database.GetOrCreateSessionKey() method - Session manager initializes in OnStart after database is connected - Remove DevSessionKey constant and SESSION_KEY env var handling - Remove prod validation requiring SESSION_KEY - Update README: config table, Docker instructions, security notes - Update config.yaml.example - Update all tests to remove SessionKey references Addresses owner feedback on issue #15.
17 lines
433 B
Go
17 lines
433 B
Go
package database
|
|
|
|
// Migrate runs database migrations for the main application database.
|
|
// Only configuration-tier models are stored in the main database.
|
|
// Event-tier models (Event, Delivery, DeliveryResult) live in
|
|
// per-webhook dedicated databases managed by WebhookDBManager.
|
|
func (d *Database) Migrate() error {
|
|
return d.db.AutoMigrate(
|
|
&Setting{},
|
|
&User{},
|
|
&APIKey{},
|
|
&Webhook{},
|
|
&Entrypoint{},
|
|
&Target{},
|
|
)
|
|
}
|