aboutsummaryrefslogtreecommitdiff
path: root/userapi/storage/devices/postgres/devices_table.go
diff options
context:
space:
mode:
Diffstat (limited to 'userapi/storage/devices/postgres/devices_table.go')
-rw-r--r--userapi/storage/devices/postgres/devices_table.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/userapi/storage/devices/postgres/devices_table.go b/userapi/storage/devices/postgres/devices_table.go
index 2a4d337c..379fed79 100644
--- a/userapi/storage/devices/postgres/devices_table.go
+++ b/userapi/storage/devices/postgres/devices_table.go
@@ -111,11 +111,12 @@ type devicesStatements struct {
serverName gomatrixserverlib.ServerName
}
+func (s *devicesStatements) execSchema(db *sql.DB) error {
+ _, err := db.Exec(devicesSchema)
+ return err
+}
+
func (s *devicesStatements) prepare(db *sql.DB, server gomatrixserverlib.ServerName) (err error) {
- _, err = db.Exec(devicesSchema)
- if err != nil {
- return
- }
if s.insertDeviceStmt, err = db.Prepare(insertDeviceSQL); err != nil {
return
}