Sqlite - add sqlc and migration (#217)

This commit is contained in:
Dusan Sekulic
2024-07-26 02:09:48 +02:00
committed by GitHub
parent 03cbb22a34
commit e45bff3c70
19 changed files with 1743 additions and 706 deletions

View File

@@ -40,6 +40,7 @@ type Config struct {
DbType string
EventDbType string
DbDir string
DbMigrationPath string
EventDbDir string
RoundInterval int64
Network common.Network
@@ -167,7 +168,7 @@ func (c *Config) repoManager() error {
case "badger":
dataStoreConfig = []interface{}{c.DbDir, logger}
case "sqlite":
dataStoreConfig = []interface{}{c.DbDir}
dataStoreConfig = []interface{}{c.DbDir, c.DbMigrationPath}
default:
return fmt.Errorf("unknown db type")
}