Create tables

This commit is contained in:
Neil Alexander 2021-07-28 13:48:23 +01:00
parent ecbc1bcd61
commit dcadec88d9
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
10 changed files with 337 additions and 18 deletions

View file

@ -41,12 +41,27 @@ func NewDatabase(dbProperties *config.DatabaseOptions) (*shared.Database, error)
if err != nil {
return nil, err
}
csk, err := NewSqliteCrossSigningKeysTable(db)
if err != nil {
return nil, err
}
css, err := NewSqliteCrossSigningSigsTable(db)
if err != nil {
return nil, err
}
cst, err := NewSqliteCrossSigningStreamsTable(db)
if err != nil {
return nil, err
}
return &shared.Database{
DB: db,
Writer: sqlutil.NewExclusiveWriter(),
OneTimeKeysTable: otk,
DeviceKeysTable: dk,
KeyChangesTable: kc,
StaleDeviceListsTable: sdl,
DB: db,
Writer: sqlutil.NewExclusiveWriter(),
OneTimeKeysTable: otk,
DeviceKeysTable: dk,
KeyChangesTable: kc,
StaleDeviceListsTable: sdl,
CrossSigningKeysTable: csk,
CrossSigningSigsTable: css,
CrossSigningStreamsTable: cst,
}, nil
}