migrate all built-in storage backends.

This commit is contained in:
fiatjaf
2023-05-01 19:40:16 -03:00
parent e3d4655dba
commit 4e15120111
15 changed files with 120 additions and 80 deletions

View File

@@ -1,11 +1,14 @@
package sqlite3
import (
"github.com/fiatjaf/relayer/v2"
"github.com/jmoiron/sqlx"
"github.com/jmoiron/sqlx/reflectx"
_ "github.com/mattn/go-sqlite3"
)
var _ relayer.Storage = (*SQLite3Backend)(nil)
func (b *SQLite3Backend) Init() error {
db, err := sqlx.Connect("sqlite3", b.DatabaseURL)
if err != nil {