Fix SSO table initialization.

This commit is contained in:
Tommie Gannert 2022-05-25 18:32:03 +02:00
parent 58233c790a
commit 73e83c2b51
2 changed files with 10 additions and 0 deletions

View file

@ -94,6 +94,10 @@ func NewDatabase(base *base.BaseDendrite, dbProperties *config.DatabaseOptions,
if err != nil {
return nil, fmt.Errorf("NewPostgresNotificationTable: %w", err)
}
ssoTable, err := NewPostgresSSOTable(db)
if err != nil {
return nil, fmt.Errorf("NewPostgresSSOTable: %w", err)
}
statsTable, err := NewPostgresStatsTable(db, serverName)
if err != nil {
return nil, fmt.Errorf("NewPostgresStatsTable: %w", err)
@ -110,6 +114,7 @@ func NewDatabase(base *base.BaseDendrite, dbProperties *config.DatabaseOptions,
ThreePIDs: threePIDTable,
Pushers: pusherTable,
Notifications: notificationsTable,
SSOs: ssoTable,
Stats: statsTable,
ServerName: serverName,
DB: db,

View file

@ -95,6 +95,10 @@ func NewDatabase(base *base.BaseDendrite, dbProperties *config.DatabaseOptions,
if err != nil {
return nil, fmt.Errorf("NewPostgresNotificationTable: %w", err)
}
ssoTable, err := NewSQLiteSSOTable(db)
if err != nil {
return nil, fmt.Errorf("NewSQLiteSSOTable: %w", err)
}
statsTable, err := NewSQLiteStatsTable(db, serverName)
if err != nil {
return nil, fmt.Errorf("NewSQLiteStatsTable: %w", err)
@ -111,6 +115,7 @@ func NewDatabase(base *base.BaseDendrite, dbProperties *config.DatabaseOptions,
ThreePIDs: threePIDTable,
Pushers: pusherTable,
Notifications: notificationsTable,
SSOs: ssoTable,
Stats: statsTable,
ServerName: serverName,
DB: db,