Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Move db driver related code to plugin folder

天舟e99115811e09
diff --git a/api/instance.go b/api/instance.go
index 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.go
index b7f639a695..8019d3c929 100644
--- a/api/sql.go
+++ b/api/sql.go
@@ -3,7 +3,7 @@ package api
import (
"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.go
similarity index 100%
rename from db/driver.go
rename to plugin/db/driver.go
diff --git a/db/driver_test.go b/plugin/db/driver_test.go
similarity index 100%
rename from db/driver_test.go
rename to plugin/db/driver_test.go
diff --git a/db/mysql.go b/plugin/db/mysql.go
similarity index 100%
rename from db/mysql.go
rename to plugin/db/mysql.go
diff --git a/db/mysql_migration_schema.sql b/plugin/db/mysql_migration_schema.sql
similarity index 100%
rename from db/mysql_migration_schema.sql
rename to plugin/db/mysql_migration_schema.sql
diff --git a/server/database.go b/server/database.go
index 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.go
index 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.go
index 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.go
index 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.go
index 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.go
index 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.go
index 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"
)