Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Move db driver related code to plugin folder
天舟e99115811e09
diff --git a/api/instance.go b/api/instance.goindex e5db469ea1..d60575f2d7 100644--- a/api/instance.go+++ b/api/instance.go@@ -4,7 +4,7 @@ import ("context""encoding/json"- "github.com/bytebase/bytebase/db"+ "github.com/bytebase/bytebase/plugin/db")type Instance struct {diff --git a/api/sql.go b/api/sql.goindex b7f639a695..8019d3c929 100644--- a/api/sql.go+++ b/api/sql.go@@ -3,7 +3,7 @@ package apiimport ("context"- "github.com/bytebase/bytebase/db"+ "github.com/bytebase/bytebase/plugin/db")type ConnectionInfo struct {diff --git a/db/driver.go b/plugin/db/driver.gosimilarity index 100%rename from db/driver.gorename to plugin/db/driver.godiff --git a/db/driver_test.go b/plugin/db/driver_test.gosimilarity index 100%rename from db/driver_test.gorename to plugin/db/driver_test.godiff --git a/db/mysql.go b/plugin/db/mysql.gosimilarity index 100%rename from db/mysql.gorename to plugin/db/mysql.godiff --git a/db/mysql_migration_schema.sql b/plugin/db/mysql_migration_schema.sqlsimilarity index 100%rename from db/mysql_migration_schema.sqlrename to plugin/db/mysql_migration_schema.sqldiff --git a/server/database.go b/server/database.goindex af7023ef3e..b9045be57f 100644--- a/server/database.go+++ b/server/database.go@@ -10,7 +10,7 @@ import ("github.com/bytebase/bytebase/api""github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/db"+ "github.com/bytebase/bytebase/plugin/db""github.com/google/jsonapi""github.com/labstack/echo/v4""go.uber.org/zap"diff --git a/server/instance.go b/server/instance.goindex 5eceabe733..4e4527008d 100644--- a/server/instance.go+++ b/server/instance.go@@ -8,7 +8,7 @@ import ("github.com/bytebase/bytebase/api""github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/db"+ "github.com/bytebase/bytebase/plugin/db""github.com/google/jsonapi""github.com/labstack/echo/v4")diff --git a/server/sql.go b/server/sql.goindex c670c44f2d..9e52e98bc6 100644--- a/server/sql.go+++ b/server/sql.go@@ -8,7 +8,7 @@ import ("github.com/bytebase/bytebase/api""github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/db"+ "github.com/bytebase/bytebase/plugin/db""github.com/google/jsonapi""github.com/labstack/echo/v4")diff --git a/server/task_executor_database_backup.go b/server/task_executor_database_backup.goindex 46d5c3cb0c..63346aab75 100644--- a/server/task_executor_database_backup.go+++ b/server/task_executor_database_backup.go@@ -10,7 +10,7 @@ import ("github.com/bytebase/bytebase/api""github.com/bytebase/bytebase/bin/bb/connect""github.com/bytebase/bytebase/bin/bb/dump/mysqldump"- "github.com/bytebase/bytebase/db"+ "github.com/bytebase/bytebase/plugin/db""go.uber.org/zap")diff --git a/server/task_executor_database_restore.go b/server/task_executor_database_restore.goindex 37027656f0..19b1e4ea70 100644--- a/server/task_executor_database_restore.go+++ b/server/task_executor_database_restore.go@@ -13,7 +13,7 @@ import ("github.com/bytebase/bytebase/bin/bb/connect""github.com/bytebase/bytebase/bin/bb/restore/mysqlrestore""github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/db"+ "github.com/bytebase/bytebase/plugin/db""go.uber.org/zap")diff --git a/server/task_executor_schema_update.go b/server/task_executor_schema_update.goindex 2e15a2ce65..c5215012fe 100644--- a/server/task_executor_schema_update.go+++ b/server/task_executor_schema_update.go@@ -8,7 +8,7 @@ import ("strings""github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/db"+ "github.com/bytebase/bytebase/plugin/db""go.uber.org/zap")diff --git a/server/webhook.go b/server/webhook.goindex 89cd1c82b6..56f5e66acd 100644--- a/server/webhook.go+++ b/server/webhook.go@@ -14,8 +14,8 @@ import ("github.com/bytebase/bytebase/api""github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/db""github.com/bytebase/bytebase/external/gitlab"+ "github.com/bytebase/bytebase/plugin/db""github.com/labstack/echo/v4""go.uber.org/zap")