MSP-625 remove db cli

This commit is contained in:
DeniskaRediska authored and d1slike committed 2022-07-27 10:43:47 +03:00
1 parent b0f871d032
commit 6f511ddc53
5 files changed
-46

No files matched your search

-2
View File
@@ -18,7 +18,6 @@ import (
"isp-gate-service/conf"
"isp-gate-service/proxy"
"isp-gate-service/redis"
"isp-gate-service/repository"
"isp-gate-service/routing"
"isp-gate-service/server"
"isp-gate-service/service"
@@ -61,7 +60,6 @@ func onLocalConfigLoad(_ *conf.Configuration) {
}
func onRemoteConfigReceive(remoteConfig, oldRemoteConfig *conf.RemoteConfig) {
repository.DbClient.ReceiveConfiguration(remoteConfig.Database)
matcher.JournalMethods = matcher.NewAtLeastOneMatcher(remoteConfig.JournalSetting.MethodsPatterns)
redis.Client.ReceiveConfiguration(remoteConfig.Redis)
-9
View File
@@ -1,9 +0,0 @@
-- +goose Up
CREATE TABLE snapshot(
app_id INTEGER PRIMARY KEY,
limit_state JSONB
);
-- +goose Down
DROP SCHEMA IF EXISTS gate_service CASCADE;
@@ -1,12 +0,0 @@
-- +goose Up
CREATE TABLE requests
(
id SERIAL8 PRIMARY KEY,
app_id INT4 NOT NULL,
method VARCHAR(255) NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT now()
);
-- +goose Down
DROP TABLE requests;
@@ -1,6 +0,0 @@
-- +goose Up
ALTER TABLE snapshot
ADD version BIGINT NOT NULL DEFAULT 0;
-- +goose Down
-17
View File
@@ -1,17 +0,0 @@
package repository
import (
"github.com/integration-system/isp-lib/v2/database"
log "github.com/integration-system/isp-log"
"isp-gate-service/log_code"
)
var (
DbClient = database.NewRxDbClient(
database.WithSchemaEnsuring(),
database.WithSchemaAutoInjecting(),
database.WithMigrationsEnsuring(),
database.WithInitializingErrorHandler(func(err *database.ErrorEvent) {
log.Error(log_code.ErrorClientDatabase, err)
}))
)