Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: restructure backend code (#4376)
Danny Xu654b8ebe309a
diff --git a/.dockerignore b/.dockerignoreindex 2aeadfc9a6..161f665a15 100644--- a/.dockerignore+++ b/.dockerignore@@ -1,3 +1,3 @@frontend/node_modules-server/dist+backend/server/distbytebase-builddiff --git a/.github/workflows/backend-tests-default.yml b/.github/workflows/backend-tests-default.ymlindex 35cdc2d6ad..aaa9a64a22 100644--- a/.github/workflows/backend-tests-default.yml+++ b/.github/workflows/backend-tests-default.yml@@ -6,11 +6,8 @@ on:branches:- main- "release/*.*.*"- paths:- - "docs/**"- - "frontend/**"- - "scripts/**"- - "quickstart/**"+ paths-ignore:+ - "backend/**"jobs:golangci-lint:diff --git a/.github/workflows/backend-tests.yml b/.github/workflows/backend-tests.ymlindex 81ba4a51a6..e5d187f958 100644--- a/.github/workflows/backend-tests.yml+++ b/.github/workflows/backend-tests.yml@@ -5,11 +5,8 @@ on:branches:- main- "release/*.*.*"- paths-ignore:- - "docs/**"- - "frontend/**"- - "scripts/**"- - "quickstart/**"+ paths:+ - "backend/**"jobs:golangci-lint:@@ -32,8 +29,8 @@ jobs:uses: actions/cache@v3with:path: |- ./resources/mysql/*.tar.gz- ./resources/mysql/*.tar.xz+ ./backend/resources/mysql/*.tar.gz+ ./backend/resources/mysql/*.tar.xzkey: ${{ runner.OS }}-build-mysql-cache- name: Install dependenciesrun: go generate -tags mysql ./...@@ -66,8 +63,8 @@ jobs:uses: actions/cache@v3with:path: |- ./resources/mysql/*.tar.gz- ./resources/mysql/*.tar.xz+ ./backend/resources/mysql/*.tar.gz+ ./backend/resources/mysql/*.tar.xzkey: ${{ runner.OS }}-build-mysql-cache- name: Install dependenciesrun: go generate -tags ${{ matrix.release-tags }} ./...diff --git a/Dockerfile b/Dockerfileindex 610b2fa980..051f12e5ec 100644--- a/Dockerfile+++ b/Dockerfile@@ -19,7 +19,7 @@ RUN pnpm install --frozen-lockfileCOPY ./frontend/ .# Copy the SQL review config files to the frontend-COPY ./plugin/advisor/config/ ./src/types+COPY ./backend/plugin/advisor/config/ ./src/types# Build frontendRUN pnpm "${RELEASE}-docker"@@ -43,7 +43,7 @@ WORKDIR /backend-buildCOPY . .# Copy frontend asset-COPY --from=frontend /frontend-build/dist ./server/dist+COPY --from=frontend /frontend-build/dist ./backend/server/distCOPY ./scripts/VERSION .@@ -51,9 +51,9 @@ COPY ./scripts/VERSION .# go-sqlite3 requires CGO_ENABLEDRUN VERSION=`cat ./VERSION`${VERSION_SUFFIX} && CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build \--tags "${RELEASE},embed_frontend" \- -ldflags="-w -s -X 'github.com/bytebase/bytebase/bin/server/cmd.version=${VERSION}' -X 'github.com/bytebase/bytebase/bin/server/cmd.goversion=${GO_VERSION}' -X 'github.com/bytebase/bytebase/bin/server/cmd.gitcommit=${GIT_COMMIT}' -X 'github.com/bytebase/bytebase/bin/server/cmd.buildtime=${BUILD_TIME}' -X 'github.com/bytebase/bytebase/bin/server/cmd.builduser=${BUILD_USER}'" \+ -ldflags="-w -s -X 'github.com/bytebase/bytebase/backend/bin/server/cmd.version=${VERSION}' -X 'github.com/bytebase/bytebase/backend/bin/server/cmd.goversion=${GO_VERSION}' -X 'github.com/bytebase/bytebase/backend/bin/server/cmd.gitcommit=${GIT_COMMIT}' -X 'github.com/bytebase/bytebase/backend/bin/server/cmd.buildtime=${BUILD_TIME}' -X 'github.com/bytebase/bytebase/backend/bin/server/cmd.builduser=${BUILD_USER}'" \-o bytebase \- ./bin/server/main.go+ ./backend/bin/server/main.go# Use debian because mysql requires glibc.FROM debian:bullseye-slim as monolithicdiff --git a/Dockerfile.bb b/Dockerfile.bbindex 53430e3102..e081df1ba9 100644--- a/Dockerfile.bb+++ b/Dockerfile.bb@@ -20,9 +20,9 @@ COPY . .# -ldflags="-w -s" means omit DWARF symbol table and the symbol table and debug informationRUN GOOS=linux GOARCH=amd64 go build \--tags "release" \- -ldflags="-w -s -X 'github.com/bytebase/bytebase/bin/bb/cmd.version=${VERSION}' -X 'github.com/bytebase/bytebase/bin/bb/cmd.goversion=${GO_VERSION}' -X 'github.com/bytebase/bytebase/bin/bb/cmd.gitcommit=${GIT_COMMIT}' -X 'github.com/bytebase/bytebase/bin/bb/cmd.buildtime=${BUILD_TIME}' -X 'github.com/bytebase/bytebase/bin/bb/cmd.builduser=${BUILD_USER}'" \+ -ldflags="-w -s -X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.version=${VERSION}' -X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.goversion=${GO_VERSION}' -X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.gitcommit=${GIT_COMMIT}' -X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.buildtime=${BUILD_TIME}' -X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.builduser=${BUILD_USER}'" \-o bb \- ./bin/bb/main.go+ ./backend/bin/bb/main.go# Use debian because mysql requires glibc.FROM debian:bullseye-slim as monolithicdiff --git a/Dockerfile.render-demo b/Dockerfile.render-demoindex 2b58d6b6e1..c80f39435a 100644--- a/Dockerfile.render-demo+++ b/Dockerfile.render-demo@@ -14,7 +14,7 @@ RUN pnpm install --frozen-lockfileCOPY ./frontend/ .# Copy the SQL review config files to the frontend-COPY ./plugin/advisor/config/ ./src/types+COPY ./backend/plugin/advisor/config/ ./src/types# Build frontendRUN pnpm "${RELEASE}-docker"@@ -38,7 +38,7 @@ WORKDIR /backend-buildCOPY . .# Copy frontend asset-COPY --from=frontend /frontend-build/dist ./server/dist+COPY --from=frontend /frontend-build/dist ./backend/server/distCOPY ./scripts/VERSION .@@ -46,9 +46,9 @@ COPY ./scripts/VERSION .# go-sqlite3 requires CGO_ENABLEDRUN VERSION=`cat ./VERSION` && CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build \--tags "${RELEASE},embed_frontend" \- -ldflags="-w -s -X 'github.com/bytebase/bytebase/bin/server/cmd.version=${VERSION}' -X 'github.com/bytebase/bytebase/bin/server/cmd.goversion=${GO_VERSION}' -X 'github.com/bytebase/bytebase/bin/server/cmd.gitcommit=${RENDER_GIT_COMMIT}' -X 'github.com/bytebase/bytebase/bin/server/cmd.buildtime=${BUILD_TIME}' -X 'github.com/bytebase/bytebase/bin/server/cmd.builduser=${BUILD_USER}'" \+ -ldflags="-w -s -X 'github.com/bytebase/bytebase/backend/bin/server/cmd.version=${VERSION}' -X 'github.com/bytebase/bytebase/backend/bin/server/cmd.goversion=${GO_VERSION}' -X 'github.com/bytebase/bytebase/backend/bin/server/cmd.gitcommit=${RENDER_GIT_COMMIT}' -X 'github.com/bytebase/bytebase/backend/bin/server/cmd.buildtime=${BUILD_TIME}' -X 'github.com/bytebase/bytebase/backend/bin/server/cmd.builduser=${BUILD_USER}'" \-o bytebase \- ./bin/server/main.go+ ./backend/bin/server/main.go# Use debian because mysql requires glibc.FROM debian:bullseye-slim as monolithicdiff --git a/Dockerfile.sql-service b/Dockerfile.sql-serviceindex cedf7b7779..bdd8bc4734 100644--- a/Dockerfile.sql-service+++ b/Dockerfile.sql-service@@ -28,9 +28,9 @@ COPY ./scripts/VERSION .# go-sqlite3 requires CGO_ENABLEDRUN VERSION=`cat ./VERSION` && CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build \--tags "${RELEASE}" \- -ldflags="-w -s -X 'github.com/bytebase/bytebase/bin/sql-service/cmd.version=${VERSION}' -X 'github.com/bytebase/bytebase/bin/sql-service/cmd.goversion=${GO_VERSION}' -X 'github.com/bytebase/bytebase/bin/sql-service/cmd.gitcommit=${GIT_COMMIT}' -X 'github.com/bytebase/bytebase/bin/sql-service/cmd.buildtime=${BUILD_TIME}' -X 'github.com/bytebase/bytebase/bin/sql-service/cmd.builduser=${BUILD_USER}'" \+ -ldflags="-w -s -X 'github.com/bytebase/bytebase/backend/bin/sql-service/cmd.version=${VERSION}' -X 'github.com/bytebase/bytebase/backend/bin/sql-service/cmd.goversion=${GO_VERSION}' -X 'github.com/bytebase/bytebase/backend/bin/sql-service/cmd.gitcommit=${GIT_COMMIT}' -X 'github.com/bytebase/bytebase/backend/bin/sql-service/cmd.buildtime=${BUILD_TIME}' -X 'github.com/bytebase/bytebase/backend/bin/sql-service/cmd.builduser=${BUILD_USER}'" \-o sql-service \- ./bin/sql-service/main.go+ ./backend/bin/sql-service/main.go# Use debian because mysql requires glibc.FROM debian:bullseye-slim as monolithicdiff --git a/LICENSE b/LICENSEindex 49623f3b72..56a453d34a 100644--- a/LICENSE+++ b/LICENSE@@ -2,7 +2,7 @@ Copyright (c) 2022-present Bytebase (Hong Kong) Limited.Portions of this software are licensed as follows:-* All content that resides under the "enterprise/" and "frontend/src/enterprise/" directory of this repository, if that directory exists, is licensed under the license defined in "LICENSE.enterprise".+* All content that resides under the "backend/enterprise/" and "frontend/src/enterprise/" directory of this repository, if that directory exists, is licensed under the license defined in "LICENSE.enterprise".* Content outside of the above mentioned directories or restrictions above is available under the "MIT Expat" license as defined below.Permission is hereby granted, free of charge, to any person obtaining a copydiff --git a/LICENSE.enterprise b/LICENSE.enterpriseindex 85e14ff901..fe8048c348 100644--- a/LICENSE.enterprise+++ b/LICENSE.enterprise@@ -1,7 +1,7 @@####################################################################################### #### NOTE: The following license applies to following code: ##-## 1. enterprise/ and its subdirectories ##+## 1. backend/enterprise/ and its subdirectories #### 2. frontend/src/enterprise/ and its directories #### 3. Any code controlling feature, permission, role and plan enablement #### ##diff --git a/api/api_dependency_gate.go b/api/api_dependency_gate.godeleted file mode 100644index 1def5db507..0000000000--- a/api/api_dependency_gate.go+++ /dev/null@@ -1,18 +0,0 @@-//go:build !release-// +build !release--package api--// The idea of dependency gate is to use compiler check to prevent introducing unintended dependency.-// In particular:-// 1. the plugin package should NOT depend on the api package as the plugin package should be self-contained.--import (- // dependency gate.- _ "github.com/bytebase/bytebase/plugin/advisor"- _ "github.com/bytebase/bytebase/plugin/db"- _ "github.com/bytebase/bytebase/plugin/metric"- _ "github.com/bytebase/bytebase/plugin/parser"- _ "github.com/bytebase/bytebase/plugin/vcs"- _ "github.com/bytebase/bytebase/plugin/webhook"-)diff --git a/api/CODENOTIFY b/backend/api/CODENOTIFYsimilarity index 100%rename from api/CODENOTIFYrename to backend/api/CODENOTIFYdiff --git a/api/activity.go b/backend/api/activity.gosimilarity index 99%rename from api/activity.gorename to backend/api/activity.goindex 5873b37bf8..8b824ddd4a 100644--- a/api/activity.go+++ b/backend/api/activity.go@@ -3,8 +3,8 @@ package apiimport ("encoding/json"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/vcs"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/vcs")// ActivityType is the type for an activity.diff --git a/api/actuator.go b/backend/api/actuator.gosimilarity index 100%rename from api/actuator.gorename to backend/api/actuator.godiff --git a/api/anomaly.go b/backend/api/anomaly.gosimilarity index 100%rename from api/anomaly.gorename to backend/api/anomaly.godiff --git a/api/api.go b/backend/api/api.gosimilarity index 100%rename from api/api.gorename to backend/api/api.godiff --git a/backend/api/api_dependency_gate.go b/backend/api/api_dependency_gate.gonew file mode 100644index 0000000000..52ff3e8831--- /dev/null+++ b/backend/api/api_dependency_gate.go@@ -0,0 +1,18 @@+//go:build !release+// +build !release++package api++// The idea of dependency gate is to use compiler check to prevent introducing unintended dependency.+// In particular:+// 1. the plugin package should NOT depend on the api package as the plugin package should be self-contained.++import (+ // dependency gate.+ _ "github.com/bytebase/bytebase/backend/plugin/advisor"+ _ "github.com/bytebase/bytebase/backend/plugin/db"+ _ "github.com/bytebase/bytebase/backend/plugin/metric"+ _ "github.com/bytebase/bytebase/backend/plugin/parser"+ _ "github.com/bytebase/bytebase/backend/plugin/vcs"+ _ "github.com/bytebase/bytebase/backend/plugin/webhook"+)diff --git a/api/auth.go b/backend/api/auth.gosimilarity index 95%rename from api/auth.gorename to backend/api/auth.goindex 194944652a..a6a1fcd58e 100644--- a/api/auth.go+++ b/backend/api/auth.go@@ -1,6 +1,6 @@package api-import "github.com/bytebase/bytebase/plugin/vcs"+import "github.com/bytebase/bytebase/backend/plugin/vcs"// AuthProvider is the authentication provider which only supports GitLab for now.type AuthProvider struct {diff --git a/api/backup.go b/backend/api/backup.gosimilarity index 100%rename from api/backup.gorename to backend/api/backup.godiff --git a/api/bookmark.go b/backend/api/bookmark.gosimilarity index 100%rename from api/bookmark.gorename to backend/api/bookmark.godiff --git a/api/data_source.go b/backend/api/data_source.gosimilarity index 100%rename from api/data_source.gorename to backend/api/data_source.godiff --git a/api/database.go b/backend/api/database.gosimilarity index 100%rename from api/database.gorename to backend/api/database.godiff --git a/api/debug.go b/backend/api/debug.gosimilarity index 100%rename from api/debug.gorename to backend/api/debug.godiff --git a/api/deploy.go b/backend/api/deploy.gosimilarity index 98%rename from api/deploy.gorename to backend/api/deploy.goindex fefb83ff0c..be94d39e8b 100644--- a/api/deploy.go+++ b/backend/api/deploy.go@@ -3,7 +3,7 @@ package apiimport ("encoding/json"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/common")// DeploymentConfig is the API message for deployment configurations.diff --git a/api/deploy_test.go b/backend/api/deploy_test.gosimilarity index 100%rename from api/deploy_test.gorename to backend/api/deploy_test.godiff --git a/api/environment.go b/backend/api/environment.gosimilarity index 100%rename from api/environment.gorename to backend/api/environment.godiff --git a/api/external_approval.go b/backend/api/external_approval.gosimilarity index 100%rename from api/external_approval.gorename to backend/api/external_approval.godiff --git a/api/inbox.go b/backend/api/inbox.gosimilarity index 100%rename from api/inbox.gorename to backend/api/inbox.godiff --git a/api/instance.go b/backend/api/instance.gosimilarity index 99%rename from api/instance.gorename to backend/api/instance.goindex 59cdcdbd18..40ccfd78ff 100644--- a/api/instance.go+++ b/backend/api/instance.go@@ -3,7 +3,7 @@ package apiimport ("encoding/json"- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db")// Instance is the API message for an instance.diff --git a/api/instance_user.go b/backend/api/instance_user.gosimilarity index 100%rename from api/instance_user.gorename to backend/api/instance_user.godiff --git a/api/issue.go b/backend/api/issue.gosimilarity index 99%rename from api/issue.gorename to backend/api/issue.goindex e9ff20a06d..81e618accc 100644--- a/api/issue.go+++ b/backend/api/issue.go@@ -1,8 +1,8 @@package apiimport (- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/vcs"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/vcs")// IssueStatus is the status of an issue.diff --git a/api/issue_subscriber.go b/backend/api/issue_subscriber.gosimilarity index 100%rename from api/issue_subscriber.gorename to backend/api/issue_subscriber.godiff --git a/api/label.go b/backend/api/label.gosimilarity index 100%rename from api/label.gorename to backend/api/label.godiff --git a/api/label_test.go b/backend/api/label_test.gosimilarity index 100%rename from api/label_test.gorename to backend/api/label_test.godiff --git a/api/member.go b/backend/api/member.gosimilarity index 100%rename from api/member.gorename to backend/api/member.godiff --git a/api/oauth.go b/backend/api/oauth.gosimilarity index 100%rename from api/oauth.gorename to backend/api/oauth.godiff --git a/api/pipeline.go b/backend/api/pipeline.gosimilarity index 100%rename from api/pipeline.gorename to backend/api/pipeline.godiff --git a/api/plan.go b/backend/api/plan.gosimilarity index 100%rename from api/plan.gorename to backend/api/plan.godiff --git a/api/policy.go b/backend/api/policy.gosimilarity index 99%rename from api/policy.gorename to backend/api/policy.goindex 09c28b7e2e..85ff55b364 100644--- a/api/policy.go+++ b/backend/api/policy.go@@ -5,7 +5,7 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor")// PolicyType is the type or name of a policy.diff --git a/api/principal.go b/backend/api/principal.gosimilarity index 100%rename from api/principal.gorename to backend/api/principal.godiff --git a/api/project.go b/backend/api/project.gosimilarity index 99%rename from api/project.gorename to backend/api/project.goindex 5467e53eab..5cd593a64e 100644--- a/api/project.go+++ b/backend/api/project.go@@ -7,7 +7,7 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/common")const (diff --git a/api/project_member.go b/backend/api/project_member.gosimilarity index 98%rename from api/project_member.gorename to backend/api/project_member.goindex b84d345483..00a6e04963 100644--- a/api/project_member.go+++ b/backend/api/project_member.go@@ -1,7 +1,7 @@package apiimport (- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/common")// ProjectMember is the API message for project members.diff --git a/api/project_setting.go b/backend/api/project_setting.gosimilarity index 100%rename from api/project_setting.gorename to backend/api/project_setting.godiff --git a/api/project_test.go b/backend/api/project_test.gosimilarity index 99%rename from api/project_test.gorename to backend/api/project_test.goindex a52211251e..dcd6a811bd 100644--- a/api/project_test.go+++ b/backend/api/project_test.go@@ -5,7 +5,7 @@ import ("github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/common")func TestGetTemplateTokens(t *testing.T) {diff --git a/api/project_webhook.go b/backend/api/project_webhook.gosimilarity index 100%rename from api/project_webhook.gorename to backend/api/project_webhook.godiff --git a/api/repository.go b/backend/api/repository.gosimilarity index 100%rename from api/repository.gorename to backend/api/repository.godiff --git a/api/setting.go b/backend/api/setting.gosimilarity index 100%rename from api/setting.gorename to backend/api/setting.godiff --git a/api/sheet.go b/backend/api/sheet.gosimilarity index 100%rename from api/sheet.gorename to backend/api/sheet.godiff --git a/api/sheet_organizer.go b/backend/api/sheet_organizer.gosimilarity index 100%rename from api/sheet_organizer.gorename to backend/api/sheet_organizer.godiff --git a/api/slug.go b/backend/api/slug.gosimilarity index 100%rename from api/slug.gorename to backend/api/slug.godiff --git a/api/sql.go b/backend/api/sql.gosimilarity index 95%rename from api/sql.gorename to backend/api/sql.goindex 645e7f2249..9d10f429ce 100644--- a/api/sql.go+++ b/backend/api/sql.go@@ -3,8 +3,8 @@ package apiimport ("context"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/db")// ConnectionInfo is the API message for connection infos.diff --git a/api/stage.go b/backend/api/stage.gosimilarity index 100%rename from api/stage.gorename to backend/api/stage.godiff --git a/api/task.go b/backend/api/task.gosimilarity index 99%rename from api/task.gorename to backend/api/task.goindex 5cef4ee279..466454cd72 100644--- a/api/task.go+++ b/backend/api/task.go@@ -3,8 +3,8 @@ package apiimport ("encoding/json"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/vcs"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/vcs")// TaskStatus is the status of a task.diff --git a/api/task_check_run.go b/backend/api/task_check_run.gosimilarity index 97%rename from api/task_check_run.gorename to backend/api/task_check_run.goindex ec42c121a2..070a23a5fe 100644--- a/api/task_check_run.go+++ b/backend/api/task_check_run.go@@ -3,10 +3,10 @@ package apiimport ("encoding/json"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/advisor"- advisorDB "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ advisorDB "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/db")// TaskCheckRunStatus is the status of a task check run.diff --git a/api/task_dag.go b/backend/api/task_dag.gosimilarity index 100%rename from api/task_dag.gorename to backend/api/task_dag.godiff --git a/api/task_run.go b/backend/api/task_run.gosimilarity index 98%rename from api/task_run.gorename to backend/api/task_run.goindex 7f0c526765..7d15806054 100644--- a/api/task_run.go+++ b/backend/api/task_run.go@@ -3,7 +3,7 @@ package apiimport ("encoding/json"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/common")// TaskRunStatus is the status of a task run.diff --git a/api/v1/docs.go b/backend/api/v1/docs.gosimilarity index 100%rename from api/v1/docs.gorename to backend/api/v1/docs.godiff --git a/api/v1/instance.go b/backend/api/v1/instance.gosimilarity index 100%rename from api/v1/instance.gorename to backend/api/v1/instance.godiff --git a/api/v1/issue.go b/backend/api/v1/issue.gosimilarity index 91%rename from api/v1/issue.gorename to backend/api/v1/issue.goindex 94569f8756..64048aadab 100644--- a/api/v1/issue.go+++ b/backend/api/v1/issue.go@@ -1,7 +1,7 @@package v1import (- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db")// IssueCreate is the API message for creating an issue.diff --git a/api/vcs.go b/backend/api/vcs.gosimilarity index 96%rename from api/vcs.gorename to backend/api/vcs.goindex 7699d93538..c1f6d980f1 100644--- a/api/vcs.go+++ b/backend/api/vcs.go@@ -3,8 +3,8 @@ package apiimport ("encoding/json"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/vcs"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/vcs")// VCS is the API message for a VCS (Version Control System).diff --git a/bin/bb/README.md b/backend/bin/bb/README.mdsimilarity index 100%rename from bin/bb/README.mdrename to backend/bin/bb/README.mddiff --git a/bin/bb/cmd/dump.go b/backend/bin/bb/cmd/dump.gosimilarity index 100%rename from bin/bb/cmd/dump.gorename to backend/bin/bb/cmd/dump.godiff --git a/bin/bb/cmd/migrate.go b/backend/bin/bb/cmd/migrate.gosimilarity index 96%rename from bin/bb/cmd/migrate.gorename to backend/bin/bb/cmd/migrate.goindex 51bfdd4d2b..f4b2247fff 100644--- a/bin/bb/cmd/migrate.go+++ b/backend/bin/bb/cmd/migrate.go@@ -12,8 +12,8 @@ import ("github.com/spf13/cobra""github.com/xo/dburl"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/db")func newMigrateCmd() *cobra.Command {diff --git a/bin/bb/cmd/restore.go b/backend/bin/bb/cmd/restore.gosimilarity index 100%rename from bin/bb/cmd/restore.gorename to backend/bin/bb/cmd/restore.godiff --git a/bin/bb/cmd/root.go b/backend/bin/bb/cmd/root.gosimilarity index 92%rename from bin/bb/cmd/root.gorename to backend/bin/bb/cmd/root.goindex 903c1d6e47..5b2f87817f 100644--- a/bin/bb/cmd/root.go+++ b/backend/bin/bb/cmd/root.go@@ -4,7 +4,7 @@ package cmdimport ("github.com/spf13/cobra"- "github.com/bytebase/bytebase/common/log"+ "github.com/bytebase/bytebase/backend/common/log")// NewRootCmd creates the root command.diff --git a/bin/bb/cmd/utils.go b/backend/bin/bb/cmd/utils.gosimilarity index 84%rename from bin/bb/cmd/utils.gorename to backend/bin/bb/cmd/utils.goindex 02f4d4d35a..7dd0c35518 100644--- a/bin/bb/cmd/utils.go+++ b/backend/bin/bb/cmd/utils.go@@ -7,14 +7,14 @@ import ("github.com/pkg/errors""github.com/xo/dburl"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/resources/mysqlutil"- "github.com/bytebase/bytebase/resources/postgres"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/resources/mysqlutil"+ "github.com/bytebase/bytebase/backend/resources/postgres"// install mysql driver.- _ "github.com/bytebase/bytebase/plugin/db/mysql"+ _ "github.com/bytebase/bytebase/backend/plugin/db/mysql"// register pg driver.- _ "github.com/bytebase/bytebase/plugin/db/pg"+ _ "github.com/bytebase/bytebase/backend/plugin/db/pg"// install pg driver.)diff --git a/bin/bb/cmd/var.go b/backend/bin/bb/cmd/var.gosimilarity index 100%rename from bin/bb/cmd/var.gorename to backend/bin/bb/cmd/var.godiff --git a/bin/bb/cmd/version.go b/backend/bin/bb/cmd/version.gosimilarity index 100%rename from bin/bb/cmd/version.gorename to backend/bin/bb/cmd/version.godiff --git a/bin/bb/main.go b/backend/bin/bb/main.gosimilarity index 56%rename from bin/bb/main.gorename to backend/bin/bb/main.goindex 058cb46465..7d8445274f 100644--- a/bin/bb/main.go+++ b/backend/bin/bb/main.go@@ -4,12 +4,12 @@ package mainimport ("os"- "github.com/bytebase/bytebase/bin/bb/cmd"+ "github.com/bytebase/bytebase/backend/bin/bb/cmd"// Register mysql driver.- _ "github.com/bytebase/bytebase/plugin/db/mysql"+ _ "github.com/bytebase/bytebase/backend/plugin/db/mysql"// Register postgres driver.- _ "github.com/bytebase/bytebase/plugin/db/pg"+ _ "github.com/bytebase/bytebase/backend/plugin/db/pg")func main() {diff --git a/bin/server/cmd/profile.go b/backend/bin/server/cmd/profile.gosimilarity index 84%rename from bin/server/cmd/profile.gorename to backend/bin/server/cmd/profile.goindex 8822a1eabb..3cc9ab7eae 100644--- a/bin/server/cmd/profile.go+++ b/backend/bin/server/cmd/profile.go@@ -3,10 +3,10 @@ package cmdimport ("fmt"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/app/feishu"- "github.com/bytebase/bytebase/server/component/config"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/app/feishu"+ "github.com/bytebase/bytebase/backend/server/component/config")func getBaseProfile() config.Profile {diff --git a/bin/server/cmd/profile_dev.go b/backend/bin/server/cmd/profile_dev.gosimilarity index 77%rename from bin/server/cmd/profile_dev.gorename to backend/bin/server/cmd/profile_dev.goindex 07f1d34613..f9f27d2804 100644--- a/bin/server/cmd/profile_dev.go+++ b/backend/bin/server/cmd/profile_dev.go@@ -6,8 +6,8 @@ package cmdimport ("time"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/server/component/config"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/server/component/config")func activeProfile(dataDir string) config.Profile {diff --git a/bin/server/cmd/profile_release.go b/backend/bin/server/cmd/profile_release.gosimilarity index 77%rename from bin/server/cmd/profile_release.gorename to backend/bin/server/cmd/profile_release.goindex aaa607a6a6..65b92589cf 100644--- a/bin/server/cmd/profile_release.go+++ b/backend/bin/server/cmd/profile_release.go@@ -6,8 +6,8 @@ package cmdimport ("time"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/server/component/config"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/server/component/config")func activeProfile(dataDir string) config.Profile {diff --git a/bin/server/cmd/root.go b/backend/bin/server/cmd/root.gosimilarity index 98%rename from bin/server/cmd/root.gorename to backend/bin/server/cmd/root.goindex 573f224c7c..a60bd6b388 100644--- a/bin/server/cmd/root.go+++ b/backend/bin/server/cmd/root.go@@ -17,9 +17,9 @@ import ("github.com/spf13/cobra""go.uber.org/zap"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/server"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/server")// -----------------------------------Global constant BEGIN----------------------------------------.diff --git a/bin/server/cmd/root_test.go b/backend/bin/server/cmd/root_test.gosimilarity index 100%rename from bin/server/cmd/root_test.gorename to backend/bin/server/cmd/root_test.godiff --git a/bin/server/cmd/version.go b/backend/bin/server/cmd/version.gosimilarity index 100%rename from bin/server/cmd/version.gorename to backend/bin/server/cmd/version.godiff --git a/bin/server/main.go b/backend/bin/server/main.gosimilarity index 74%rename from bin/server/main.gorename to backend/bin/server/main.goindex 04dd5eb3f0..6e7afc8463 100644--- a/bin/server/main.go+++ b/backend/bin/server/main.go@@ -4,7 +4,7 @@ package mainimport ("os"- "github.com/bytebase/bytebase/bin/server/cmd"+ "github.com/bytebase/bytebase/backend/bin/server/cmd")func main() {diff --git a/bin/sql-service/README.md b/backend/bin/sql-service/README.mdsimilarity index 100%rename from bin/sql-service/README.mdrename to backend/bin/sql-service/README.mddiff --git a/bin/sql-service/cmd/profile_dev.go b/backend/bin/sql-service/cmd/profile_dev.gosimilarity index 79%rename from bin/sql-service/cmd/profile_dev.gorename to backend/bin/sql-service/cmd/profile_dev.goindex 817fbcf382..a3c33b319b 100644--- a/bin/sql-service/cmd/profile_dev.go+++ b/backend/bin/sql-service/cmd/profile_dev.go@@ -4,8 +4,8 @@package cmdimport (- "github.com/bytebase/bytebase/common"- server "github.com/bytebase/bytebase/sql-server"+ "github.com/bytebase/bytebase/backend/common"+ server "github.com/bytebase/bytebase/backend/sql-server")func activeProfile() server.Profile {diff --git a/bin/sql-service/cmd/profile_release.go b/backend/bin/sql-service/cmd/profile_release.gosimilarity index 81%rename from bin/sql-service/cmd/profile_release.gorename to backend/bin/sql-service/cmd/profile_release.goindex dc38c30b31..6674fb5164 100644--- a/bin/sql-service/cmd/profile_release.go+++ b/backend/bin/sql-service/cmd/profile_release.go@@ -4,8 +4,8 @@package cmdimport (- "github.com/bytebase/bytebase/common"- server "github.com/bytebase/bytebase/sql-server"+ "github.com/bytebase/bytebase/backend/common"+ server "github.com/bytebase/bytebase/backend/sql-server")func activeProfile() server.Profile {diff --git a/bin/sql-service/cmd/root.go b/backend/bin/sql-service/cmd/root.gosimilarity index 93%rename from bin/sql-service/cmd/root.gorename to backend/bin/sql-service/cmd/root.goindex 0ca139c033..6acab916b4 100644--- a/bin/sql-service/cmd/root.go+++ b/backend/bin/sql-service/cmd/root.go@@ -12,21 +12,21 @@ import ("github.com/spf13/cobra""go.uber.org/zap"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- server "github.com/bytebase/bytebase/sql-server"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ server "github.com/bytebase/bytebase/backend/sql-server"// Register pingcap parser driver._ "github.com/pingcap/tidb/types/parser_driver"// Register fake advisor.- _ "github.com/bytebase/bytebase/plugin/advisor/fake"+ _ "github.com/bytebase/bytebase/backend/plugin/advisor/fake"// Register mysql advisor.- _ "github.com/bytebase/bytebase/plugin/advisor/mysql"+ _ "github.com/bytebase/bytebase/backend/plugin/advisor/mysql"// Register postgresql advisor.- _ "github.com/bytebase/bytebase/plugin/advisor/pg"+ _ "github.com/bytebase/bytebase/backend/plugin/advisor/pg"// Register postgres parser driver.- _ "github.com/bytebase/bytebase/plugin/parser/engine/pg"+ _ "github.com/bytebase/bytebase/backend/plugin/parser/engine/pg")// -----------------------------------Global constant BEGIN----------------------------------------.diff --git a/bin/sql-service/cmd/version.go b/backend/bin/sql-service/cmd/version.gosimilarity index 100%rename from bin/sql-service/cmd/version.gorename to backend/bin/sql-service/cmd/version.godiff --git a/bin/sql-service/main.go b/backend/bin/sql-service/main.gosimilarity index 73%rename from bin/sql-service/main.gorename to backend/bin/sql-service/main.goindex 74b6ad8f98..16e8488838 100644--- a/bin/sql-service/main.go+++ b/backend/bin/sql-service/main.go@@ -4,7 +4,7 @@ package mainimport ("os"- "github.com/bytebase/bytebase/bin/sql-service/cmd"+ "github.com/bytebase/bytebase/backend/bin/sql-service/cmd")func main() {diff --git a/common/config.go b/backend/common/config.gosimilarity index 100%rename from common/config.gorename to backend/common/config.godiff --git a/common/context.go b/backend/common/context.gosimilarity index 100%rename from common/context.gorename to backend/common/context.godiff --git a/common/counting_reader.go b/backend/common/counting_reader.gosimilarity index 100%rename from common/counting_reader.gorename to backend/common/counting_reader.godiff --git a/common/docs.go b/backend/common/docs.gosimilarity index 100%rename from common/docs.gorename to backend/common/docs.godiff --git a/common/error.go b/backend/common/error.gosimilarity index 100%rename from common/error.gorename to backend/common/error.godiff --git a/common/feature_flag.go b/backend/common/feature_flag.gosimilarity index 100%rename from common/feature_flag.gorename to backend/common/feature_flag.godiff --git a/common/feature_flag_dev.go b/backend/common/feature_flag_dev.gosimilarity index 100%rename from common/feature_flag_dev.gorename to backend/common/feature_flag_dev.godiff --git a/common/feature_flag_prod.go b/backend/common/feature_flag_prod.gosimilarity index 100%rename from common/feature_flag_prod.gorename to backend/common/feature_flag_prod.godiff --git a/common/log/logger.go b/backend/common/log/logger.gosimilarity index 100%rename from common/log/logger.gorename to backend/common/log/logger.godiff --git a/common/mock.go b/backend/common/mock.gosimilarity index 100%rename from common/mock.gorename to backend/common/mock.godiff --git a/common/oauth.go b/backend/common/oauth.gosimilarity index 100%rename from common/oauth.gorename to backend/common/oauth.godiff --git a/common/role.go b/backend/common/role.gosimilarity index 100%rename from common/role.gorename to backend/common/role.godiff --git a/common/util.go b/backend/common/util.gosimilarity index 100%rename from common/util.gorename to backend/common/util.godiff --git a/common/util_test.go b/backend/common/util_test.gosimilarity index 100%rename from common/util_test.gorename to backend/common/util_test.godiff --git a/enterprise/README.md b/backend/enterprise/README.mdsimilarity index 100%rename from enterprise/README.mdrename to backend/enterprise/README.mddiff --git a/enterprise/api/license.go b/backend/enterprise/api/license.gosimilarity index 97%rename from enterprise/api/license.gorename to backend/enterprise/api/license.goindex e6d73d1c58..d706f5fa3c 100644--- a/enterprise/api/license.go+++ b/backend/enterprise/api/license.go@@ -8,7 +8,7 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")// validPlans is a string array of valid plan types.diff --git a/enterprise/api/subscription.go b/backend/enterprise/api/subscription.gosimilarity index 93%rename from enterprise/api/subscription.gorename to backend/enterprise/api/subscription.goindex 2be5e585f9..0199fe6f57 100644--- a/enterprise/api/subscription.go+++ b/backend/enterprise/api/subscription.go@@ -1,6 +1,6 @@package api-import "github.com/bytebase/bytebase/api"+import "github.com/bytebase/bytebase/backend/api"// SubscriptionPatch is the API message for update the subscription.type SubscriptionPatch struct {diff --git a/enterprise/config/config.go b/backend/enterprise/config/config.gosimilarity index 96%rename from enterprise/config/config.gorename to backend/enterprise/config/config.goindex 3dfdf790da..5e5c83f15b 100644--- a/enterprise/config/config.go+++ b/backend/enterprise/config/config.go@@ -8,7 +8,7 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/common")//go:embed keysdiff --git a/enterprise/config/keys/README.md b/backend/enterprise/config/keys/README.mdsimilarity index 100%rename from enterprise/config/keys/README.mdrename to backend/enterprise/config/keys/README.mddiff --git a/enterprise/config/keys/dev.pub.pem b/backend/enterprise/config/keys/dev.pub.pemsimilarity index 100%rename from enterprise/config/keys/dev.pub.pemrename to backend/enterprise/config/keys/dev.pub.pemdiff --git a/enterprise/config/keys/prod.pub.pem b/backend/enterprise/config/keys/prod.pub.pemsimilarity index 100%rename from enterprise/config/keys/prod.pub.pemrename to backend/enterprise/config/keys/prod.pub.pemdiff --git a/enterprise/service/license.go b/backend/enterprise/service/license.gosimilarity index 96%rename from enterprise/service/license.gorename to backend/enterprise/service/license.goindex 0bb4696f2c..37e024affd 100644--- a/enterprise/service/license.go+++ b/backend/enterprise/service/license.go@@ -10,12 +10,12 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- enterpriseAPI "github.com/bytebase/bytebase/enterprise/api"- "github.com/bytebase/bytebase/enterprise/config"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ enterpriseAPI "github.com/bytebase/bytebase/backend/enterprise/api"+ "github.com/bytebase/bytebase/backend/enterprise/config"+ "github.com/bytebase/bytebase/backend/store")// LicenseService is the service for enterprise license.diff --git a/metric/collector/database_count.go b/backend/metric/collector/database_count.gosimilarity index 89%rename from metric/collector/database_count.gorename to backend/metric/collector/database_count.goindex 37ae353188..5b39004271 100644--- a/metric/collector/database_count.go+++ b/backend/metric/collector/database_count.go@@ -4,9 +4,9 @@ import ("context""strconv"- metricAPI "github.com/bytebase/bytebase/metric"- "github.com/bytebase/bytebase/plugin/metric"- "github.com/bytebase/bytebase/store"+ metricAPI "github.com/bytebase/bytebase/backend/metric"+ "github.com/bytebase/bytebase/backend/plugin/metric"+ "github.com/bytebase/bytebase/backend/store")var _ metric.Collector = (*databaseCountCollector)(nil)diff --git a/metric/collector/docs.go b/backend/metric/collector/docs.gosimilarity index 100%rename from metric/collector/docs.gorename to backend/metric/collector/docs.godiff --git a/metric/collector/instance_count.go b/backend/metric/collector/instance_count.gosimilarity index 86%rename from metric/collector/instance_count.gorename to backend/metric/collector/instance_count.goindex 9818b76ec6..0c3f2df33b 100644--- a/metric/collector/instance_count.go+++ b/backend/metric/collector/instance_count.go@@ -5,10 +5,10 @@ import ("go.uber.org/zap"- "github.com/bytebase/bytebase/common/log"- metricAPI "github.com/bytebase/bytebase/metric"- "github.com/bytebase/bytebase/plugin/metric"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/common/log"+ metricAPI "github.com/bytebase/bytebase/backend/metric"+ "github.com/bytebase/bytebase/backend/plugin/metric"+ "github.com/bytebase/bytebase/backend/store")var _ metric.Collector = (*instanceCountCollector)(nil)diff --git a/metric/collector/issue_count.go b/backend/metric/collector/issue_count.gosimilarity index 86%rename from metric/collector/issue_count.gorename to backend/metric/collector/issue_count.goindex 7403f81d1a..29f30d6822 100644--- a/metric/collector/issue_count.go+++ b/backend/metric/collector/issue_count.go@@ -3,9 +3,9 @@ package collectorimport ("context"- metricAPI "github.com/bytebase/bytebase/metric"- "github.com/bytebase/bytebase/plugin/metric"- "github.com/bytebase/bytebase/store"+ metricAPI "github.com/bytebase/bytebase/backend/metric"+ "github.com/bytebase/bytebase/backend/plugin/metric"+ "github.com/bytebase/bytebase/backend/store")var _ metric.Collector = (*issueCountCollector)(nil)diff --git a/metric/collector/member_count.go b/backend/metric/collector/member_count.gosimilarity index 87%rename from metric/collector/member_count.gorename to backend/metric/collector/member_count.goindex 733d351879..3f4e222dd0 100644--- a/metric/collector/member_count.go+++ b/backend/metric/collector/member_count.go@@ -3,9 +3,9 @@ package collectorimport ("context"- metricAPI "github.com/bytebase/bytebase/metric"- "github.com/bytebase/bytebase/plugin/metric"- "github.com/bytebase/bytebase/store"+ metricAPI "github.com/bytebase/bytebase/backend/metric"+ "github.com/bytebase/bytebase/backend/plugin/metric"+ "github.com/bytebase/bytebase/backend/store")var _ metric.Collector = (*memberCountCollector)(nil)diff --git a/metric/collector/policy_count.go b/backend/metric/collector/policy_count.gosimilarity index 91%rename from metric/collector/policy_count.gorename to backend/metric/collector/policy_count.goindex 1cb3f33316..3ee6d741f5 100644--- a/metric/collector/policy_count.go+++ b/backend/metric/collector/policy_count.go@@ -4,10 +4,10 @@ import ("context""fmt"- "github.com/bytebase/bytebase/api"- metricAPI "github.com/bytebase/bytebase/metric"- "github.com/bytebase/bytebase/plugin/metric"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ metricAPI "github.com/bytebase/bytebase/backend/metric"+ "github.com/bytebase/bytebase/backend/plugin/metric"+ "github.com/bytebase/bytebase/backend/store")var _ metric.Collector = (*policyCountCollector)(nil)diff --git a/metric/collector/project_count.go b/backend/metric/collector/project_count.gosimilarity index 87%rename from metric/collector/project_count.gorename to backend/metric/collector/project_count.goindex c1de0e69b3..aaf8f71160 100644--- a/metric/collector/project_count.go+++ b/backend/metric/collector/project_count.go@@ -3,9 +3,9 @@ package collectorimport ("context"- metricAPI "github.com/bytebase/bytebase/metric"- "github.com/bytebase/bytebase/plugin/metric"- "github.com/bytebase/bytebase/store"+ metricAPI "github.com/bytebase/bytebase/backend/metric"+ "github.com/bytebase/bytebase/backend/plugin/metric"+ "github.com/bytebase/bytebase/backend/store")var _ metric.Collector = (*projectCountCollector)(nil)diff --git a/metric/collector/sheet_count.go b/backend/metric/collector/sheet_count.gosimilarity index 87%rename from metric/collector/sheet_count.gorename to backend/metric/collector/sheet_count.goindex e5416341e6..fd1260dacb 100644--- a/metric/collector/sheet_count.go+++ b/backend/metric/collector/sheet_count.go@@ -3,9 +3,9 @@ package collectorimport ("context"- metricAPI "github.com/bytebase/bytebase/metric"- "github.com/bytebase/bytebase/plugin/metric"- "github.com/bytebase/bytebase/store"+ metricAPI "github.com/bytebase/bytebase/backend/metric"+ "github.com/bytebase/bytebase/backend/plugin/metric"+ "github.com/bytebase/bytebase/backend/store")var _ metric.Collector = (*sheetCountCollector)(nil)diff --git a/metric/collector/task_count.go b/backend/metric/collector/task_count.gosimilarity index 86%rename from metric/collector/task_count.gorename to backend/metric/collector/task_count.goindex 68fe4d7463..66cc4f2000 100644--- a/metric/collector/task_count.go+++ b/backend/metric/collector/task_count.go@@ -3,9 +3,9 @@ package collectorimport ("context"- metricAPI "github.com/bytebase/bytebase/metric"- "github.com/bytebase/bytebase/plugin/metric"- "github.com/bytebase/bytebase/store"+ metricAPI "github.com/bytebase/bytebase/backend/metric"+ "github.com/bytebase/bytebase/backend/plugin/metric"+ "github.com/bytebase/bytebase/backend/store")var _ metric.Collector = (*taskCountCollector)(nil)diff --git a/metric/metric.go b/backend/metric/metric.gosimilarity index 95%rename from metric/metric.gorename to backend/metric/metric.goindex c5f6614042..dd4bdc386c 100644--- a/metric/metric.go+++ b/backend/metric/metric.go@@ -2,9 +2,9 @@package metricimport (- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/metric"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/metric")const (diff --git a/plugin/CODENOTIFY b/backend/plugin/CODENOTIFYsimilarity index 100%rename from plugin/CODENOTIFYrename to backend/plugin/CODENOTIFYdiff --git a/plugin/advisor/advisor.go b/backend/plugin/advisor/advisor.gosimilarity index 99%rename from plugin/advisor/advisor.gorename to backend/plugin/advisor/advisor.goindex e7d1b874ac..20bc4c125a 100644--- a/plugin/advisor/advisor.go+++ b/backend/plugin/advisor/advisor.go@@ -11,8 +11,8 @@ import ("github.com/pkg/errors""go.uber.org/zap/zapcore"- "github.com/bytebase/bytebase/plugin/advisor/catalog"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor/catalog"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")// Status is the advisor result status.diff --git a/plugin/advisor/catalog/catalog.go b/backend/plugin/advisor/catalog/catalog.gosimilarity index 100%rename from plugin/advisor/catalog/catalog.gorename to backend/plugin/advisor/catalog/catalog.godiff --git a/plugin/advisor/catalog/finder.go b/backend/plugin/advisor/catalog/finder.gosimilarity index 97%rename from plugin/advisor/catalog/finder.gorename to backend/plugin/advisor/catalog/finder.goindex 212569c101..31e9618bb9 100644--- a/plugin/advisor/catalog/finder.go+++ b/backend/plugin/advisor/catalog/finder.go@@ -1,7 +1,7 @@package catalogimport (- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"storepb "github.com/bytebase/bytebase/proto/generated-go/store")diff --git a/plugin/advisor/catalog/state.go b/backend/plugin/advisor/catalog/state.gosimilarity index 99%rename from plugin/advisor/catalog/state.gorename to backend/plugin/advisor/catalog/state.goindex 5f8dda89c9..e7620059dd 100644--- a/plugin/advisor/catalog/state.go+++ b/backend/plugin/advisor/catalog/state.go@@ -7,7 +7,7 @@ package catalogimport ("strings"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"storepb "github.com/bytebase/bytebase/proto/generated-go/store")diff --git a/plugin/advisor/catalog/test/mysql_walk_through.yaml b/backend/plugin/advisor/catalog/test/mysql_walk_through.yamlsimilarity index 100%rename from plugin/advisor/catalog/test/mysql_walk_through.yamlrename to backend/plugin/advisor/catalog/test/mysql_walk_through.yamldiff --git a/plugin/advisor/catalog/test/mysql_walk_through_for_incomplete.yaml b/backend/plugin/advisor/catalog/test/mysql_walk_through_for_incomplete.yamlsimilarity index 100%rename from plugin/advisor/catalog/test/mysql_walk_through_for_incomplete.yamlrename to backend/plugin/advisor/catalog/test/mysql_walk_through_for_incomplete.yamldiff --git a/plugin/advisor/catalog/test/pg_walk_through.yaml b/backend/plugin/advisor/catalog/test/pg_walk_through.yamlsimilarity index 100%rename from plugin/advisor/catalog/test/pg_walk_through.yamlrename to backend/plugin/advisor/catalog/test/pg_walk_through.yamldiff --git a/plugin/advisor/catalog/walk_through.go b/backend/plugin/advisor/catalog/walk_through.gosimilarity index 99%rename from plugin/advisor/catalog/walk_through.gorename to backend/plugin/advisor/catalog/walk_through.goindex 620a6f9f55..fa5dcd7ffa 100644--- a/plugin/advisor/catalog/walk_through.go+++ b/backend/plugin/advisor/catalog/walk_through.go@@ -4,8 +4,8 @@ import ("fmt""strings"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser"tidbparser "github.com/pingcap/tidb/parser"tidbast "github.com/pingcap/tidb/parser/ast"diff --git a/plugin/advisor/catalog/walk_through_for_pg.go b/backend/plugin/advisor/catalog/walk_through_for_pg.gosimilarity index 99%rename from plugin/advisor/catalog/walk_through_for_pg.gorename to backend/plugin/advisor/catalog/walk_through_for_pg.goindex 27fbd9a342..c9fe851a22 100644--- a/plugin/advisor/catalog/walk_through_for_pg.go+++ b/backend/plugin/advisor/catalog/walk_through_for_pg.go@@ -4,8 +4,8 @@ import ("fmt""strings"- "github.com/bytebase/bytebase/plugin/parser"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/parser"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")const (diff --git a/plugin/advisor/catalog/walk_through_test.go b/backend/plugin/advisor/catalog/walk_through_test.gosimilarity index 98%rename from plugin/advisor/catalog/walk_through_test.gorename to backend/plugin/advisor/catalog/walk_through_test.goindex 0e5d517009..246986a388 100644--- a/plugin/advisor/catalog/walk_through_test.go+++ b/backend/plugin/advisor/catalog/walk_through_test.go@@ -11,14 +11,14 @@ import ("google.golang.org/protobuf/types/known/wrapperspb""gopkg.in/yaml.v3"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"storepb "github.com/bytebase/bytebase/proto/generated-go/store"// Register pingcap parser driver._ "github.com/pingcap/tidb/types/parser_driver"// Register postgresql parser driver.- _ "github.com/bytebase/bytebase/plugin/parser/engine/pg"+ _ "github.com/bytebase/bytebase/backend/plugin/parser/engine/pg")type testData struct {diff --git a/plugin/advisor/code.go b/backend/plugin/advisor/code.gosimilarity index 100%rename from plugin/advisor/code.gorename to backend/plugin/advisor/code.godiff --git a/plugin/advisor/config.go b/backend/plugin/advisor/config.gosimilarity index 100%rename from plugin/advisor/config.gorename to backend/plugin/advisor/config.godiff --git a/plugin/advisor/config/sql-review.dev.yaml b/backend/plugin/advisor/config/sql-review.dev.yamlsimilarity index 100%rename from plugin/advisor/config/sql-review.dev.yamlrename to backend/plugin/advisor/config/sql-review.dev.yamldiff --git a/plugin/advisor/config/sql-review.override.yaml b/backend/plugin/advisor/config/sql-review.override.yamlsimilarity index 100%rename from plugin/advisor/config/sql-review.override.yamlrename to backend/plugin/advisor/config/sql-review.override.yamldiff --git a/plugin/advisor/config/sql-review.prod.yaml b/backend/plugin/advisor/config/sql-review.prod.yamlsimilarity index 100%rename from plugin/advisor/config/sql-review.prod.yamlrename to backend/plugin/advisor/config/sql-review.prod.yamldiff --git a/plugin/advisor/config_test.go b/backend/plugin/advisor/config_test.gosimilarity index 100%rename from plugin/advisor/config_test.gorename to backend/plugin/advisor/config_test.godiff --git a/plugin/advisor/db/db.go b/backend/plugin/advisor/db/db.gosimilarity index 100%rename from plugin/advisor/db/db.gorename to backend/plugin/advisor/db/db.godiff --git a/plugin/advisor/fake/fake_advisor.go b/backend/plugin/advisor/fake/fake_advisor.gosimilarity index 88%rename from plugin/advisor/fake/fake_advisor.gorename to backend/plugin/advisor/fake/fake_advisor.goindex cd5434d300..cf4115213f 100644--- a/plugin/advisor/fake/fake_advisor.go+++ b/backend/plugin/advisor/fake/fake_advisor.go@@ -2,8 +2,8 @@package fakeimport (- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/generator/README.md b/backend/plugin/advisor/generator/README.mdsimilarity index 100%rename from plugin/advisor/generator/README.mdrename to backend/plugin/advisor/generator/README.mddiff --git a/plugin/advisor/generator/main.go b/backend/plugin/advisor/generator/main.gosimilarity index 100%rename from plugin/advisor/generator/main.gorename to backend/plugin/advisor/generator/main.godiff --git a/plugin/advisor/generator/mysql.template b/backend/plugin/advisor/generator/mysql.templatesimilarity index 93%rename from plugin/advisor/generator/mysql.templaterename to backend/plugin/advisor/generator/mysql.templateindex 822cc40af6..5c8e724c4c 100644--- a/plugin/advisor/generator/mysql.template+++ b/backend/plugin/advisor/generator/mysql.template@@ -3,8 +3,8 @@ package mysql// Framework code is generated by the generator.import (- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db""github.com/pingcap/tidb/parser/ast")diff --git a/plugin/advisor/generator/postgresql.template b/backend/plugin/advisor/generator/postgresql.templatesimilarity index 88%rename from plugin/advisor/generator/postgresql.templaterename to backend/plugin/advisor/generator/postgresql.templateindex dcdb0b1c16..35893297ea 100644--- a/plugin/advisor/generator/postgresql.template+++ b/backend/plugin/advisor/generator/postgresql.template@@ -3,9 +3,9 @@ package pg// Framework code is generated by the generator.import (- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/mysql/advisor_charset_allowlist.go b/backend/plugin/advisor/mysql/advisor_charset_allowlist.gosimilarity index 97%rename from plugin/advisor/mysql/advisor_charset_allowlist.gorename to backend/plugin/advisor/mysql/advisor_charset_allowlist.goindex 0c560787a0..c8e325d067 100644--- a/plugin/advisor/mysql/advisor_charset_allowlist.go+++ b/backend/plugin/advisor/mysql/advisor_charset_allowlist.go@@ -8,8 +8,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_collation_allowlist.go b/backend/plugin/advisor/mysql/advisor_collation_allowlist.gosimilarity index 97%rename from plugin/advisor/mysql/advisor_collation_allowlist.gorename to backend/plugin/advisor/mysql/advisor_collation_allowlist.goindex dc51bc82ec..77b30e8043 100644--- a/plugin/advisor/mysql/advisor_collation_allowlist.go+++ b/backend/plugin/advisor/mysql/advisor_collation_allowlist.go@@ -8,8 +8,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_colum_require_default.go b/backend/plugin/advisor/mysql/advisor_colum_require_default.gosimilarity index 97%rename from plugin/advisor/mysql/advisor_colum_require_default.gorename to backend/plugin/advisor/mysql/advisor_colum_require_default.goindex 21022a9a8e..e47743756d 100644--- a/plugin/advisor/mysql/advisor_colum_require_default.go+++ b/backend/plugin/advisor/mysql/advisor_colum_require_default.go@@ -9,8 +9,8 @@ import ("github.com/pingcap/tidb/parser/mysql""github.com/pingcap/tidb/parser/types"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_column_auto_increment_initial_value.go b/backend/plugin/advisor/mysql/advisor_column_auto_increment_initial_value.gosimilarity index 96%rename from plugin/advisor/mysql/advisor_column_auto_increment_initial_value.gorename to backend/plugin/advisor/mysql/advisor_column_auto_increment_initial_value.goindex bce2392e0e..49d3308aa7 100644--- a/plugin/advisor/mysql/advisor_column_auto_increment_initial_value.go+++ b/backend/plugin/advisor/mysql/advisor_column_auto_increment_initial_value.go@@ -7,8 +7,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_column_auto_increment_must_integer.go b/backend/plugin/advisor/mysql/advisor_column_auto_increment_must_integer.gosimilarity index 97%rename from plugin/advisor/mysql/advisor_column_auto_increment_must_integer.gorename to backend/plugin/advisor/mysql/advisor_column_auto_increment_must_integer.goindex 563461adff..48dbdb6ca4 100644--- a/plugin/advisor/mysql/advisor_column_auto_increment_must_integer.go+++ b/backend/plugin/advisor/mysql/advisor_column_auto_increment_must_integer.go@@ -9,8 +9,8 @@ import ("github.com/pingcap/tidb/parser/mysql""github.com/pingcap/tidb/parser/types"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_column_auto_increment_must_unsigned.go b/backend/plugin/advisor/mysql/advisor_column_auto_increment_must_unsigned.gosimilarity index 97%rename from plugin/advisor/mysql/advisor_column_auto_increment_must_unsigned.gorename to backend/plugin/advisor/mysql/advisor_column_auto_increment_must_unsigned.goindex bbdb8f8144..9ac86ee5cc 100644--- a/plugin/advisor/mysql/advisor_column_auto_increment_must_unsigned.go+++ b/backend/plugin/advisor/mysql/advisor_column_auto_increment_must_unsigned.go@@ -8,8 +8,8 @@ import ("github.com/pingcap/tidb/parser/ast""github.com/pingcap/tidb/parser/mysql"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_column_comment_convention.go b/backend/plugin/advisor/mysql/advisor_column_comment_convention.gosimilarity index 97%rename from plugin/advisor/mysql/advisor_column_comment_convention.gorename to backend/plugin/advisor/mysql/advisor_column_comment_convention.goindex fa65e5bd3d..3dcff8482a 100644--- a/plugin/advisor/mysql/advisor_column_comment_convention.go+++ b/backend/plugin/advisor/mysql/advisor_column_comment_convention.go@@ -8,8 +8,8 @@ import ("github.com/pingcap/tidb/parser/ast""github.com/pingcap/tidb/parser/format"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_column_current_time_count_limit.go b/backend/plugin/advisor/mysql/advisor_column_current_time_count_limit.gosimilarity index 98%rename from plugin/advisor/mysql/advisor_column_current_time_count_limit.gorename to backend/plugin/advisor/mysql/advisor_column_current_time_count_limit.goindex 3fe0dae35d..c64f687366 100644--- a/plugin/advisor/mysql/advisor_column_current_time_count_limit.go+++ b/backend/plugin/advisor/mysql/advisor_column_current_time_count_limit.go@@ -10,8 +10,8 @@ import ("github.com/pingcap/tidb/parser/ast""github.com/pingcap/tidb/parser/mysql"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")const (diff --git a/plugin/advisor/mysql/advisor_column_disallow_changing.go b/backend/plugin/advisor/mysql/advisor_column_disallow_changing.gosimilarity index 95%rename from plugin/advisor/mysql/advisor_column_disallow_changing.gorename to backend/plugin/advisor/mysql/advisor_column_disallow_changing.goindex 404713edba..19c8a0639d 100644--- a/plugin/advisor/mysql/advisor_column_disallow_changing.go+++ b/backend/plugin/advisor/mysql/advisor_column_disallow_changing.go@@ -7,8 +7,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_column_disallow_changing_order.go b/backend/plugin/advisor/mysql/advisor_column_disallow_changing_order.gosimilarity index 95%rename from plugin/advisor/mysql/advisor_column_disallow_changing_order.gorename to backend/plugin/advisor/mysql/advisor_column_disallow_changing_order.goindex f4c4213f76..02e66067d5 100644--- a/plugin/advisor/mysql/advisor_column_disallow_changing_order.go+++ b/backend/plugin/advisor/mysql/advisor_column_disallow_changing_order.go@@ -7,8 +7,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_column_disallow_changing_type.go b/backend/plugin/advisor/mysql/advisor_column_disallow_changing_type.gosimilarity index 95%rename from plugin/advisor/mysql/advisor_column_disallow_changing_type.gorename to backend/plugin/advisor/mysql/advisor_column_disallow_changing_type.goindex cf76a0a3d1..87c360c3e4 100644--- a/plugin/advisor/mysql/advisor_column_disallow_changing_type.go+++ b/backend/plugin/advisor/mysql/advisor_column_disallow_changing_type.go@@ -8,9 +8,9 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/catalog"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/catalog"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_column_disallow_set_charset.go b/backend/plugin/advisor/mysql/advisor_column_disallow_set_charset.gosimilarity index 96%rename from plugin/advisor/mysql/advisor_column_disallow_set_charset.gorename to backend/plugin/advisor/mysql/advisor_column_disallow_set_charset.goindex 433d3fc80e..e1930909be 100644--- a/plugin/advisor/mysql/advisor_column_disallow_set_charset.go+++ b/backend/plugin/advisor/mysql/advisor_column_disallow_set_charset.go@@ -7,8 +7,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_column_maximum_character_length.go b/backend/plugin/advisor/mysql/advisor_column_maximum_character_length.gosimilarity index 97%rename from plugin/advisor/mysql/advisor_column_maximum_character_length.gorename to backend/plugin/advisor/mysql/advisor_column_maximum_character_length.goindex fe6cddcdcb..c20bb03bde 100644--- a/plugin/advisor/mysql/advisor_column_maximum_character_length.go+++ b/backend/plugin/advisor/mysql/advisor_column_maximum_character_length.go@@ -8,8 +8,8 @@ import ("github.com/pingcap/tidb/parser/ast""github.com/pingcap/tidb/parser/mysql"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_column_no_null.go b/backend/plugin/advisor/mysql/advisor_column_no_null.gosimilarity index 96%rename from plugin/advisor/mysql/advisor_column_no_null.gorename to backend/plugin/advisor/mysql/advisor_column_no_null.goindex fa6f957265..6f4dbb4058 100644--- a/plugin/advisor/mysql/advisor_column_no_null.go+++ b/backend/plugin/advisor/mysql/advisor_column_no_null.go@@ -6,9 +6,9 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/catalog"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/catalog"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_column_required.go b/backend/plugin/advisor/mysql/advisor_column_required.gosimilarity index 98%rename from plugin/advisor/mysql/advisor_column_required.gorename to backend/plugin/advisor/mysql/advisor_column_required.goindex c6ae234f40..95d7a6aa69 100644--- a/plugin/advisor/mysql/advisor_column_required.go+++ b/backend/plugin/advisor/mysql/advisor_column_required.go@@ -7,8 +7,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_column_set_default_for_not_null.go b/backend/plugin/advisor/mysql/advisor_column_set_default_for_not_null.gosimilarity index 97%rename from plugin/advisor/mysql/advisor_column_set_default_for_not_null.gorename to backend/plugin/advisor/mysql/advisor_column_set_default_for_not_null.goindex e5910634f9..7a8992447c 100644--- a/plugin/advisor/mysql/advisor_column_set_default_for_not_null.go+++ b/backend/plugin/advisor/mysql/advisor_column_set_default_for_not_null.go@@ -7,8 +7,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_column_type_restriction.go b/backend/plugin/advisor/mysql/advisor_column_type_restriction.gosimilarity index 97%rename from plugin/advisor/mysql/advisor_column_type_restriction.gorename to backend/plugin/advisor/mysql/advisor_column_type_restriction.goindex 56e205887f..c3a14d195b 100644--- a/plugin/advisor/mysql/advisor_column_type_restriction.go+++ b/backend/plugin/advisor/mysql/advisor_column_type_restriction.go@@ -8,8 +8,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_database_drop_empty_db.go b/backend/plugin/advisor/mysql/advisor_database_drop_empty_db.gosimilarity index 93%rename from plugin/advisor/mysql/advisor_database_drop_empty_db.gorename to backend/plugin/advisor/mysql/advisor_database_drop_empty_db.goindex 25dbd2e632..09048cabbd 100644--- a/plugin/advisor/mysql/advisor_database_drop_empty_db.go+++ b/backend/plugin/advisor/mysql/advisor_database_drop_empty_db.go@@ -5,9 +5,9 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/catalog"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/catalog"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_index_key_number_limit.go b/backend/plugin/advisor/mysql/advisor_index_key_number_limit.gosimilarity index 97%rename from plugin/advisor/mysql/advisor_index_key_number_limit.gorename to backend/plugin/advisor/mysql/advisor_index_key_number_limit.goindex c7de6c27aa..04de632436 100644--- a/plugin/advisor/mysql/advisor_index_key_number_limit.go+++ b/backend/plugin/advisor/mysql/advisor_index_key_number_limit.go@@ -7,8 +7,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_index_no_duplicate_column.go b/backend/plugin/advisor/mysql/advisor_index_no_duplicate_column.gosimilarity index 97%rename from plugin/advisor/mysql/advisor_index_no_duplicate_column.gorename to backend/plugin/advisor/mysql/advisor_index_no_duplicate_column.goindex 2671756f3a..ff91ceef7f 100644--- a/plugin/advisor/mysql/advisor_index_no_duplicate_column.go+++ b/backend/plugin/advisor/mysql/advisor_index_no_duplicate_column.go@@ -7,8 +7,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_index_pk_type.go b/backend/plugin/advisor/mysql/advisor_index_pk_type.gosimilarity index 97%rename from plugin/advisor/mysql/advisor_index_pk_type.gorename to backend/plugin/advisor/mysql/advisor_index_pk_type.goindex 6d4dca5144..e63ca3d5a7 100644--- a/plugin/advisor/mysql/advisor_index_pk_type.go+++ b/backend/plugin/advisor/mysql/advisor_index_pk_type.go@@ -10,9 +10,9 @@ import ("github.com/pingcap/tidb/parser/types""github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/catalog"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/catalog"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_index_total_number_limit.go b/backend/plugin/advisor/mysql/advisor_index_total_number_limit.gosimilarity index 96%rename from plugin/advisor/mysql/advisor_index_total_number_limit.gorename to backend/plugin/advisor/mysql/advisor_index_total_number_limit.goindex 0c7aa97f93..c3208cef06 100644--- a/plugin/advisor/mysql/advisor_index_total_number_limit.go+++ b/backend/plugin/advisor/mysql/advisor_index_total_number_limit.go@@ -8,9 +8,9 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/catalog"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/catalog"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_index_type_no_blob.go b/backend/plugin/advisor/mysql/advisor_index_type_no_blob.gosimilarity index 97%rename from plugin/advisor/mysql/advisor_index_type_no_blob.gorename to backend/plugin/advisor/mysql/advisor_index_type_no_blob.goindex 83c7ec0e16..6d8f9f5f8c 100644--- a/plugin/advisor/mysql/advisor_index_type_no_blob.go+++ b/backend/plugin/advisor/mysql/advisor_index_type_no_blob.go@@ -11,9 +11,9 @@ import ("github.com/pingcap/tidb/parser/types""github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/catalog"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/catalog"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_insert_disallow_order_by_rand.go b/backend/plugin/advisor/mysql/advisor_insert_disallow_order_by_rand.gosimilarity index 95%rename from plugin/advisor/mysql/advisor_insert_disallow_order_by_rand.gorename to backend/plugin/advisor/mysql/advisor_insert_disallow_order_by_rand.goindex 8379a60e47..8a035b831a 100644--- a/plugin/advisor/mysql/advisor_insert_disallow_order_by_rand.go+++ b/backend/plugin/advisor/mysql/advisor_insert_disallow_order_by_rand.go@@ -7,8 +7,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_insert_must_specify_column.go b/backend/plugin/advisor/mysql/advisor_insert_must_specify_column.gosimilarity index 95%rename from plugin/advisor/mysql/advisor_insert_must_specify_column.gorename to backend/plugin/advisor/mysql/advisor_insert_must_specify_column.goindex a7ce7ce928..666a61922a 100644--- a/plugin/advisor/mysql/advisor_insert_must_specify_column.go+++ b/backend/plugin/advisor/mysql/advisor_insert_must_specify_column.go@@ -7,8 +7,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_insert_row_limit.go b/backend/plugin/advisor/mysql/advisor_insert_row_limit.gosimilarity index 98%rename from plugin/advisor/mysql/advisor_insert_row_limit.gorename to backend/plugin/advisor/mysql/advisor_insert_row_limit.goindex c32b945f29..80fa8b2db7 100644--- a/plugin/advisor/mysql/advisor_insert_row_limit.go+++ b/backend/plugin/advisor/mysql/advisor_insert_row_limit.go@@ -11,8 +11,8 @@ import ("github.com/pingcap/tidb/parser/ast""github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_migration_compatibility.go b/backend/plugin/advisor/mysql/advisor_migration_compatibility.gosimilarity index 97%rename from plugin/advisor/mysql/advisor_migration_compatibility.gorename to backend/plugin/advisor/mysql/advisor_migration_compatibility.goindex f0274fa6bf..89def71e3e 100644--- a/plugin/advisor/mysql/advisor_migration_compatibility.go+++ b/backend/plugin/advisor/mysql/advisor_migration_compatibility.go@@ -3,8 +3,8 @@ package mysqlimport ("fmt"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db""github.com/pingcap/tidb/parser/ast")diff --git a/plugin/advisor/mysql/advisor_naming_auto_increment_column.go b/backend/plugin/advisor/mysql/advisor_naming_auto_increment_column.gosimilarity index 97%rename from plugin/advisor/mysql/advisor_naming_auto_increment_column.gorename to backend/plugin/advisor/mysql/advisor_naming_auto_increment_column.goindex 6076efeaab..5741944f6b 100644--- a/plugin/advisor/mysql/advisor_naming_auto_increment_column.go+++ b/backend/plugin/advisor/mysql/advisor_naming_auto_increment_column.go@@ -8,8 +8,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_naming_column.go b/backend/plugin/advisor/mysql/advisor_naming_column.gosimilarity index 97%rename from plugin/advisor/mysql/advisor_naming_column.gorename to backend/plugin/advisor/mysql/advisor_naming_column.goindex de98190bb4..656d0fc125 100644--- a/plugin/advisor/mysql/advisor_naming_column.go+++ b/backend/plugin/advisor/mysql/advisor_naming_column.go@@ -6,8 +6,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_naming_foreign_key_convention.go b/backend/plugin/advisor/mysql/advisor_naming_foreign_key_convention.gosimilarity index 98%rename from plugin/advisor/mysql/advisor_naming_foreign_key_convention.gorename to backend/plugin/advisor/mysql/advisor_naming_foreign_key_convention.goindex db531aab22..a84628891f 100644--- a/plugin/advisor/mysql/advisor_naming_foreign_key_convention.go+++ b/backend/plugin/advisor/mysql/advisor_naming_foreign_key_convention.go@@ -6,8 +6,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_naming_index_convention.go b/backend/plugin/advisor/mysql/advisor_naming_index_convention.gosimilarity index 97%rename from plugin/advisor/mysql/advisor_naming_index_convention.gorename to backend/plugin/advisor/mysql/advisor_naming_index_convention.goindex 8d65596c45..a3c76e7c69 100644--- a/plugin/advisor/mysql/advisor_naming_index_convention.go+++ b/backend/plugin/advisor/mysql/advisor_naming_index_convention.go@@ -7,9 +7,9 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/catalog"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/catalog"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_naming_table.go b/backend/plugin/advisor/mysql/advisor_naming_table.gosimilarity index 96%rename from plugin/advisor/mysql/advisor_naming_table.gorename to backend/plugin/advisor/mysql/advisor_naming_table.goindex 2e852f0e2e..7be3425f26 100644--- a/plugin/advisor/mysql/advisor_naming_table.go+++ b/backend/plugin/advisor/mysql/advisor_naming_table.go@@ -6,8 +6,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_naming_unique_key_convention.go b/backend/plugin/advisor/mysql/advisor_naming_unique_key_convention.gosimilarity index 97%rename from plugin/advisor/mysql/advisor_naming_unique_key_convention.gorename to backend/plugin/advisor/mysql/advisor_naming_unique_key_convention.goindex 3a742671bb..272d4c978d 100644--- a/plugin/advisor/mysql/advisor_naming_unique_key_convention.go+++ b/backend/plugin/advisor/mysql/advisor_naming_unique_key_convention.go@@ -6,9 +6,9 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/catalog"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/catalog"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_statement_affected_row_limit.go b/backend/plugin/advisor/mysql/advisor_statement_affected_row_limit.gosimilarity index 97%rename from plugin/advisor/mysql/advisor_statement_affected_row_limit.gorename to backend/plugin/advisor/mysql/advisor_statement_affected_row_limit.goindex 94a3336918..acb028432c 100644--- a/plugin/advisor/mysql/advisor_statement_affected_row_limit.go+++ b/backend/plugin/advisor/mysql/advisor_statement_affected_row_limit.go@@ -11,8 +11,8 @@ import ("github.com/pingcap/tidb/parser/ast""github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_statement_dml_dry_run.go b/backend/plugin/advisor/mysql/advisor_statement_dml_dry_run.gosimilarity index 95%rename from plugin/advisor/mysql/advisor_statement_dml_dry_run.gorename to backend/plugin/advisor/mysql/advisor_statement_dml_dry_run.goindex 38bb8f33e6..158b4bdbd9 100644--- a/plugin/advisor/mysql/advisor_statement_dml_dry_run.go+++ b/backend/plugin/advisor/mysql/advisor_statement_dml_dry_run.go@@ -9,8 +9,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_statement_merge_alter_table.go b/backend/plugin/advisor/mysql/advisor_statement_merge_alter_table.gosimilarity index 96%rename from plugin/advisor/mysql/advisor_statement_merge_alter_table.gorename to backend/plugin/advisor/mysql/advisor_statement_merge_alter_table.goindex c69b788f3a..39bdd2b9f9 100644--- a/plugin/advisor/mysql/advisor_statement_merge_alter_table.go+++ b/backend/plugin/advisor/mysql/advisor_statement_merge_alter_table.go@@ -8,8 +8,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_stmt_disallow_commit.go b/backend/plugin/advisor/mysql/advisor_stmt_disallow_commit.gosimilarity index 95%rename from plugin/advisor/mysql/advisor_stmt_disallow_commit.gorename to backend/plugin/advisor/mysql/advisor_stmt_disallow_commit.goindex 44cf16bc85..9476156336 100644--- a/plugin/advisor/mysql/advisor_stmt_disallow_commit.go+++ b/backend/plugin/advisor/mysql/advisor_stmt_disallow_commit.go@@ -7,8 +7,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_stmt_disallow_limit.go b/backend/plugin/advisor/mysql/advisor_stmt_disallow_limit.gosimilarity index 95%rename from plugin/advisor/mysql/advisor_stmt_disallow_limit.gorename to backend/plugin/advisor/mysql/advisor_stmt_disallow_limit.goindex f043f01cb3..46ad4332b7 100644--- a/plugin/advisor/mysql/advisor_stmt_disallow_limit.go+++ b/backend/plugin/advisor/mysql/advisor_stmt_disallow_limit.go@@ -7,8 +7,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_stmt_disallow_order_by.go b/backend/plugin/advisor/mysql/advisor_stmt_disallow_order_by.gosimilarity index 95%rename from plugin/advisor/mysql/advisor_stmt_disallow_order_by.gorename to backend/plugin/advisor/mysql/advisor_stmt_disallow_order_by.goindex 35aa19fd39..75092cadf4 100644--- a/plugin/advisor/mysql/advisor_stmt_disallow_order_by.go+++ b/backend/plugin/advisor/mysql/advisor_stmt_disallow_order_by.go@@ -7,8 +7,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_stmt_no_leading_wildcard_like.go b/backend/plugin/advisor/mysql/advisor_stmt_no_leading_wildcard_like.gosimilarity index 96%rename from plugin/advisor/mysql/advisor_stmt_no_leading_wildcard_like.gorename to backend/plugin/advisor/mysql/advisor_stmt_no_leading_wildcard_like.goindex 2881ae9d8f..a8050213b2 100644--- a/plugin/advisor/mysql/advisor_stmt_no_leading_wildcard_like.go+++ b/backend/plugin/advisor/mysql/advisor_stmt_no_leading_wildcard_like.go@@ -6,8 +6,8 @@ import ("github.com/pingcap/tidb/parser/ast""github.com/pingcap/tidb/parser/format"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")const (diff --git a/plugin/advisor/mysql/advisor_stmt_no_select_all.go b/backend/plugin/advisor/mysql/advisor_stmt_no_select_all.gosimilarity index 94%rename from plugin/advisor/mysql/advisor_stmt_no_select_all.gorename to backend/plugin/advisor/mysql/advisor_stmt_no_select_all.goindex 65f9cf00df..67d5ca528c 100644--- a/plugin/advisor/mysql/advisor_stmt_no_select_all.go+++ b/backend/plugin/advisor/mysql/advisor_stmt_no_select_all.go@@ -5,8 +5,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_stmt_where_required.go b/backend/plugin/advisor/mysql/advisor_stmt_where_required.gosimilarity index 95%rename from plugin/advisor/mysql/advisor_stmt_where_required.gorename to backend/plugin/advisor/mysql/advisor_stmt_where_required.goindex fb0039e155..947be23d5f 100644--- a/plugin/advisor/mysql/advisor_stmt_where_required.go+++ b/backend/plugin/advisor/mysql/advisor_stmt_where_required.go@@ -3,8 +3,8 @@ package mysqlimport ("fmt"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db""github.com/pingcap/tidb/parser/ast")diff --git a/plugin/advisor/mysql/advisor_syntax.go b/backend/plugin/advisor/mysql/advisor_syntax.gosimilarity index 90%rename from plugin/advisor/mysql/advisor_syntax.gorename to backend/plugin/advisor/mysql/advisor_syntax.goindex f9b7860eb3..1a6d23d346 100644--- a/plugin/advisor/mysql/advisor_syntax.go+++ b/backend/plugin/advisor/mysql/advisor_syntax.go@@ -1,9 +1,9 @@package mysqlimport (- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser")var (diff --git a/plugin/advisor/mysql/advisor_table_comment_convention.go b/backend/plugin/advisor/mysql/advisor_table_comment_convention.gosimilarity index 96%rename from plugin/advisor/mysql/advisor_table_comment_convention.gorename to backend/plugin/advisor/mysql/advisor_table_comment_convention.goindex b8f2653b11..33d1cf95eb 100644--- a/plugin/advisor/mysql/advisor_table_comment_convention.go+++ b/backend/plugin/advisor/mysql/advisor_table_comment_convention.go@@ -7,8 +7,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_table_disallow_partition.go b/backend/plugin/advisor/mysql/advisor_table_disallow_partition.gosimilarity index 95%rename from plugin/advisor/mysql/advisor_table_disallow_partition.gorename to backend/plugin/advisor/mysql/advisor_table_disallow_partition.goindex 86b3aada3a..90cedceef5 100644--- a/plugin/advisor/mysql/advisor_table_disallow_partition.go+++ b/backend/plugin/advisor/mysql/advisor_table_disallow_partition.go@@ -7,8 +7,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_table_drop_naming_convention.go b/backend/plugin/advisor/mysql/advisor_table_drop_naming_convention.gosimilarity index 95%rename from plugin/advisor/mysql/advisor_table_drop_naming_convention.gorename to backend/plugin/advisor/mysql/advisor_table_drop_naming_convention.goindex e1d2187065..9f640aaa22 100644--- a/plugin/advisor/mysql/advisor_table_drop_naming_convention.go+++ b/backend/plugin/advisor/mysql/advisor_table_drop_naming_convention.go@@ -6,8 +6,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_table_no_fk.go b/backend/plugin/advisor/mysql/advisor_table_no_fk.gosimilarity index 95%rename from plugin/advisor/mysql/advisor_table_no_fk.gorename to backend/plugin/advisor/mysql/advisor_table_no_fk.goindex 186c719582..3b492af0aa 100644--- a/plugin/advisor/mysql/advisor_table_no_fk.go+++ b/backend/plugin/advisor/mysql/advisor_table_no_fk.go@@ -5,8 +5,8 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/mysql/advisor_table_require_pk.go b/backend/plugin/advisor/mysql/advisor_table_require_pk.gosimilarity index 96%rename from plugin/advisor/mysql/advisor_table_require_pk.gorename to backend/plugin/advisor/mysql/advisor_table_require_pk.goindex 8892197e26..31adc1117f 100644--- a/plugin/advisor/mysql/advisor_table_require_pk.go+++ b/backend/plugin/advisor/mysql/advisor_table_require_pk.go@@ -6,9 +6,9 @@ import ("github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/catalog"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/catalog"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")const (diff --git a/plugin/advisor/mysql/advisor_use_innodb.go b/backend/plugin/advisor/mysql/advisor_use_innodb.gosimilarity index 96%rename from plugin/advisor/mysql/advisor_use_innodb.gorename to backend/plugin/advisor/mysql/advisor_use_innodb.goindex f58dc1efa2..a4d3138ef2 100644--- a/plugin/advisor/mysql/advisor_use_innodb.go+++ b/backend/plugin/advisor/mysql/advisor_use_innodb.go@@ -7,8 +7,8 @@ import ("github.com/pingcap/tidb/parser/ast""github.com/pingcap/tidb/parser/format"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")const (diff --git a/plugin/advisor/mysql/mysql_rules_test.go b/backend/plugin/advisor/mysql/mysql_rules_test.gosimilarity index 98%rename from plugin/advisor/mysql/mysql_rules_test.gorename to backend/plugin/advisor/mysql/mysql_rules_test.goindex 7450f8cc1d..56c0dae770 100644--- a/plugin/advisor/mysql/mysql_rules_test.go+++ b/backend/plugin/advisor/mysql/mysql_rules_test.go@@ -3,8 +3,8 @@ package mysqlimport ("testing"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"// Register pingcap parser driver._ "github.com/pingcap/tidb/types/parser_driver"diff --git a/plugin/advisor/mysql/parser.go b/backend/plugin/advisor/mysql/parser.gosimilarity index 94%rename from plugin/advisor/mysql/parser.gorename to backend/plugin/advisor/mysql/parser.goindex bec1d9e27e..5565269f29 100644--- a/plugin/advisor/mysql/parser.go+++ b/backend/plugin/advisor/mysql/parser.go@@ -7,8 +7,8 @@ import (tidbparser "github.com/pingcap/tidb/parser""github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/parser"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/parser")// Wrapper for parser.New().diff --git a/plugin/advisor/mysql/parser_test.go b/backend/plugin/advisor/mysql/parser_test.gosimilarity index 100%rename from plugin/advisor/mysql/parser_test.gorename to backend/plugin/advisor/mysql/parser_test.godiff --git a/plugin/advisor/mysql/test/column_auto_increment_initial_value.yaml b/backend/plugin/advisor/mysql/test/column_auto_increment_initial_value.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/column_auto_increment_initial_value.yamlrename to backend/plugin/advisor/mysql/test/column_auto_increment_initial_value.yamldiff --git a/plugin/advisor/mysql/test/column_auto_increment_must_integer.yaml b/backend/plugin/advisor/mysql/test/column_auto_increment_must_integer.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/column_auto_increment_must_integer.yamlrename to backend/plugin/advisor/mysql/test/column_auto_increment_must_integer.yamldiff --git a/plugin/advisor/mysql/test/column_auto_increment_must_unsigned.yaml b/backend/plugin/advisor/mysql/test/column_auto_increment_must_unsigned.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/column_auto_increment_must_unsigned.yamlrename to backend/plugin/advisor/mysql/test/column_auto_increment_must_unsigned.yamldiff --git a/plugin/advisor/mysql/test/column_comment.yaml b/backend/plugin/advisor/mysql/test/column_comment.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/column_comment.yamlrename to backend/plugin/advisor/mysql/test/column_comment.yamldiff --git a/plugin/advisor/mysql/test/column_current_time_count_limit.yaml b/backend/plugin/advisor/mysql/test/column_current_time_count_limit.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/column_current_time_count_limit.yamlrename to backend/plugin/advisor/mysql/test/column_current_time_count_limit.yamldiff --git a/plugin/advisor/mysql/test/column_disallow_change.yaml b/backend/plugin/advisor/mysql/test/column_disallow_change.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/column_disallow_change.yamlrename to backend/plugin/advisor/mysql/test/column_disallow_change.yamldiff --git a/plugin/advisor/mysql/test/column_disallow_change_type.yaml b/backend/plugin/advisor/mysql/test/column_disallow_change_type.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/column_disallow_change_type.yamlrename to backend/plugin/advisor/mysql/test/column_disallow_change_type.yamldiff --git a/plugin/advisor/mysql/test/column_disallow_changing_order.yaml b/backend/plugin/advisor/mysql/test/column_disallow_changing_order.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/column_disallow_changing_order.yamlrename to backend/plugin/advisor/mysql/test/column_disallow_changing_order.yamldiff --git a/plugin/advisor/mysql/test/column_disallow_set_charset.yaml b/backend/plugin/advisor/mysql/test/column_disallow_set_charset.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/column_disallow_set_charset.yamlrename to backend/plugin/advisor/mysql/test/column_disallow_set_charset.yamldiff --git a/plugin/advisor/mysql/test/column_maximum_character_length.yaml b/backend/plugin/advisor/mysql/test/column_maximum_character_length.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/column_maximum_character_length.yamlrename to backend/plugin/advisor/mysql/test/column_maximum_character_length.yamldiff --git a/plugin/advisor/mysql/test/column_no_null.yaml b/backend/plugin/advisor/mysql/test/column_no_null.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/column_no_null.yamlrename to backend/plugin/advisor/mysql/test/column_no_null.yamldiff --git a/plugin/advisor/mysql/test/column_require_default.yaml b/backend/plugin/advisor/mysql/test/column_require_default.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/column_require_default.yamlrename to backend/plugin/advisor/mysql/test/column_require_default.yamldiff --git a/plugin/advisor/mysql/test/column_required.yaml b/backend/plugin/advisor/mysql/test/column_required.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/column_required.yamlrename to backend/plugin/advisor/mysql/test/column_required.yamldiff --git a/plugin/advisor/mysql/test/column_set_default_for_not_null.yaml b/backend/plugin/advisor/mysql/test/column_set_default_for_not_null.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/column_set_default_for_not_null.yamlrename to backend/plugin/advisor/mysql/test/column_set_default_for_not_null.yamldiff --git a/plugin/advisor/mysql/test/column_type_disallow_list.yaml b/backend/plugin/advisor/mysql/test/column_type_disallow_list.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/column_type_disallow_list.yamlrename to backend/plugin/advisor/mysql/test/column_type_disallow_list.yamldiff --git a/plugin/advisor/mysql/test/database_drop_empty_database.yaml b/backend/plugin/advisor/mysql/test/database_drop_empty_database.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/database_drop_empty_database.yamlrename to backend/plugin/advisor/mysql/test/database_drop_empty_database.yamldiff --git a/plugin/advisor/mysql/test/engine_mysql_use_innodb.yaml b/backend/plugin/advisor/mysql/test/engine_mysql_use_innodb.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/engine_mysql_use_innodb.yamlrename to backend/plugin/advisor/mysql/test/engine_mysql_use_innodb.yamldiff --git a/plugin/advisor/mysql/test/index_key_number_limit.yaml b/backend/plugin/advisor/mysql/test/index_key_number_limit.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/index_key_number_limit.yamlrename to backend/plugin/advisor/mysql/test/index_key_number_limit.yamldiff --git a/plugin/advisor/mysql/test/index_no_duplicate_column.yaml b/backend/plugin/advisor/mysql/test/index_no_duplicate_column.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/index_no_duplicate_column.yamlrename to backend/plugin/advisor/mysql/test/index_no_duplicate_column.yamldiff --git a/plugin/advisor/mysql/test/index_pk_type_limit.yaml b/backend/plugin/advisor/mysql/test/index_pk_type_limit.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/index_pk_type_limit.yamlrename to backend/plugin/advisor/mysql/test/index_pk_type_limit.yamldiff --git a/plugin/advisor/mysql/test/index_total_number_limit.yaml b/backend/plugin/advisor/mysql/test/index_total_number_limit.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/index_total_number_limit.yamlrename to backend/plugin/advisor/mysql/test/index_total_number_limit.yamldiff --git a/plugin/advisor/mysql/test/index_type_no_blob.yaml b/backend/plugin/advisor/mysql/test/index_type_no_blob.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/index_type_no_blob.yamlrename to backend/plugin/advisor/mysql/test/index_type_no_blob.yamldiff --git a/plugin/advisor/mysql/test/naming_column.yaml b/backend/plugin/advisor/mysql/test/naming_column.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/naming_column.yamlrename to backend/plugin/advisor/mysql/test/naming_column.yamldiff --git a/plugin/advisor/mysql/test/naming_column_auto_increment.yaml b/backend/plugin/advisor/mysql/test/naming_column_auto_increment.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/naming_column_auto_increment.yamlrename to backend/plugin/advisor/mysql/test/naming_column_auto_increment.yamldiff --git a/plugin/advisor/mysql/test/naming_index_fk.yaml b/backend/plugin/advisor/mysql/test/naming_index_fk.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/naming_index_fk.yamlrename to backend/plugin/advisor/mysql/test/naming_index_fk.yamldiff --git a/plugin/advisor/mysql/test/naming_index_idx.yaml b/backend/plugin/advisor/mysql/test/naming_index_idx.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/naming_index_idx.yamlrename to backend/plugin/advisor/mysql/test/naming_index_idx.yamldiff --git a/plugin/advisor/mysql/test/naming_index_uk.yaml b/backend/plugin/advisor/mysql/test/naming_index_uk.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/naming_index_uk.yamlrename to backend/plugin/advisor/mysql/test/naming_index_uk.yamldiff --git a/plugin/advisor/mysql/test/naming_table.yaml b/backend/plugin/advisor/mysql/test/naming_table.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/naming_table.yamlrename to backend/plugin/advisor/mysql/test/naming_table.yamldiff --git a/plugin/advisor/mysql/test/schema_backward_compatibility.yaml b/backend/plugin/advisor/mysql/test/schema_backward_compatibility.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/schema_backward_compatibility.yamlrename to backend/plugin/advisor/mysql/test/schema_backward_compatibility.yamldiff --git a/plugin/advisor/mysql/test/statement_affected_row_limit.yaml b/backend/plugin/advisor/mysql/test/statement_affected_row_limit.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/statement_affected_row_limit.yamlrename to backend/plugin/advisor/mysql/test/statement_affected_row_limit.yamldiff --git a/plugin/advisor/mysql/test/statement_disallow_commit.yaml b/backend/plugin/advisor/mysql/test/statement_disallow_commit.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/statement_disallow_commit.yamlrename to backend/plugin/advisor/mysql/test/statement_disallow_commit.yamldiff --git a/plugin/advisor/mysql/test/statement_disallow_limit.yaml b/backend/plugin/advisor/mysql/test/statement_disallow_limit.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/statement_disallow_limit.yamlrename to backend/plugin/advisor/mysql/test/statement_disallow_limit.yamldiff --git a/plugin/advisor/mysql/test/statement_disallow_order_by.yaml b/backend/plugin/advisor/mysql/test/statement_disallow_order_by.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/statement_disallow_order_by.yamlrename to backend/plugin/advisor/mysql/test/statement_disallow_order_by.yamldiff --git a/plugin/advisor/mysql/test/statement_dml_dry_run.yaml b/backend/plugin/advisor/mysql/test/statement_dml_dry_run.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/statement_dml_dry_run.yamlrename to backend/plugin/advisor/mysql/test/statement_dml_dry_run.yamldiff --git a/plugin/advisor/mysql/test/statement_insert_disallow_order_by_rand.yaml b/backend/plugin/advisor/mysql/test/statement_insert_disallow_order_by_rand.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/statement_insert_disallow_order_by_rand.yamlrename to backend/plugin/advisor/mysql/test/statement_insert_disallow_order_by_rand.yamldiff --git a/plugin/advisor/mysql/test/statement_insert_must_specify_column.yaml b/backend/plugin/advisor/mysql/test/statement_insert_must_specify_column.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/statement_insert_must_specify_column.yamlrename to backend/plugin/advisor/mysql/test/statement_insert_must_specify_column.yamldiff --git a/plugin/advisor/mysql/test/statement_insert_row_limit.yaml b/backend/plugin/advisor/mysql/test/statement_insert_row_limit.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/statement_insert_row_limit.yamlrename to backend/plugin/advisor/mysql/test/statement_insert_row_limit.yamldiff --git a/plugin/advisor/mysql/test/statement_merge_alter_table.yaml b/backend/plugin/advisor/mysql/test/statement_merge_alter_table.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/statement_merge_alter_table.yamlrename to backend/plugin/advisor/mysql/test/statement_merge_alter_table.yamldiff --git a/plugin/advisor/mysql/test/statement_select_no_select_all.yaml b/backend/plugin/advisor/mysql/test/statement_select_no_select_all.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/statement_select_no_select_all.yamlrename to backend/plugin/advisor/mysql/test/statement_select_no_select_all.yamldiff --git a/plugin/advisor/mysql/test/statement_where_no_leading_wildcard_like.yaml b/backend/plugin/advisor/mysql/test/statement_where_no_leading_wildcard_like.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/statement_where_no_leading_wildcard_like.yamlrename to backend/plugin/advisor/mysql/test/statement_where_no_leading_wildcard_like.yamldiff --git a/plugin/advisor/mysql/test/statement_where_require.yaml b/backend/plugin/advisor/mysql/test/statement_where_require.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/statement_where_require.yamlrename to backend/plugin/advisor/mysql/test/statement_where_require.yamldiff --git a/plugin/advisor/mysql/test/system_charset_allowlist.yaml b/backend/plugin/advisor/mysql/test/system_charset_allowlist.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/system_charset_allowlist.yamlrename to backend/plugin/advisor/mysql/test/system_charset_allowlist.yamldiff --git a/plugin/advisor/mysql/test/system_collation_allowlist.yaml b/backend/plugin/advisor/mysql/test/system_collation_allowlist.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/system_collation_allowlist.yamlrename to backend/plugin/advisor/mysql/test/system_collation_allowlist.yamldiff --git a/plugin/advisor/mysql/test/table_comment.yaml b/backend/plugin/advisor/mysql/test/table_comment.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/table_comment.yamlrename to backend/plugin/advisor/mysql/test/table_comment.yamldiff --git a/plugin/advisor/mysql/test/table_disallow_partition.yaml b/backend/plugin/advisor/mysql/test/table_disallow_partition.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/table_disallow_partition.yamlrename to backend/plugin/advisor/mysql/test/table_disallow_partition.yamldiff --git a/plugin/advisor/mysql/test/table_drop_naming_convention.yaml b/backend/plugin/advisor/mysql/test/table_drop_naming_convention.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/table_drop_naming_convention.yamlrename to backend/plugin/advisor/mysql/test/table_drop_naming_convention.yamldiff --git a/plugin/advisor/mysql/test/table_no_foreign_key.yaml b/backend/plugin/advisor/mysql/test/table_no_foreign_key.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/table_no_foreign_key.yamlrename to backend/plugin/advisor/mysql/test/table_no_foreign_key.yamldiff --git a/plugin/advisor/mysql/test/table_require_pk.yaml b/backend/plugin/advisor/mysql/test/table_require_pk.yamlsimilarity index 100%rename from plugin/advisor/mysql/test/table_require_pk.yamlrename to backend/plugin/advisor/mysql/test/table_require_pk.yamldiff --git a/plugin/advisor/mysql/utils.go b/backend/plugin/advisor/mysql/utils.gosimilarity index 100%rename from plugin/advisor/mysql/utils.gorename to backend/plugin/advisor/mysql/utils.godiff --git a/plugin/advisor/pg/advisor_collation_allowlist.go b/backend/plugin/advisor/pg/advisor_collation_allowlist.gosimilarity index 95%rename from plugin/advisor/pg/advisor_collation_allowlist.gorename to backend/plugin/advisor/pg/advisor_collation_allowlist.goindex 95c2e47c25..ae340433a9 100644--- a/plugin/advisor/pg/advisor_collation_allowlist.go+++ b/backend/plugin/advisor/pg/advisor_collation_allowlist.go@@ -5,9 +5,9 @@ package pgimport ("fmt"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_column_disallow_changing_type.go b/backend/plugin/advisor/pg/advisor_column_disallow_changing_type.gosimilarity index 92%rename from plugin/advisor/pg/advisor_column_disallow_changing_type.gorename to backend/plugin/advisor/pg/advisor_column_disallow_changing_type.goindex 95a57e762e..1ba034fb32 100644--- a/plugin/advisor/pg/advisor_column_disallow_changing_type.go+++ b/backend/plugin/advisor/pg/advisor_column_disallow_changing_type.go@@ -5,9 +5,9 @@ package pgimport ("fmt"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_column_maximum_character_length.go b/backend/plugin/advisor/pg/advisor_column_maximum_character_length.gosimilarity index 95%rename from plugin/advisor/pg/advisor_column_maximum_character_length.gorename to backend/plugin/advisor/pg/advisor_column_maximum_character_length.goindex 2287ad27e0..2bd7ca9526 100644--- a/plugin/advisor/pg/advisor_column_maximum_character_length.go+++ b/backend/plugin/advisor/pg/advisor_column_maximum_character_length.go@@ -5,9 +5,9 @@ package pgimport ("fmt"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_column_no_null.go b/backend/plugin/advisor/pg/advisor_column_no_null.gosimilarity index 95%rename from plugin/advisor/pg/advisor_column_no_null.gorename to backend/plugin/advisor/pg/advisor_column_no_null.goindex fb86d9f964..69b90ac546 100644--- a/plugin/advisor/pg/advisor_column_no_null.go+++ b/backend/plugin/advisor/pg/advisor_column_no_null.go@@ -4,10 +4,10 @@ import ("fmt""sort"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/catalog"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/catalog"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_column_require_default.go b/backend/plugin/advisor/pg/advisor_column_require_default.gosimilarity index 93%rename from plugin/advisor/pg/advisor_column_require_default.gorename to backend/plugin/advisor/pg/advisor_column_require_default.goindex 902c4c3e09..b8e231c5d1 100644--- a/plugin/advisor/pg/advisor_column_require_default.go+++ b/backend/plugin/advisor/pg/advisor_column_require_default.go@@ -6,10 +6,10 @@ import ("fmt""sort"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/catalog"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/catalog"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_column_required.go b/backend/plugin/advisor/pg/advisor_column_required.gosimilarity index 94%rename from plugin/advisor/pg/advisor_column_required.gorename to backend/plugin/advisor/pg/advisor_column_required.goindex 7734d42094..1e2a0c7100 100644--- a/plugin/advisor/pg/advisor_column_required.go+++ b/backend/plugin/advisor/pg/advisor_column_required.go@@ -5,9 +5,9 @@ import ("sort""strings"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_column_type_disallow_list.go b/backend/plugin/advisor/pg/advisor_column_type_disallow_list.gosimilarity index 95%rename from plugin/advisor/pg/advisor_column_type_disallow_list.gorename to backend/plugin/advisor/pg/advisor_column_type_disallow_list.goindex 95b6863b61..ca02fedfff 100644--- a/plugin/advisor/pg/advisor_column_type_disallow_list.go+++ b/backend/plugin/advisor/pg/advisor_column_type_disallow_list.go@@ -4,9 +4,9 @@ import ("fmt""strings"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")func init() {diff --git a/plugin/advisor/pg/advisor_comment_convention.go b/backend/plugin/advisor/pg/advisor_comment_convention.gosimilarity index 92%rename from plugin/advisor/pg/advisor_comment_convention.gorename to backend/plugin/advisor/pg/advisor_comment_convention.goindex 085d4a9809..69c6001fc0 100644--- a/plugin/advisor/pg/advisor_comment_convention.go+++ b/backend/plugin/advisor/pg/advisor_comment_convention.go@@ -5,9 +5,9 @@ package pgimport ("fmt"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_encoding_allowlist.go b/backend/plugin/advisor/pg/advisor_encoding_allowlist.gosimilarity index 93%rename from plugin/advisor/pg/advisor_encoding_allowlist.gorename to backend/plugin/advisor/pg/advisor_encoding_allowlist.goindex 457a4224a2..6a7d44e9c0 100644--- a/plugin/advisor/pg/advisor_encoding_allowlist.go+++ b/backend/plugin/advisor/pg/advisor_encoding_allowlist.go@@ -4,9 +4,9 @@ import ("fmt""strings"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_index_create_concurrently.go b/backend/plugin/advisor/pg/advisor_index_create_concurrently.gosimilarity index 91%rename from plugin/advisor/pg/advisor_index_create_concurrently.gorename to backend/plugin/advisor/pg/advisor_index_create_concurrently.goindex 3af37cb8d5..c98444c3fa 100644--- a/plugin/advisor/pg/advisor_index_create_concurrently.go+++ b/backend/plugin/advisor/pg/advisor_index_create_concurrently.go@@ -3,9 +3,9 @@ package pg// Framework code is generated by the generator.import (- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_index_key_number_limit.go b/backend/plugin/advisor/pg/advisor_index_key_number_limit.gosimilarity index 94%rename from plugin/advisor/pg/advisor_index_key_number_limit.gorename to backend/plugin/advisor/pg/advisor_index_key_number_limit.goindex 1d880d4de2..48bc908613 100644--- a/plugin/advisor/pg/advisor_index_key_number_limit.go+++ b/backend/plugin/advisor/pg/advisor_index_key_number_limit.go@@ -3,9 +3,9 @@ package pgimport ("fmt"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_index_no_duplicate_column.go b/backend/plugin/advisor/pg/advisor_index_no_duplicate_column.gosimilarity index 96%rename from plugin/advisor/pg/advisor_index_no_duplicate_column.gorename to backend/plugin/advisor/pg/advisor_index_no_duplicate_column.goindex 3f7079b05e..a291467ca9 100644--- a/plugin/advisor/pg/advisor_index_no_duplicate_column.go+++ b/backend/plugin/advisor/pg/advisor_index_no_duplicate_column.go@@ -3,9 +3,9 @@ package pgimport ("fmt"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")func init() {diff --git a/plugin/advisor/pg/advisor_index_primary_key_type_allowlist.go b/backend/plugin/advisor/pg/advisor_index_primary_key_type_allowlist.gosimilarity index 92%rename from plugin/advisor/pg/advisor_index_primary_key_type_allowlist.gorename to backend/plugin/advisor/pg/advisor_index_primary_key_type_allowlist.goindex 1722dc10d7..c56a1ad8d9 100644--- a/plugin/advisor/pg/advisor_index_primary_key_type_allowlist.go+++ b/backend/plugin/advisor/pg/advisor_index_primary_key_type_allowlist.go@@ -7,11 +7,11 @@ import ("go.uber.org/zap"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_index_total_number_limit.go b/backend/plugin/advisor/pg/advisor_index_total_number_limit.gosimilarity index 94%rename from plugin/advisor/pg/advisor_index_total_number_limit.gorename to backend/plugin/advisor/pg/advisor_index_total_number_limit.goindex b1ed38bdc0..c3691e2cfd 100644--- a/plugin/advisor/pg/advisor_index_total_number_limit.go+++ b/backend/plugin/advisor/pg/advisor_index_total_number_limit.go@@ -6,10 +6,10 @@ import ("fmt""sort"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/catalog"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/catalog"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_insert_disallow_order_by_rand.go b/backend/plugin/advisor/pg/advisor_insert_disallow_order_by_rand.gosimilarity index 93%rename from plugin/advisor/pg/advisor_insert_disallow_order_by_rand.gorename to backend/plugin/advisor/pg/advisor_insert_disallow_order_by_rand.goindex d7958a3795..b0b7dc92d9 100644--- a/plugin/advisor/pg/advisor_insert_disallow_order_by_rand.go+++ b/backend/plugin/advisor/pg/advisor_insert_disallow_order_by_rand.go@@ -6,9 +6,9 @@ import ("fmt""strings"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_insert_must_specify_column.go b/backend/plugin/advisor/pg/advisor_insert_must_specify_column.gosimilarity index 91%rename from plugin/advisor/pg/advisor_insert_must_specify_column.gorename to backend/plugin/advisor/pg/advisor_insert_must_specify_column.goindex 0fb47cdd4a..a18ef0f36c 100644--- a/plugin/advisor/pg/advisor_insert_must_specify_column.go+++ b/backend/plugin/advisor/pg/advisor_insert_must_specify_column.go@@ -5,9 +5,9 @@ package pgimport ("fmt"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_insert_row_limit.go b/backend/plugin/advisor/pg/advisor_insert_row_limit.gosimilarity index 96%rename from plugin/advisor/pg/advisor_insert_row_limit.gorename to backend/plugin/advisor/pg/advisor_insert_row_limit.goindex fd9bed621a..cb460381ad 100644--- a/plugin/advisor/pg/advisor_insert_row_limit.go+++ b/backend/plugin/advisor/pg/advisor_insert_row_limit.go@@ -9,9 +9,9 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_migration_compatibility.go b/backend/plugin/advisor/pg/advisor_migration_compatibility.gosimilarity index 95%rename from plugin/advisor/pg/advisor_migration_compatibility.gorename to backend/plugin/advisor/pg/advisor_migration_compatibility.goindex bafa3bf975..c1fa419564 100644--- a/plugin/advisor/pg/advisor_migration_compatibility.go+++ b/backend/plugin/advisor/pg/advisor_migration_compatibility.go@@ -3,9 +3,9 @@ package pgimport ("fmt"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_naming_column.go b/backend/plugin/advisor/pg/advisor_naming_column.gosimilarity index 95%rename from plugin/advisor/pg/advisor_naming_column.gorename to backend/plugin/advisor/pg/advisor_naming_column.goindex b9e1c3a0d5..0d70e683ff 100644--- a/plugin/advisor/pg/advisor_naming_column.go+++ b/backend/plugin/advisor/pg/advisor_naming_column.go@@ -4,9 +4,9 @@ import ("fmt""regexp"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_naming_foreign_key_convention.go b/backend/plugin/advisor/pg/advisor_naming_foreign_key_convention.gosimilarity index 97%rename from plugin/advisor/pg/advisor_naming_foreign_key_convention.gorename to backend/plugin/advisor/pg/advisor_naming_foreign_key_convention.goindex 3c52af9d2a..0aa0a28976 100644--- a/plugin/advisor/pg/advisor_naming_foreign_key_convention.go+++ b/backend/plugin/advisor/pg/advisor_naming_foreign_key_convention.go@@ -5,9 +5,9 @@ import ("regexp""strings"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_naming_index_convention.go b/backend/plugin/advisor/pg/advisor_naming_index_convention.gosimilarity index 94%rename from plugin/advisor/pg/advisor_naming_index_convention.gorename to backend/plugin/advisor/pg/advisor_naming_index_convention.goindex 607e64c169..695a050469 100644--- a/plugin/advisor/pg/advisor_naming_index_convention.go+++ b/backend/plugin/advisor/pg/advisor_naming_index_convention.go@@ -4,10 +4,10 @@ import ("fmt""strings"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/catalog"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/catalog"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_naming_primary_key_convention.go b/backend/plugin/advisor/pg/advisor_naming_primary_key_convention.gosimilarity index 96%rename from plugin/advisor/pg/advisor_naming_primary_key_convention.gorename to backend/plugin/advisor/pg/advisor_naming_primary_key_convention.goindex e0180e332a..1e4da51066 100644--- a/plugin/advisor/pg/advisor_naming_primary_key_convention.go+++ b/backend/plugin/advisor/pg/advisor_naming_primary_key_convention.go@@ -4,10 +4,10 @@ import ("fmt""strings"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/catalog"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/catalog"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_naming_table.go b/backend/plugin/advisor/pg/advisor_naming_table.gosimilarity index 94%rename from plugin/advisor/pg/advisor_naming_table.gorename to backend/plugin/advisor/pg/advisor_naming_table.goindex ae97267df3..0cdfb89d64 100644--- a/plugin/advisor/pg/advisor_naming_table.go+++ b/backend/plugin/advisor/pg/advisor_naming_table.go@@ -4,9 +4,9 @@ import ("fmt""regexp"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_naming_unique_key_convention.go b/backend/plugin/advisor/pg/advisor_naming_unique_key_convention.gosimilarity index 96%rename from plugin/advisor/pg/advisor_naming_unique_key_convention.gorename to backend/plugin/advisor/pg/advisor_naming_unique_key_convention.goindex c6a5daf538..a1e12572bc 100644--- a/plugin/advisor/pg/advisor_naming_unique_key_convention.go+++ b/backend/plugin/advisor/pg/advisor_naming_unique_key_convention.go@@ -4,10 +4,10 @@ import ("fmt""strings"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/catalog"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/catalog"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_statement_add_check_not_valid.go b/backend/plugin/advisor/pg/advisor_statement_add_check_not_valid.gosimilarity index 92%rename from plugin/advisor/pg/advisor_statement_add_check_not_valid.gorename to backend/plugin/advisor/pg/advisor_statement_add_check_not_valid.goindex 4438a3fd78..7185bfdb6e 100644--- a/plugin/advisor/pg/advisor_statement_add_check_not_valid.go+++ b/backend/plugin/advisor/pg/advisor_statement_add_check_not_valid.go@@ -3,9 +3,9 @@ package pg// Framework code is generated by the generator.import (- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_statement_affected_row_limit.go b/backend/plugin/advisor/pg/advisor_statement_affected_row_limit.gosimilarity index 95%rename from plugin/advisor/pg/advisor_statement_affected_row_limit.gorename to backend/plugin/advisor/pg/advisor_statement_affected_row_limit.goindex cd8e4b35b8..ef052bf433 100644--- a/plugin/advisor/pg/advisor_statement_affected_row_limit.go+++ b/backend/plugin/advisor/pg/advisor_statement_affected_row_limit.go@@ -7,9 +7,9 @@ import ("database/sql""fmt"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_statement_disallow_add_column_with_default.go b/backend/plugin/advisor/pg/advisor_statement_disallow_add_column_with_default.gosimilarity index 93%rename from plugin/advisor/pg/advisor_statement_disallow_add_column_with_default.gorename to backend/plugin/advisor/pg/advisor_statement_disallow_add_column_with_default.goindex b51b18cbd8..78e739c3d2 100644--- a/plugin/advisor/pg/advisor_statement_disallow_add_column_with_default.go+++ b/backend/plugin/advisor/pg/advisor_statement_disallow_add_column_with_default.go@@ -3,9 +3,9 @@ package pg// Framework code is generated by the generator.import (- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_statement_disallow_add_not_null.go b/backend/plugin/advisor/pg/advisor_statement_disallow_add_not_null.gosimilarity index 91%rename from plugin/advisor/pg/advisor_statement_disallow_add_not_null.gorename to backend/plugin/advisor/pg/advisor_statement_disallow_add_not_null.goindex ec78af9fd6..5c254fcb5f 100644--- a/plugin/advisor/pg/advisor_statement_disallow_add_not_null.go+++ b/backend/plugin/advisor/pg/advisor_statement_disallow_add_not_null.go@@ -5,9 +5,9 @@ package pgimport ("fmt"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_statement_disallow_commit.go b/backend/plugin/advisor/pg/advisor_statement_disallow_commit.gosimilarity index 91%rename from plugin/advisor/pg/advisor_statement_disallow_commit.gorename to backend/plugin/advisor/pg/advisor_statement_disallow_commit.goindex f438e8357c..c3aec35e11 100644--- a/plugin/advisor/pg/advisor_statement_disallow_commit.go+++ b/backend/plugin/advisor/pg/advisor_statement_disallow_commit.go@@ -5,9 +5,9 @@ package pgimport ("fmt"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_statement_dml_dry_run.go b/backend/plugin/advisor/pg/advisor_statement_dml_dry_run.gosimilarity index 92%rename from plugin/advisor/pg/advisor_statement_dml_dry_run.gorename to backend/plugin/advisor/pg/advisor_statement_dml_dry_run.goindex d167c46524..3fdf5d702b 100644--- a/plugin/advisor/pg/advisor_statement_dml_dry_run.go+++ b/backend/plugin/advisor/pg/advisor_statement_dml_dry_run.go@@ -7,9 +7,9 @@ import ("database/sql""fmt"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_statement_merge_alter_table.go b/backend/plugin/advisor/pg/advisor_statement_merge_alter_table.gosimilarity index 94%rename from plugin/advisor/pg/advisor_statement_merge_alter_table.gorename to backend/plugin/advisor/pg/advisor_statement_merge_alter_table.goindex 0ee5536b52..37c0a47ff4 100644--- a/plugin/advisor/pg/advisor_statement_merge_alter_table.go+++ b/backend/plugin/advisor/pg/advisor_statement_merge_alter_table.go@@ -6,9 +6,9 @@ import ("fmt""sort"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_stmt_no_leading_wildcard_like.go b/backend/plugin/advisor/pg/advisor_stmt_no_leading_wildcard_like.gosimilarity index 92%rename from plugin/advisor/pg/advisor_stmt_no_leading_wildcard_like.gorename to backend/plugin/advisor/pg/advisor_stmt_no_leading_wildcard_like.goindex 257be56b28..4684cb688e 100644--- a/plugin/advisor/pg/advisor_stmt_no_leading_wildcard_like.go+++ b/backend/plugin/advisor/pg/advisor_stmt_no_leading_wildcard_like.go@@ -3,9 +3,9 @@ package pgimport ("fmt"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")const (diff --git a/plugin/advisor/pg/advisor_stmt_no_select_all.go b/backend/plugin/advisor/pg/advisor_stmt_no_select_all.gosimilarity index 91%rename from plugin/advisor/pg/advisor_stmt_no_select_all.gorename to backend/plugin/advisor/pg/advisor_stmt_no_select_all.goindex fddc6f3d87..8bc7dcafd6 100644--- a/plugin/advisor/pg/advisor_stmt_no_select_all.go+++ b/backend/plugin/advisor/pg/advisor_stmt_no_select_all.go@@ -3,9 +3,9 @@ package pgimport ("fmt"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_stmt_where_required.go b/backend/plugin/advisor/pg/advisor_stmt_where_required.gosimilarity index 92%rename from plugin/advisor/pg/advisor_stmt_where_required.gorename to backend/plugin/advisor/pg/advisor_stmt_where_required.goindex ff3bafb223..4b522d4080 100644--- a/plugin/advisor/pg/advisor_stmt_where_required.go+++ b/backend/plugin/advisor/pg/advisor_stmt_where_required.go@@ -3,9 +3,9 @@ package pgimport ("fmt"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_syntax.go b/backend/plugin/advisor/pg/advisor_syntax.gosimilarity index 90%rename from plugin/advisor/pg/advisor_syntax.gorename to backend/plugin/advisor/pg/advisor_syntax.goindex 40f20d691d..3d3525245d 100644--- a/plugin/advisor/pg/advisor_syntax.go+++ b/backend/plugin/advisor/pg/advisor_syntax.go@@ -1,8 +1,8 @@package pgimport (- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")var (diff --git a/plugin/advisor/pg/advisor_syntax_test.go b/backend/plugin/advisor/pg/advisor_syntax_test.gosimilarity index 87%rename from plugin/advisor/pg/advisor_syntax_test.gorename to backend/plugin/advisor/pg/advisor_syntax_test.goindex 582d1bf690..a4b75e52e7 100644--- a/plugin/advisor/pg/advisor_syntax_test.go+++ b/backend/plugin/advisor/pg/advisor_syntax_test.go@@ -6,9 +6,9 @@ import ("github.com/stretchr/testify/assert""github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor"- _ "github.com/bytebase/bytebase/plugin/parser/engine/pg"+ _ "github.com/bytebase/bytebase/backend/plugin/parser/engine/pg")func TestPostgreSQLSyntax(t *testing.T) {diff --git a/plugin/advisor/pg/advisor_table_disallow_partition.go b/backend/plugin/advisor/pg/advisor_table_disallow_partition.gosimilarity index 92%rename from plugin/advisor/pg/advisor_table_disallow_partition.gorename to backend/plugin/advisor/pg/advisor_table_disallow_partition.goindex d85875af32..b558dbc876 100644--- a/plugin/advisor/pg/advisor_table_disallow_partition.go+++ b/backend/plugin/advisor/pg/advisor_table_disallow_partition.go@@ -5,9 +5,9 @@ package pgimport ("fmt"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_table_drop_naming_convention.go b/backend/plugin/advisor/pg/advisor_table_drop_naming_convention.gosimilarity index 92%rename from plugin/advisor/pg/advisor_table_drop_naming_convention.gorename to backend/plugin/advisor/pg/advisor_table_drop_naming_convention.goindex 29ae683d86..f98566dcde 100644--- a/plugin/advisor/pg/advisor_table_drop_naming_convention.go+++ b/backend/plugin/advisor/pg/advisor_table_drop_naming_convention.go@@ -6,9 +6,9 @@ import ("fmt""regexp"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_table_no_fk.go b/backend/plugin/advisor/pg/advisor_table_no_fk.gosimilarity index 93%rename from plugin/advisor/pg/advisor_table_no_fk.gorename to backend/plugin/advisor/pg/advisor_table_no_fk.goindex f4cae104b0..13d6004d9a 100644--- a/plugin/advisor/pg/advisor_table_no_fk.go+++ b/backend/plugin/advisor/pg/advisor_table_no_fk.go@@ -3,9 +3,9 @@ package pgimport ("fmt"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/advisor_table_require_pk.go b/backend/plugin/advisor/pg/advisor_table_require_pk.gosimilarity index 92%rename from plugin/advisor/pg/advisor_table_require_pk.gorename to backend/plugin/advisor/pg/advisor_table_require_pk.goindex d63c8d4b08..ab63a142ae 100644--- a/plugin/advisor/pg/advisor_table_require_pk.go+++ b/backend/plugin/advisor/pg/advisor_table_require_pk.go@@ -3,10 +3,10 @@ package pgimport ("fmt"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/catalog"- "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/catalog"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/advisor/pg/parser.go b/backend/plugin/advisor/pg/parser.gosimilarity index 81%rename from plugin/advisor/pg/parser.gorename to backend/plugin/advisor/pg/parser.goindex 18ef09139d..28308ad2e6 100644--- a/plugin/advisor/pg/parser.go+++ b/backend/plugin/advisor/pg/parser.go@@ -1,9 +1,9 @@package pgimport (- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/parser"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/parser"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")func parseStatement(statement string) ([]ast.Node, []advisor.Advice) {diff --git a/plugin/advisor/pg/pg_rules_test.go b/backend/plugin/advisor/pg/pg_rules_test.gosimilarity index 94%rename from plugin/advisor/pg/pg_rules_test.gorename to backend/plugin/advisor/pg/pg_rules_test.goindex a78eeff803..8f2d2939bd 100644--- a/plugin/advisor/pg/pg_rules_test.go+++ b/backend/plugin/advisor/pg/pg_rules_test.go@@ -3,8 +3,8 @@ package pgimport ("testing"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")func TestPostgreSQLRules(t *testing.T) {diff --git a/plugin/advisor/pg/test/column_disallow_change_type.yaml b/backend/plugin/advisor/pg/test/column_disallow_change_type.yamlsimilarity index 100%rename from plugin/advisor/pg/test/column_disallow_change_type.yamlrename to backend/plugin/advisor/pg/test/column_disallow_change_type.yamldiff --git a/plugin/advisor/pg/test/column_maximum_character_length.yaml b/backend/plugin/advisor/pg/test/column_maximum_character_length.yamlsimilarity index 100%rename from plugin/advisor/pg/test/column_maximum_character_length.yamlrename to backend/plugin/advisor/pg/test/column_maximum_character_length.yamldiff --git a/plugin/advisor/pg/test/column_no_null.yaml b/backend/plugin/advisor/pg/test/column_no_null.yamlsimilarity index 100%rename from plugin/advisor/pg/test/column_no_null.yamlrename to backend/plugin/advisor/pg/test/column_no_null.yamldiff --git a/plugin/advisor/pg/test/column_require_default.yaml b/backend/plugin/advisor/pg/test/column_require_default.yamlsimilarity index 100%rename from plugin/advisor/pg/test/column_require_default.yamlrename to backend/plugin/advisor/pg/test/column_require_default.yamldiff --git a/plugin/advisor/pg/test/column_required.yaml b/backend/plugin/advisor/pg/test/column_required.yamlsimilarity index 100%rename from plugin/advisor/pg/test/column_required.yamlrename to backend/plugin/advisor/pg/test/column_required.yamldiff --git a/plugin/advisor/pg/test/column_type_disallow_list.yaml b/backend/plugin/advisor/pg/test/column_type_disallow_list.yamlsimilarity index 100%rename from plugin/advisor/pg/test/column_type_disallow_list.yamlrename to backend/plugin/advisor/pg/test/column_type_disallow_list.yamldiff --git a/plugin/advisor/pg/test/comment_length.yaml b/backend/plugin/advisor/pg/test/comment_length.yamlsimilarity index 100%rename from plugin/advisor/pg/test/comment_length.yamlrename to backend/plugin/advisor/pg/test/comment_length.yamldiff --git a/plugin/advisor/pg/test/index_create_concurrently.yaml b/backend/plugin/advisor/pg/test/index_create_concurrently.yamlsimilarity index 100%rename from plugin/advisor/pg/test/index_create_concurrently.yamlrename to backend/plugin/advisor/pg/test/index_create_concurrently.yamldiff --git a/plugin/advisor/pg/test/index_key_number_limit.yaml b/backend/plugin/advisor/pg/test/index_key_number_limit.yamlsimilarity index 100%rename from plugin/advisor/pg/test/index_key_number_limit.yamlrename to backend/plugin/advisor/pg/test/index_key_number_limit.yamldiff --git a/plugin/advisor/pg/test/index_no_duplicate_column.yaml b/backend/plugin/advisor/pg/test/index_no_duplicate_column.yamlsimilarity index 100%rename from plugin/advisor/pg/test/index_no_duplicate_column.yamlrename to backend/plugin/advisor/pg/test/index_no_duplicate_column.yamldiff --git a/plugin/advisor/pg/test/index_primary_key_type_allowlist.yaml b/backend/plugin/advisor/pg/test/index_primary_key_type_allowlist.yamlsimilarity index 100%rename from plugin/advisor/pg/test/index_primary_key_type_allowlist.yamlrename to backend/plugin/advisor/pg/test/index_primary_key_type_allowlist.yamldiff --git a/plugin/advisor/pg/test/index_total_number_limit.yaml b/backend/plugin/advisor/pg/test/index_total_number_limit.yamlsimilarity index 100%rename from plugin/advisor/pg/test/index_total_number_limit.yamlrename to backend/plugin/advisor/pg/test/index_total_number_limit.yamldiff --git a/plugin/advisor/pg/test/naming_column.yaml b/backend/plugin/advisor/pg/test/naming_column.yamlsimilarity index 100%rename from plugin/advisor/pg/test/naming_column.yamlrename to backend/plugin/advisor/pg/test/naming_column.yamldiff --git a/plugin/advisor/pg/test/naming_index_fk.yaml b/backend/plugin/advisor/pg/test/naming_index_fk.yamlsimilarity index 100%rename from plugin/advisor/pg/test/naming_index_fk.yamlrename to backend/plugin/advisor/pg/test/naming_index_fk.yamldiff --git a/plugin/advisor/pg/test/naming_index_idx.yaml b/backend/plugin/advisor/pg/test/naming_index_idx.yamlsimilarity index 100%rename from plugin/advisor/pg/test/naming_index_idx.yamlrename to backend/plugin/advisor/pg/test/naming_index_idx.yamldiff --git a/plugin/advisor/pg/test/naming_index_pk.yaml b/backend/plugin/advisor/pg/test/naming_index_pk.yamlsimilarity index 100%rename from plugin/advisor/pg/test/naming_index_pk.yamlrename to backend/plugin/advisor/pg/test/naming_index_pk.yamldiff --git a/plugin/advisor/pg/test/naming_index_uk.yaml b/backend/plugin/advisor/pg/test/naming_index_uk.yamlsimilarity index 100%rename from plugin/advisor/pg/test/naming_index_uk.yamlrename to backend/plugin/advisor/pg/test/naming_index_uk.yamldiff --git a/plugin/advisor/pg/test/naming_table.yaml b/backend/plugin/advisor/pg/test/naming_table.yamlsimilarity index 100%rename from plugin/advisor/pg/test/naming_table.yamlrename to backend/plugin/advisor/pg/test/naming_table.yamldiff --git a/plugin/advisor/pg/test/schema_backward_compatibility.yaml b/backend/plugin/advisor/pg/test/schema_backward_compatibility.yamlsimilarity index 100%rename from plugin/advisor/pg/test/schema_backward_compatibility.yamlrename to backend/plugin/advisor/pg/test/schema_backward_compatibility.yamldiff --git a/plugin/advisor/pg/test/statement_add_check_not_valid.yaml b/backend/plugin/advisor/pg/test/statement_add_check_not_valid.yamlsimilarity index 100%rename from plugin/advisor/pg/test/statement_add_check_not_valid.yamlrename to backend/plugin/advisor/pg/test/statement_add_check_not_valid.yamldiff --git a/plugin/advisor/pg/test/statement_affected_row_limit.yaml b/backend/plugin/advisor/pg/test/statement_affected_row_limit.yamlsimilarity index 100%rename from plugin/advisor/pg/test/statement_affected_row_limit.yamlrename to backend/plugin/advisor/pg/test/statement_affected_row_limit.yamldiff --git a/plugin/advisor/pg/test/statement_disallow_add_column_with_default.yaml b/backend/plugin/advisor/pg/test/statement_disallow_add_column_with_default.yamlsimilarity index 100%rename from plugin/advisor/pg/test/statement_disallow_add_column_with_default.yamlrename to backend/plugin/advisor/pg/test/statement_disallow_add_column_with_default.yamldiff --git a/plugin/advisor/pg/test/statement_disallow_add_not_null.yaml b/backend/plugin/advisor/pg/test/statement_disallow_add_not_null.yamlsimilarity index 100%rename from plugin/advisor/pg/test/statement_disallow_add_not_null.yamlrename to backend/plugin/advisor/pg/test/statement_disallow_add_not_null.yamldiff --git a/plugin/advisor/pg/test/statement_disallow_commit.yaml b/backend/plugin/advisor/pg/test/statement_disallow_commit.yamlsimilarity index 100%rename from plugin/advisor/pg/test/statement_disallow_commit.yamlrename to backend/plugin/advisor/pg/test/statement_disallow_commit.yamldiff --git a/plugin/advisor/pg/test/statement_dml_dry_run.yaml b/backend/plugin/advisor/pg/test/statement_dml_dry_run.yamlsimilarity index 100%rename from plugin/advisor/pg/test/statement_dml_dry_run.yamlrename to backend/plugin/advisor/pg/test/statement_dml_dry_run.yamldiff --git a/plugin/advisor/pg/test/statement_insert_disallow_order_by_rand.yaml b/backend/plugin/advisor/pg/test/statement_insert_disallow_order_by_rand.yamlsimilarity index 100%rename from plugin/advisor/pg/test/statement_insert_disallow_order_by_rand.yamlrename to backend/plugin/advisor/pg/test/statement_insert_disallow_order_by_rand.yamldiff --git a/plugin/advisor/pg/test/statement_insert_must_specify_column.yaml b/backend/plugin/advisor/pg/test/statement_insert_must_specify_column.yamlsimilarity index 100%rename from plugin/advisor/pg/test/statement_insert_must_specify_column.yamlrename to backend/plugin/advisor/pg/test/statement_insert_must_specify_column.yamldiff --git a/plugin/advisor/pg/test/statement_insert_row_limit.yaml b/backend/plugin/advisor/pg/test/statement_insert_row_limit.yamlsimilarity index 100%rename from plugin/advisor/pg/test/statement_insert_row_limit.yamlrename to backend/plugin/advisor/pg/test/statement_insert_row_limit.yamldiff --git a/plugin/advisor/pg/test/statement_merge_alter_table.yaml b/backend/plugin/advisor/pg/test/statement_merge_alter_table.yamlsimilarity index 100%rename from plugin/advisor/pg/test/statement_merge_alter_table.yamlrename to backend/plugin/advisor/pg/test/statement_merge_alter_table.yamldiff --git a/plugin/advisor/pg/test/statement_select_no_select_all.yaml b/backend/plugin/advisor/pg/test/statement_select_no_select_all.yamlsimilarity index 100%rename from plugin/advisor/pg/test/statement_select_no_select_all.yamlrename to backend/plugin/advisor/pg/test/statement_select_no_select_all.yamldiff --git a/plugin/advisor/pg/test/statement_where_no_leading_wildcard_like.yaml b/backend/plugin/advisor/pg/test/statement_where_no_leading_wildcard_like.yamlsimilarity index 100%rename from plugin/advisor/pg/test/statement_where_no_leading_wildcard_like.yamlrename to backend/plugin/advisor/pg/test/statement_where_no_leading_wildcard_like.yamldiff --git a/plugin/advisor/pg/test/statement_where_require.yaml b/backend/plugin/advisor/pg/test/statement_where_require.yamlsimilarity index 100%rename from plugin/advisor/pg/test/statement_where_require.yamlrename to backend/plugin/advisor/pg/test/statement_where_require.yamldiff --git a/plugin/advisor/pg/test/system_charset_allowlist.yaml b/backend/plugin/advisor/pg/test/system_charset_allowlist.yamlsimilarity index 100%rename from plugin/advisor/pg/test/system_charset_allowlist.yamlrename to backend/plugin/advisor/pg/test/system_charset_allowlist.yamldiff --git a/plugin/advisor/pg/test/system_collation_allowlist.yaml b/backend/plugin/advisor/pg/test/system_collation_allowlist.yamlsimilarity index 100%rename from plugin/advisor/pg/test/system_collation_allowlist.yamlrename to backend/plugin/advisor/pg/test/system_collation_allowlist.yamldiff --git a/plugin/advisor/pg/test/table_disallow_partition.yaml b/backend/plugin/advisor/pg/test/table_disallow_partition.yamlsimilarity index 100%rename from plugin/advisor/pg/test/table_disallow_partition.yamlrename to backend/plugin/advisor/pg/test/table_disallow_partition.yamldiff --git a/plugin/advisor/pg/test/table_drop_naming_convention.yaml b/backend/plugin/advisor/pg/test/table_drop_naming_convention.yamlsimilarity index 100%rename from plugin/advisor/pg/test/table_drop_naming_convention.yamlrename to backend/plugin/advisor/pg/test/table_drop_naming_convention.yamldiff --git a/plugin/advisor/pg/test/table_no_foreign_key.yaml b/backend/plugin/advisor/pg/test/table_no_foreign_key.yamlsimilarity index 100%rename from plugin/advisor/pg/test/table_no_foreign_key.yamlrename to backend/plugin/advisor/pg/test/table_no_foreign_key.yamldiff --git a/plugin/advisor/pg/test/table_require_pk.yaml b/backend/plugin/advisor/pg/test/table_require_pk.yamlsimilarity index 100%rename from plugin/advisor/pg/test/table_require_pk.yamlrename to backend/plugin/advisor/pg/test/table_require_pk.yamldiff --git a/plugin/advisor/pg/utils.go b/backend/plugin/advisor/pg/utils.gosimilarity index 93%rename from plugin/advisor/pg/utils.gorename to backend/plugin/advisor/pg/utils.goindex 7514c04d4b..e4ae1e56af 100644--- a/plugin/advisor/pg/utils.go+++ b/backend/plugin/advisor/pg/utils.go@@ -4,7 +4,7 @@ package pgimport ("fmt"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")const (diff --git a/plugin/advisor/sql_review.go b/backend/plugin/advisor/sql_review.gosimilarity index 99%rename from plugin/advisor/sql_review.gorename to backend/plugin/advisor/sql_review.goindex 84d13b09a8..7c597f69b0 100644--- a/plugin/advisor/sql_review.go+++ b/backend/plugin/advisor/sql_review.go@@ -9,8 +9,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/advisor/catalog"- "github.com/bytebase/bytebase/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor/catalog"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db")// How to add a SQL review rule:diff --git a/plugin/advisor/utils.go b/backend/plugin/advisor/utils.gosimilarity index 100%rename from plugin/advisor/utils.gorename to backend/plugin/advisor/utils.godiff --git a/plugin/advisor/utils_for_tests.go b/backend/plugin/advisor/utils_for_tests.gosimilarity index 98%rename from plugin/advisor/utils_for_tests.gorename to backend/plugin/advisor/utils_for_tests.goindex f9d97e2dfc..d0552a9d91 100644--- a/plugin/advisor/utils_for_tests.go+++ b/backend/plugin/advisor/utils_for_tests.go@@ -16,9 +16,9 @@ import ("github.com/stretchr/testify/require""gopkg.in/yaml.v3"- "github.com/bytebase/bytebase/plugin/advisor/catalog"- "github.com/bytebase/bytebase/plugin/advisor/db"- database "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor/catalog"+ "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ database "github.com/bytebase/bytebase/backend/plugin/db"storepb "github.com/bytebase/bytebase/proto/generated-go/store")diff --git a/plugin/app/feishu/feishu.go b/backend/plugin/app/feishu/feishu.gosimilarity index 99%rename from plugin/app/feishu/feishu.gorename to backend/plugin/app/feishu/feishu.goindex 8ba5ebecbf..98c2d11bf2 100644--- a/plugin/app/feishu/feishu.go+++ b/backend/plugin/app/feishu/feishu.go@@ -15,7 +15,7 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/common")// Response code definition in feishu response body.diff --git a/plugin/app/feishu/feishu_test.go b/backend/plugin/app/feishu/feishu_test.gosimilarity index 99%rename from plugin/app/feishu/feishu_test.gorename to backend/plugin/app/feishu/feishu_test.goindex eb1037adc7..c6dbbc1cb2 100644--- a/plugin/app/feishu/feishu_test.go+++ b/backend/plugin/app/feishu/feishu_test.go@@ -9,7 +9,7 @@ import ("github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/common")func TestProvider_CreateApprovalDefinition(t *testing.T) {diff --git a/plugin/db/clickhouse/clickhouse.go b/backend/plugin/db/clickhouse/clickhouse.gosimilarity index 95%rename from plugin/db/clickhouse/clickhouse.gorename to backend/plugin/db/clickhouse/clickhouse.goindex 38bb1fd980..a455c660fe 100644--- a/plugin/db/clickhouse/clickhouse.go+++ b/backend/plugin/db/clickhouse/clickhouse.go@@ -12,10 +12,10 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/util"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/util")var (diff --git a/plugin/db/clickhouse/clickhouse_migration_schema.sql b/backend/plugin/db/clickhouse/clickhouse_migration_schema.sqlsimilarity index 100%rename from plugin/db/clickhouse/clickhouse_migration_schema.sqlrename to backend/plugin/db/clickhouse/clickhouse_migration_schema.sqldiff --git a/plugin/db/clickhouse/dump.go b/backend/plugin/db/clickhouse/dump.gosimilarity index 98%rename from plugin/db/clickhouse/dump.gorename to backend/plugin/db/clickhouse/dump.goindex d3c7459615..56b9a51232 100644--- a/plugin/db/clickhouse/dump.go+++ b/backend/plugin/db/clickhouse/dump.go@@ -9,8 +9,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/db/util"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/db/util")// Dump and restore.diff --git a/plugin/db/clickhouse/migrate.go b/backend/plugin/db/clickhouse/migrate.gosimilarity index 97%rename from plugin/db/clickhouse/migrate.gorename to backend/plugin/db/clickhouse/migrate.goindex dc81bba32d..d8ea1bf3f9 100644--- a/plugin/db/clickhouse/migrate.go+++ b/backend/plugin/db/clickhouse/migrate.go@@ -11,10 +11,10 @@ import ("go.uber.org/zap"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/util"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/util")var (diff --git a/plugin/db/clickhouse/role.go b/backend/plugin/db/clickhouse/role.gosimilarity index 96%rename from plugin/db/clickhouse/role.gorename to backend/plugin/db/clickhouse/role.goindex 9f118ad838..06ac8dfb34 100644--- a/plugin/db/clickhouse/role.go+++ b/backend/plugin/db/clickhouse/role.go@@ -7,8 +7,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/util"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/util"storepb "github.com/bytebase/bytebase/proto/generated-go/store")diff --git a/plugin/db/clickhouse/sync.go b/backend/plugin/db/clickhouse/sync.gosimilarity index 97%rename from plugin/db/clickhouse/sync.gorename to backend/plugin/db/clickhouse/sync.goindex 1ffc3df82a..1851c6804c 100644--- a/plugin/db/clickhouse/sync.go+++ b/backend/plugin/db/clickhouse/sync.go@@ -9,8 +9,8 @@ import ("google.golang.org/protobuf/types/known/wrapperspb"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/util"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/util"storepb "github.com/bytebase/bytebase/proto/generated-go/store")diff --git a/plugin/db/driver.go b/backend/plugin/db/driver.gosimilarity index 99%rename from plugin/db/driver.gorename to backend/plugin/db/driver.goindex f031428fa4..238f8a2f5e 100644--- a/plugin/db/driver.go+++ b/backend/plugin/db/driver.go@@ -13,7 +13,7 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/vcs"+ "github.com/bytebase/bytebase/backend/plugin/vcs"storepb "github.com/bytebase/bytebase/proto/generated-go/store")diff --git a/plugin/db/driver_test.go b/backend/plugin/db/driver_test.gosimilarity index 100%rename from plugin/db/driver_test.gorename to backend/plugin/db/driver_test.godiff --git a/plugin/db/mongodb/collmod_migrationHistory_collection_command.json b/backend/plugin/db/mongodb/collmod_migrationHistory_collection_command.jsonsimilarity index 100%rename from plugin/db/mongodb/collmod_migrationHistory_collection_command.jsonrename to backend/plugin/db/mongodb/collmod_migrationHistory_collection_command.jsondiff --git a/plugin/db/mongodb/create_index_on_migrationHistory_collection_command.json b/backend/plugin/db/mongodb/create_index_on_migrationHistory_collection_command.jsonsimilarity index 100%rename from plugin/db/mongodb/create_index_on_migrationHistory_collection_command.jsonrename to backend/plugin/db/mongodb/create_index_on_migrationHistory_collection_command.jsondiff --git a/plugin/db/mongodb/migrate.go b/backend/plugin/db/mongodb/migrate.gosimilarity index 99%rename from plugin/db/mongodb/migrate.gorename to backend/plugin/db/mongodb/migrate.goindex 45853f807a..8ebdcff973 100644--- a/plugin/db/mongodb/migrate.go+++ b/backend/plugin/db/mongodb/migrate.go@@ -18,9 +18,9 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/util"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/util")const (diff --git a/plugin/db/mongodb/mongodb.go b/backend/plugin/db/mongodb/mongodb.gosimilarity index 98%rename from plugin/db/mongodb/mongodb.gorename to backend/plugin/db/mongodb/mongodb.goindex 4d30d5bb19..ac123ed0eb 100644--- a/plugin/db/mongodb/mongodb.go+++ b/backend/plugin/db/mongodb/mongodb.go@@ -16,8 +16,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/resources/mongoutil"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/resources/mongoutil")var (diff --git a/plugin/db/mongodb/mongodb_test.go b/backend/plugin/db/mongodb/mongodb_test.gosimilarity index 97%rename from plugin/db/mongodb/mongodb_test.gorename to backend/plugin/db/mongodb/mongodb_test.goindex edc1a4ef89..3e9e8f7b40 100644--- a/plugin/db/mongodb/mongodb_test.go+++ b/backend/plugin/db/mongodb/mongodb_test.go@@ -5,7 +5,7 @@ import ("github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db")func TestGetMongoDBConnectionURL(t *testing.T) {diff --git a/plugin/db/mongodb/role.go b/backend/plugin/db/mongodb/role.gosimilarity index 95%rename from plugin/db/mongodb/role.gorename to backend/plugin/db/mongodb/role.goindex 8cf6c0aa3a..c51a93f5fa 100644--- a/plugin/db/mongodb/role.go+++ b/backend/plugin/db/mongodb/role.go@@ -7,8 +7,8 @@ import ("github.com/pkg/errors""go.mongodb.org/mongo-driver/bson"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"storepb "github.com/bytebase/bytebase/proto/generated-go/store")diff --git a/plugin/db/mongodb/sync.go b/backend/plugin/db/mongodb/sync.gosimilarity index 98%rename from plugin/db/mongodb/sync.gorename to backend/plugin/db/mongodb/sync.goindex add1811ecb..c9f45bf75a 100644--- a/plugin/db/mongodb/sync.go+++ b/backend/plugin/db/mongodb/sync.go@@ -12,8 +12,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"storepb "github.com/bytebase/bytebase/proto/generated-go/store")diff --git a/plugin/db/mysql/binlog_stream_parser.go b/backend/plugin/db/mysql/binlog_stream_parser.gosimilarity index 100%rename from plugin/db/mysql/binlog_stream_parser.gorename to backend/plugin/db/mysql/binlog_stream_parser.godiff --git a/plugin/db/mysql/binlog_stream_parser_test.go b/backend/plugin/db/mysql/binlog_stream_parser_test.gosimilarity index 100%rename from plugin/db/mysql/binlog_stream_parser_test.gorename to backend/plugin/db/mysql/binlog_stream_parser_test.godiff --git a/plugin/db/mysql/dump.go b/backend/plugin/db/mysql/dump.gosimilarity index 98%rename from plugin/db/mysql/dump.gorename to backend/plugin/db/mysql/dump.goindex 0bcb38dcc6..cdeb56b3ac 100644--- a/plugin/db/mysql/dump.go+++ b/backend/plugin/db/mysql/dump.go@@ -16,11 +16,11 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db/util"- "github.com/bytebase/bytebase/resources/mysqlutil"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db/util"+ "github.com/bytebase/bytebase/backend/resources/mysqlutil")// Dump and restore.diff --git a/plugin/db/mysql/dump_test.go b/backend/plugin/db/mysql/dump_test.gosimilarity index 100%rename from plugin/db/mysql/dump_test.gorename to backend/plugin/db/mysql/dump_test.godiff --git a/plugin/db/mysql/migrate.go b/backend/plugin/db/mysql/migrate.gosimilarity index 97%rename from plugin/db/mysql/migrate.gorename to backend/plugin/db/mysql/migrate.goindex ef782ac690..1e95d5bd27 100644--- a/plugin/db/mysql/migrate.go+++ b/backend/plugin/db/mysql/migrate.go@@ -10,10 +10,10 @@ import ("go.uber.org/zap"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/util"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/util")var (diff --git a/plugin/db/mysql/mysql.go b/backend/plugin/db/mysql/mysql.gosimilarity index 96%rename from plugin/db/mysql/mysql.gorename to backend/plugin/db/mysql/mysql.goindex 71e61990ad..4e7b2dd779 100644--- a/plugin/db/mysql/mysql.go+++ b/backend/plugin/db/mysql/mysql.go@@ -13,11 +13,11 @@ import ("go.uber.org/multierr""go.uber.org/zap"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/util"- bbparser "github.com/bytebase/bytebase/plugin/parser"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/util"+ bbparser "github.com/bytebase/bytebase/backend/plugin/parser")var (diff --git a/plugin/db/mysql/mysql_migration_schema.sql b/backend/plugin/db/mysql/mysql_migration_schema.sqlsimilarity index 100%rename from plugin/db/mysql/mysql_migration_schema.sqlrename to backend/plugin/db/mysql/mysql_migration_schema.sqldiff --git a/plugin/db/mysql/mysql_test.go b/backend/plugin/db/mysql/mysql_test.gosimilarity index 100%rename from plugin/db/mysql/mysql_test.gorename to backend/plugin/db/mysql/mysql_test.godiff --git a/plugin/db/mysql/restore.go b/backend/plugin/db/mysql/restore.gosimilarity index 99%rename from plugin/db/mysql/restore.gorename to backend/plugin/db/mysql/restore.goindex e93e786358..d71dd6bdb5 100644--- a/plugin/db/mysql/restore.go+++ b/backend/plugin/db/mysql/restore.go@@ -28,12 +28,12 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db/util"- bbs3 "github.com/bytebase/bytebase/plugin/storage/s3"- "github.com/bytebase/bytebase/resources/mysqlutil"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db/util"+ bbs3 "github.com/bytebase/bytebase/backend/plugin/storage/s3"+ "github.com/bytebase/bytebase/backend/resources/mysqlutil""github.com/blang/semver/v4")diff --git a/plugin/db/mysql/restore_test.go b/backend/plugin/db/mysql/restore_test.gosimilarity index 99%rename from plugin/db/mysql/restore_test.gorename to backend/plugin/db/mysql/restore_test.goindex 89b5d654f6..145d45f0b6 100644--- a/plugin/db/mysql/restore_test.go+++ b/backend/plugin/db/mysql/restore_test.go@@ -9,8 +9,8 @@ import ("github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/plugin/db/util"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/plugin/db/util")func TestGetSafeName(t *testing.T) {diff --git a/plugin/db/mysql/role.go b/backend/plugin/db/mysql/role.gosimilarity index 96%rename from plugin/db/mysql/role.gorename to backend/plugin/db/mysql/role.goindex d70860a217..5ff3ffead6 100644--- a/plugin/db/mysql/role.go+++ b/backend/plugin/db/mysql/role.go@@ -7,8 +7,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/util"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/util"storepb "github.com/bytebase/bytebase/proto/generated-go/store")diff --git a/plugin/db/mysql/rollback.go b/backend/plugin/db/mysql/rollback.gosimilarity index 98%rename from plugin/db/mysql/rollback.gorename to backend/plugin/db/mysql/rollback.goindex e68d0f05fa..3245e46330 100644--- a/plugin/db/mysql/rollback.go+++ b/backend/plugin/db/mysql/rollback.go@@ -16,9 +16,9 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/common/log"- bbparser "github.com/bytebase/bytebase/plugin/parser"- "github.com/bytebase/bytebase/resources/mysqlutil"+ "github.com/bytebase/bytebase/backend/common/log"+ bbparser "github.com/bytebase/bytebase/backend/plugin/parser"+ "github.com/bytebase/bytebase/backend/resources/mysqlutil")var (diff --git a/plugin/db/mysql/rollback_test.go b/backend/plugin/db/mysql/rollback_test.gosimilarity index 100%rename from plugin/db/mysql/rollback_test.gorename to backend/plugin/db/mysql/rollback_test.godiff --git a/plugin/db/mysql/sync.go b/backend/plugin/db/mysql/sync.gosimilarity index 98%rename from plugin/db/mysql/sync.gorename to backend/plugin/db/mysql/sync.goindex 5be89d07af..f820683716 100644--- a/plugin/db/mysql/sync.go+++ b/backend/plugin/db/mysql/sync.go@@ -9,9 +9,9 @@ import ("google.golang.org/protobuf/types/known/wrapperspb"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/util"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/util"storepb "github.com/bytebase/bytebase/proto/generated-go/store")diff --git a/plugin/db/pg/dump.go b/backend/plugin/db/pg/dump.gosimilarity index 98%rename from plugin/db/pg/dump.gorename to backend/plugin/db/pg/dump.goindex 595ded4782..507f77e23d 100644--- a/plugin/db/pg/dump.go+++ b/backend/plugin/db/pg/dump.go@@ -11,8 +11,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/parser"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/parser")// Dump dumps the database.diff --git a/plugin/db/pg/migrate.go b/backend/plugin/db/pg/migrate.gosimilarity index 98%rename from plugin/db/pg/migrate.gorename to backend/plugin/db/pg/migrate.goindex 44cb5c160d..bc777bdd05 100644--- a/plugin/db/pg/migrate.go+++ b/backend/plugin/db/pg/migrate.go@@ -11,9 +11,9 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/util"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/util")var (diff --git a/plugin/db/pg/pg.go b/backend/plugin/db/pg/pg.gosimilarity index 98%rename from plugin/db/pg/pg.gorename to backend/plugin/db/pg/pg.goindex 64138ea024..304a379062 100644--- a/plugin/db/pg/pg.go+++ b/backend/plugin/db/pg/pg.go@@ -14,11 +14,11 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/util"- "github.com/bytebase/bytebase/plugin/parser"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/util"+ "github.com/bytebase/bytebase/backend/plugin/parser"storepb "github.com/bytebase/bytebase/proto/generated-go/store")diff --git a/plugin/db/pg/pg_migration_schema.sql b/backend/plugin/db/pg/pg_migration_schema.sqlsimilarity index 100%rename from plugin/db/pg/pg_migration_schema.sqlrename to backend/plugin/db/pg/pg_migration_schema.sqldiff --git a/plugin/db/pg/pg_test.go b/backend/plugin/db/pg/pg_test.gosimilarity index 100%rename from plugin/db/pg/pg_test.gorename to backend/plugin/db/pg/pg_test.godiff --git a/plugin/db/pg/role.go b/backend/plugin/db/pg/role.gosimilarity index 98%rename from plugin/db/pg/role.gorename to backend/plugin/db/pg/role.goindex 3c1aa7f49b..167475dd9a 100644--- a/plugin/db/pg/role.go+++ b/backend/plugin/db/pg/role.go@@ -6,9 +6,9 @@ import ("fmt""strings"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/util"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/util"storepb "github.com/bytebase/bytebase/proto/generated-go/store")diff --git a/plugin/db/pg/sync.go b/backend/plugin/db/pg/sync.gosimilarity index 99%rename from plugin/db/pg/sync.gorename to backend/plugin/db/pg/sync.goindex f8a44db777..f317c5d23b 100644--- a/plugin/db/pg/sync.go+++ b/backend/plugin/db/pg/sync.go@@ -11,9 +11,9 @@ import ("github.com/pkg/errors""google.golang.org/protobuf/types/known/wrapperspb"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/util"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/util"storepb "github.com/bytebase/bytebase/proto/generated-go/store")diff --git a/plugin/db/snowflake/dump.go b/backend/plugin/db/snowflake/dump.gosimilarity index 98%rename from plugin/db/snowflake/dump.gorename to backend/plugin/db/snowflake/dump.goindex e0d6b53f67..212b06c3c6 100644--- a/plugin/db/snowflake/dump.go+++ b/backend/plugin/db/snowflake/dump.go@@ -9,7 +9,7 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/db/util"+ "github.com/bytebase/bytebase/backend/plugin/db/util")// Dump and restore.diff --git a/plugin/db/snowflake/migrate.go b/backend/plugin/db/snowflake/migrate.gosimilarity index 97%rename from plugin/db/snowflake/migrate.gorename to backend/plugin/db/snowflake/migrate.goindex 87a2b21bd5..fdaf7f6055 100644--- a/plugin/db/snowflake/migrate.go+++ b/backend/plugin/db/snowflake/migrate.go@@ -10,10 +10,10 @@ import ("go.uber.org/zap"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/util"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/util")var (diff --git a/plugin/db/snowflake/role.go b/backend/plugin/db/snowflake/role.gosimilarity index 96%rename from plugin/db/snowflake/role.gorename to backend/plugin/db/snowflake/role.goindex d820517b86..64b7dc88cc 100644--- a/plugin/db/snowflake/role.go+++ b/backend/plugin/db/snowflake/role.go@@ -6,8 +6,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/util"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/util"storepb "github.com/bytebase/bytebase/proto/generated-go/store")diff --git a/plugin/db/snowflake/snowflake.go b/backend/plugin/db/snowflake/snowflake.gosimilarity index 97%rename from plugin/db/snowflake/snowflake.gorename to backend/plugin/db/snowflake/snowflake.goindex a81de40ac1..5f1de9b88b 100644--- a/plugin/db/snowflake/snowflake.go+++ b/backend/plugin/db/snowflake/snowflake.go@@ -9,10 +9,10 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/util"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/util"snow "github.com/snowflakedb/gosnowflake""go.uber.org/zap"diff --git a/plugin/db/snowflake/snowflake_migration_schema.sql b/backend/plugin/db/snowflake/snowflake_migration_schema.sqlsimilarity index 100%rename from plugin/db/snowflake/snowflake_migration_schema.sqlrename to backend/plugin/db/snowflake/snowflake_migration_schema.sqldiff --git a/plugin/db/snowflake/sync.go b/backend/plugin/db/snowflake/sync.gosimilarity index 98%rename from plugin/db/snowflake/sync.gorename to backend/plugin/db/snowflake/sync.goindex 3e8797d70e..cbad2f26f3 100644--- a/plugin/db/snowflake/sync.go+++ b/backend/plugin/db/snowflake/sync.go@@ -9,9 +9,9 @@ import ("google.golang.org/protobuf/types/known/wrapperspb"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/util"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/util"storepb "github.com/bytebase/bytebase/proto/generated-go/store")diff --git a/plugin/db/spanner/dump.go b/backend/plugin/db/spanner/dump.gosimilarity index 100%rename from plugin/db/spanner/dump.gorename to backend/plugin/db/spanner/dump.godiff --git a/plugin/db/spanner/migrate.go b/backend/plugin/db/spanner/migrate.gosimilarity index 98%rename from plugin/db/spanner/migrate.gorename to backend/plugin/db/spanner/migrate.goindex 65345ef70f..09e9a01fdb 100644--- a/plugin/db/spanner/migrate.go+++ b/backend/plugin/db/spanner/migrate.go@@ -14,10 +14,10 @@ import ("github.com/google/uuid""github.com/pkg/errors"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/util"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/util""google.golang.org/api/iterator""google.golang.org/grpc/codes"diff --git a/plugin/db/spanner/role.go b/backend/plugin/db/spanner/role.gosimilarity index 95%rename from plugin/db/spanner/role.gorename to backend/plugin/db/spanner/role.goindex 2395488b04..91571ee989 100644--- a/plugin/db/spanner/role.go+++ b/backend/plugin/db/spanner/role.go@@ -5,7 +5,7 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db")// CreateRole creates the role.diff --git a/plugin/db/spanner/spanner.go b/backend/plugin/db/spanner/spanner.gosimilarity index 99%rename from plugin/db/spanner/spanner.gorename to backend/plugin/db/spanner/spanner.goindex 8b1d66fc3d..cdd2fa163a 100644--- a/plugin/db/spanner/spanner.go+++ b/backend/plugin/db/spanner/spanner.go@@ -17,8 +17,8 @@ import (sppb "cloud.google.com/go/spanner/apiv1/spannerpb""github.com/pkg/errors"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db""google.golang.org/api/iterator""google.golang.org/api/option"diff --git a/plugin/db/spanner/spanner_migration_schema.sql b/backend/plugin/db/spanner/spanner_migration_schema.sqlsimilarity index 100%rename from plugin/db/spanner/spanner_migration_schema.sqlrename to backend/plugin/db/spanner/spanner_migration_schema.sqldiff --git a/plugin/db/spanner/spanner_test.go b/backend/plugin/db/spanner/spanner_test.gosimilarity index 100%rename from plugin/db/spanner/spanner_test.gorename to backend/plugin/db/spanner/spanner_test.godiff --git a/plugin/db/spanner/statement_parser.go b/backend/plugin/db/spanner/statement_parser.gosimilarity index 100%rename from plugin/db/spanner/statement_parser.gorename to backend/plugin/db/spanner/statement_parser.godiff --git a/plugin/db/spanner/statement_parser_test.go b/backend/plugin/db/spanner/statement_parser_test.gosimilarity index 100%rename from plugin/db/spanner/statement_parser_test.gorename to backend/plugin/db/spanner/statement_parser_test.godiff --git a/plugin/db/spanner/sync.go b/backend/plugin/db/spanner/sync.gosimilarity index 99%rename from plugin/db/spanner/sync.gorename to backend/plugin/db/spanner/sync.goindex 3cfa02c69c..c76837b1a4 100644--- a/plugin/db/spanner/sync.go+++ b/backend/plugin/db/spanner/sync.go@@ -11,8 +11,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/db"storepb "github.com/bytebase/bytebase/proto/generated-go/store")diff --git a/plugin/db/sqlite/dump.go b/backend/plugin/db/sqlite/dump.gosimilarity index 98%rename from plugin/db/sqlite/dump.gorename to backend/plugin/db/sqlite/dump.goindex 895f84ecbe..51f4010a92 100644--- a/plugin/db/sqlite/dump.go+++ b/backend/plugin/db/sqlite/dump.go@@ -9,7 +9,7 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/db/util"+ "github.com/bytebase/bytebase/backend/plugin/db/util")// Dump dumps the database.diff --git a/plugin/db/sqlite/migrate.go b/backend/plugin/db/sqlite/migrate.gosimilarity index 97%rename from plugin/db/sqlite/migrate.gorename to backend/plugin/db/sqlite/migrate.goindex 2abf041bfb..9307ca1371 100644--- a/plugin/db/sqlite/migrate.go+++ b/backend/plugin/db/sqlite/migrate.go@@ -12,10 +12,10 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/util"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/util")var (diff --git a/plugin/db/sqlite/role.go b/backend/plugin/db/sqlite/role.gosimilarity index 95%rename from plugin/db/sqlite/role.gorename to backend/plugin/db/sqlite/role.goindex 6716e982e1..951e40e693 100644--- a/plugin/db/sqlite/role.go+++ b/backend/plugin/db/sqlite/role.go@@ -5,7 +5,7 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db")// CreateRole creates the role.diff --git a/plugin/db/sqlite/sqlite.go b/backend/plugin/db/sqlite/sqlite.gosimilarity index 96%rename from plugin/db/sqlite/sqlite.gorename to backend/plugin/db/sqlite/sqlite.goindex 3d02053c31..798f0c83bb 100644--- a/plugin/db/sqlite/sqlite.go+++ b/backend/plugin/db/sqlite/sqlite.go@@ -14,9 +14,9 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/util"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/util")var (diff --git a/plugin/db/sqlite/sqlite_migration_schema.sql b/backend/plugin/db/sqlite/sqlite_migration_schema.sqlsimilarity index 100%rename from plugin/db/sqlite/sqlite_migration_schema.sqlrename to backend/plugin/db/sqlite/sqlite_migration_schema.sqldiff --git a/plugin/db/sqlite/sync.go b/backend/plugin/db/sqlite/sync.gosimilarity index 97%rename from plugin/db/sqlite/sync.gorename to backend/plugin/db/sqlite/sync.goindex c348db6c94..6071f4a627 100644--- a/plugin/db/sqlite/sync.go+++ b/backend/plugin/db/sqlite/sync.go@@ -9,9 +9,9 @@ import ("github.com/pkg/errors""google.golang.org/protobuf/types/known/wrapperspb"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/util"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/util"storepb "github.com/bytebase/bytebase/proto/generated-go/store")diff --git a/plugin/db/ssl.go b/backend/plugin/db/ssl.gosimilarity index 100%rename from plugin/db/ssl.gorename to backend/plugin/db/ssl.godiff --git a/plugin/db/util/driverutil.go b/backend/plugin/db/util/driverutil.gosimilarity index 99%rename from plugin/db/util/driverutil.gorename to backend/plugin/db/util/driverutil.goindex a495650050..e083f90532 100644--- a/plugin/db/util/driverutil.go+++ b/backend/plugin/db/util/driverutil.go@@ -23,9 +23,9 @@ import ("github.com/shopspring/decimal""go.uber.org/zap"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db")// FormatErrorWithQuery will format the error with failed query.diff --git a/plugin/db/util/driverutil_test.go b/backend/plugin/db/util/driverutil_test.gosimilarity index 99%rename from plugin/db/util/driverutil_test.gorename to backend/plugin/db/util/driverutil_test.goindex 1e6bdec8ce..679bf4c33d 100644--- a/plugin/db/util/driverutil_test.go+++ b/backend/plugin/db/util/driverutil_test.go@@ -9,7 +9,7 @@ import ("github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db"// Register pingcap parser driver._ "github.com/pingcap/tidb/types/parser_driver"diff --git a/plugin/db/util/mask_sensitive_data.go b/backend/plugin/db/util/mask_sensitive_data.gosimilarity index 99%rename from plugin/db/util/mask_sensitive_data.gorename to backend/plugin/db/util/mask_sensitive_data.goindex 52df461657..7912a25188 100644--- a/plugin/db/util/mask_sensitive_data.go+++ b/backend/plugin/db/util/mask_sensitive_data.go@@ -3,8 +3,8 @@ package utilimport ("strings"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/parser"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/parser""github.com/pkg/errors"diff --git a/plugin/db/util/restore.go b/backend/plugin/db/util/restore.gosimilarity index 100%rename from plugin/db/util/restore.gorename to backend/plugin/db/util/restore.godiff --git a/plugin/metric/collector.go b/backend/plugin/metric/collector.gosimilarity index 100%rename from plugin/metric/collector.gorename to backend/plugin/metric/collector.godiff --git a/plugin/metric/metric.go b/backend/plugin/metric/metric.gosimilarity index 100%rename from plugin/metric/metric.gorename to backend/plugin/metric/metric.godiff --git a/plugin/metric/reporter.go b/backend/plugin/metric/reporter.gosimilarity index 100%rename from plugin/metric/reporter.gorename to backend/plugin/metric/reporter.godiff --git a/plugin/metric/segment/reporter.go b/backend/plugin/metric/segment/reporter.gosimilarity index 96%rename from plugin/metric/segment/reporter.gorename to backend/plugin/metric/segment/reporter.goindex 01c80640ff..fc645c610b 100644--- a/plugin/metric/segment/reporter.go+++ b/backend/plugin/metric/segment/reporter.go@@ -4,7 +4,7 @@ package segmentimport ("time"- "github.com/bytebase/bytebase/plugin/metric"+ "github.com/bytebase/bytebase/backend/plugin/metric""github.com/segmentio/analytics-go")diff --git a/plugin/parser/ast/add_column_list_stmt.go b/backend/plugin/parser/ast/add_column_list_stmt.gosimilarity index 100%rename from plugin/parser/ast/add_column_list_stmt.gorename to backend/plugin/parser/ast/add_column_list_stmt.godiff --git a/plugin/parser/ast/add_constraint_stmt.go b/backend/plugin/parser/ast/add_constraint_stmt.gosimilarity index 100%rename from plugin/parser/ast/add_constraint_stmt.gorename to backend/plugin/parser/ast/add_constraint_stmt.godiff --git a/plugin/parser/ast/add_enum_label_stmt.go b/backend/plugin/parser/ast/add_enum_label_stmt.gosimilarity index 100%rename from plugin/parser/ast/add_enum_label_stmt.gorename to backend/plugin/parser/ast/add_enum_label_stmt.godiff --git a/plugin/parser/ast/alter_column_type_stmt.go b/backend/plugin/parser/ast/alter_column_type_stmt.gosimilarity index 100%rename from plugin/parser/ast/alter_column_type_stmt.gorename to backend/plugin/parser/ast/alter_column_type_stmt.godiff --git a/plugin/parser/ast/alter_sequence_stmt.go b/backend/plugin/parser/ast/alter_sequence_stmt.gosimilarity index 100%rename from plugin/parser/ast/alter_sequence_stmt.gorename to backend/plugin/parser/ast/alter_sequence_stmt.godiff --git a/plugin/parser/ast/alter_table_stmt.go b/backend/plugin/parser/ast/alter_table_stmt.gosimilarity index 100%rename from plugin/parser/ast/alter_table_stmt.gorename to backend/plugin/parser/ast/alter_table_stmt.godiff --git a/plugin/parser/ast/alter_type_stmt.go b/backend/plugin/parser/ast/alter_type_stmt.gosimilarity index 100%rename from plugin/parser/ast/alter_type_stmt.gorename to backend/plugin/parser/ast/alter_type_stmt.godiff --git a/plugin/parser/ast/attach_partition_stmt.go b/backend/plugin/parser/ast/attach_partition_stmt.gosimilarity index 100%rename from plugin/parser/ast/attach_partition_stmt.gorename to backend/plugin/parser/ast/attach_partition_stmt.godiff --git a/plugin/parser/ast/change_column_stmt.go b/backend/plugin/parser/ast/change_column_stmt.gosimilarity index 100%rename from plugin/parser/ast/change_column_stmt.gorename to backend/plugin/parser/ast/change_column_stmt.godiff --git a/plugin/parser/ast/character.go b/backend/plugin/parser/ast/character.gosimilarity index 100%rename from plugin/parser/ast/character.gorename to backend/plugin/parser/ast/character.godiff --git a/plugin/parser/ast/character_varying.go b/backend/plugin/parser/ast/character_varying.gosimilarity index 100%rename from plugin/parser/ast/character_varying.gorename to backend/plugin/parser/ast/character_varying.godiff --git a/plugin/parser/ast/column_def.go b/backend/plugin/parser/ast/column_def.gosimilarity index 100%rename from plugin/parser/ast/column_def.gorename to backend/plugin/parser/ast/column_def.godiff --git a/plugin/parser/ast/column_name_def.go b/backend/plugin/parser/ast/column_name_def.gosimilarity index 100%rename from plugin/parser/ast/column_name_def.gorename to backend/plugin/parser/ast/column_name_def.godiff --git a/plugin/parser/ast/comment_stmt.go b/backend/plugin/parser/ast/comment_stmt.gosimilarity index 100%rename from plugin/parser/ast/comment_stmt.gorename to backend/plugin/parser/ast/comment_stmt.godiff --git a/plugin/parser/ast/commit_stmt.go b/backend/plugin/parser/ast/commit_stmt.gosimilarity index 100%rename from plugin/parser/ast/commit_stmt.gorename to backend/plugin/parser/ast/commit_stmt.godiff --git a/plugin/parser/ast/constraint_def.go b/backend/plugin/parser/ast/constraint_def.gosimilarity index 100%rename from plugin/parser/ast/constraint_def.gorename to backend/plugin/parser/ast/constraint_def.godiff --git a/plugin/parser/ast/copy_stmt.go b/backend/plugin/parser/ast/copy_stmt.gosimilarity index 100%rename from plugin/parser/ast/copy_stmt.gorename to backend/plugin/parser/ast/copy_stmt.godiff --git a/plugin/parser/ast/create_database_stmt.go b/backend/plugin/parser/ast/create_database_stmt.gosimilarity index 100%rename from plugin/parser/ast/create_database_stmt.gorename to backend/plugin/parser/ast/create_database_stmt.godiff --git a/plugin/parser/ast/create_extension_stmt.go b/backend/plugin/parser/ast/create_extension_stmt.gosimilarity index 100%rename from plugin/parser/ast/create_extension_stmt.gorename to backend/plugin/parser/ast/create_extension_stmt.godiff --git a/plugin/parser/ast/create_function_stmt.go b/backend/plugin/parser/ast/create_function_stmt.gosimilarity index 100%rename from plugin/parser/ast/create_function_stmt.gorename to backend/plugin/parser/ast/create_function_stmt.godiff --git a/plugin/parser/ast/create_index_stmt.go b/backend/plugin/parser/ast/create_index_stmt.gosimilarity index 100%rename from plugin/parser/ast/create_index_stmt.gorename to backend/plugin/parser/ast/create_index_stmt.godiff --git a/plugin/parser/ast/create_schema_stmt.go b/backend/plugin/parser/ast/create_schema_stmt.gosimilarity index 100%rename from plugin/parser/ast/create_schema_stmt.gorename to backend/plugin/parser/ast/create_schema_stmt.godiff --git a/plugin/parser/ast/create_sequence_stmt.go b/backend/plugin/parser/ast/create_sequence_stmt.gosimilarity index 100%rename from plugin/parser/ast/create_sequence_stmt.gorename to backend/plugin/parser/ast/create_sequence_stmt.godiff --git a/plugin/parser/ast/create_table_stmt.go b/backend/plugin/parser/ast/create_table_stmt.gosimilarity index 100%rename from plugin/parser/ast/create_table_stmt.gorename to backend/plugin/parser/ast/create_table_stmt.godiff --git a/plugin/parser/ast/create_trigger_stmt.go b/backend/plugin/parser/ast/create_trigger_stmt.gosimilarity index 100%rename from plugin/parser/ast/create_trigger_stmt.gorename to backend/plugin/parser/ast/create_trigger_stmt.godiff --git a/plugin/parser/ast/create_type_stmt.go b/backend/plugin/parser/ast/create_type_stmt.gosimilarity index 100%rename from plugin/parser/ast/create_type_stmt.gorename to backend/plugin/parser/ast/create_type_stmt.godiff --git a/plugin/parser/ast/data_type.go b/backend/plugin/parser/ast/data_type.gosimilarity index 100%rename from plugin/parser/ast/data_type.gorename to backend/plugin/parser/ast/data_type.godiff --git a/plugin/parser/ast/database_option_def.go b/backend/plugin/parser/ast/database_option_def.gosimilarity index 100%rename from plugin/parser/ast/database_option_def.gorename to backend/plugin/parser/ast/database_option_def.godiff --git a/plugin/parser/ast/ddl_node.go b/backend/plugin/parser/ast/ddl_node.gosimilarity index 100%rename from plugin/parser/ast/ddl_node.gorename to backend/plugin/parser/ast/ddl_node.godiff --git a/plugin/parser/ast/decimal.go b/backend/plugin/parser/ast/decimal.gosimilarity index 100%rename from plugin/parser/ast/decimal.gorename to backend/plugin/parser/ast/decimal.godiff --git a/plugin/parser/ast/delete_stmt.go b/backend/plugin/parser/ast/delete_stmt.gosimilarity index 100%rename from plugin/parser/ast/delete_stmt.gorename to backend/plugin/parser/ast/delete_stmt.godiff --git a/plugin/parser/ast/dml_node.go b/backend/plugin/parser/ast/dml_node.gosimilarity index 100%rename from plugin/parser/ast/dml_node.gorename to backend/plugin/parser/ast/dml_node.godiff --git a/plugin/parser/ast/docs.go b/backend/plugin/parser/ast/docs.gosimilarity index 100%rename from plugin/parser/ast/docs.gorename to backend/plugin/parser/ast/docs.godiff --git a/plugin/parser/ast/drop_column_stmt.go b/backend/plugin/parser/ast/drop_column_stmt.gosimilarity index 100%rename from plugin/parser/ast/drop_column_stmt.gorename to backend/plugin/parser/ast/drop_column_stmt.godiff --git a/plugin/parser/ast/drop_constraint_stmt.go b/backend/plugin/parser/ast/drop_constraint_stmt.gosimilarity index 100%rename from plugin/parser/ast/drop_constraint_stmt.gorename to backend/plugin/parser/ast/drop_constraint_stmt.godiff --git a/plugin/parser/ast/drop_database_stmt.go b/backend/plugin/parser/ast/drop_database_stmt.gosimilarity index 100%rename from plugin/parser/ast/drop_database_stmt.gorename to backend/plugin/parser/ast/drop_database_stmt.godiff --git a/plugin/parser/ast/drop_default_stmt.go b/backend/plugin/parser/ast/drop_default_stmt.gosimilarity index 100%rename from plugin/parser/ast/drop_default_stmt.gorename to backend/plugin/parser/ast/drop_default_stmt.godiff --git a/plugin/parser/ast/drop_extension_stmt.go b/backend/plugin/parser/ast/drop_extension_stmt.gosimilarity index 100%rename from plugin/parser/ast/drop_extension_stmt.gorename to backend/plugin/parser/ast/drop_extension_stmt.godiff --git a/plugin/parser/ast/drop_function_stmt.go b/backend/plugin/parser/ast/drop_function_stmt.gosimilarity index 100%rename from plugin/parser/ast/drop_function_stmt.gorename to backend/plugin/parser/ast/drop_function_stmt.godiff --git a/plugin/parser/ast/drop_index_stmt.go b/backend/plugin/parser/ast/drop_index_stmt.gosimilarity index 100%rename from plugin/parser/ast/drop_index_stmt.gorename to backend/plugin/parser/ast/drop_index_stmt.godiff --git a/plugin/parser/ast/drop_not_null_stmt.go b/backend/plugin/parser/ast/drop_not_null_stmt.gosimilarity index 100%rename from plugin/parser/ast/drop_not_null_stmt.gorename to backend/plugin/parser/ast/drop_not_null_stmt.godiff --git a/plugin/parser/ast/drop_schema_stmt.go b/backend/plugin/parser/ast/drop_schema_stmt.gosimilarity index 100%rename from plugin/parser/ast/drop_schema_stmt.gorename to backend/plugin/parser/ast/drop_schema_stmt.godiff --git a/plugin/parser/ast/drop_sequence_stmt.go b/backend/plugin/parser/ast/drop_sequence_stmt.gosimilarity index 100%rename from plugin/parser/ast/drop_sequence_stmt.gorename to backend/plugin/parser/ast/drop_sequence_stmt.godiff --git a/plugin/parser/ast/drop_table_stmt.go b/backend/plugin/parser/ast/drop_table_stmt.gosimilarity index 100%rename from plugin/parser/ast/drop_table_stmt.gorename to backend/plugin/parser/ast/drop_table_stmt.godiff --git a/plugin/parser/ast/drop_trigger_stmt.go b/backend/plugin/parser/ast/drop_trigger_stmt.gosimilarity index 100%rename from plugin/parser/ast/drop_trigger_stmt.gorename to backend/plugin/parser/ast/drop_trigger_stmt.godiff --git a/plugin/parser/ast/drop_type_stmt.go b/backend/plugin/parser/ast/drop_type_stmt.gosimilarity index 100%rename from plugin/parser/ast/drop_type_stmt.gorename to backend/plugin/parser/ast/drop_type_stmt.godiff --git a/plugin/parser/ast/enum_type_def.go b/backend/plugin/parser/ast/enum_type_def.gosimilarity index 100%rename from plugin/parser/ast/enum_type_def.gorename to backend/plugin/parser/ast/enum_type_def.godiff --git a/plugin/parser/ast/explain_stmt.go b/backend/plugin/parser/ast/explain_stmt.gosimilarity index 100%rename from plugin/parser/ast/explain_stmt.gorename to backend/plugin/parser/ast/explain_stmt.godiff --git a/plugin/parser/ast/expression_def.go b/backend/plugin/parser/ast/expression_def.gosimilarity index 100%rename from plugin/parser/ast/expression_def.gorename to backend/plugin/parser/ast/expression_def.godiff --git a/plugin/parser/ast/float.go b/backend/plugin/parser/ast/float.gosimilarity index 100%rename from plugin/parser/ast/float.gorename to backend/plugin/parser/ast/float.godiff --git a/plugin/parser/ast/foreign_def.go b/backend/plugin/parser/ast/foreign_def.gosimilarity index 100%rename from plugin/parser/ast/foreign_def.gorename to backend/plugin/parser/ast/foreign_def.godiff --git a/plugin/parser/ast/function_def.go b/backend/plugin/parser/ast/function_def.gosimilarity index 100%rename from plugin/parser/ast/function_def.gorename to backend/plugin/parser/ast/function_def.godiff --git a/plugin/parser/ast/index_def.go b/backend/plugin/parser/ast/index_def.gosimilarity index 100%rename from plugin/parser/ast/index_def.gorename to backend/plugin/parser/ast/index_def.godiff --git a/plugin/parser/ast/index_key_def.go b/backend/plugin/parser/ast/index_key_def.gosimilarity index 100%rename from plugin/parser/ast/index_key_def.gorename to backend/plugin/parser/ast/index_key_def.godiff --git a/plugin/parser/ast/insert_stmt.go b/backend/plugin/parser/ast/insert_stmt.gosimilarity index 100%rename from plugin/parser/ast/insert_stmt.gorename to backend/plugin/parser/ast/insert_stmt.godiff --git a/plugin/parser/ast/integer.go b/backend/plugin/parser/ast/integer.gosimilarity index 100%rename from plugin/parser/ast/integer.gorename to backend/plugin/parser/ast/integer.godiff --git a/plugin/parser/ast/node.go b/backend/plugin/parser/ast/node.gosimilarity index 100%rename from plugin/parser/ast/node.gorename to backend/plugin/parser/ast/node.godiff --git a/plugin/parser/ast/pattern_like_def.go b/backend/plugin/parser/ast/pattern_like_def.gosimilarity index 100%rename from plugin/parser/ast/pattern_like_def.gorename to backend/plugin/parser/ast/pattern_like_def.godiff --git a/plugin/parser/ast/referential_action_def.go b/backend/plugin/parser/ast/referential_action_def.gosimilarity index 100%rename from plugin/parser/ast/referential_action_def.gorename to backend/plugin/parser/ast/referential_action_def.godiff --git a/plugin/parser/ast/rename_column_stmt.go b/backend/plugin/parser/ast/rename_column_stmt.gosimilarity index 100%rename from plugin/parser/ast/rename_column_stmt.gorename to backend/plugin/parser/ast/rename_column_stmt.godiff --git a/plugin/parser/ast/rename_constraint_stmt.go b/backend/plugin/parser/ast/rename_constraint_stmt.gosimilarity index 100%rename from plugin/parser/ast/rename_constraint_stmt.gorename to backend/plugin/parser/ast/rename_constraint_stmt.godiff --git a/plugin/parser/ast/rename_index_stmt.go b/backend/plugin/parser/ast/rename_index_stmt.gosimilarity index 100%rename from plugin/parser/ast/rename_index_stmt.gorename to backend/plugin/parser/ast/rename_index_stmt.godiff --git a/plugin/parser/ast/rename_schema_stmt.go b/backend/plugin/parser/ast/rename_schema_stmt.gosimilarity index 100%rename from plugin/parser/ast/rename_schema_stmt.gorename to backend/plugin/parser/ast/rename_schema_stmt.godiff --git a/plugin/parser/ast/rename_table_stmt.go b/backend/plugin/parser/ast/rename_table_stmt.gosimilarity index 100%rename from plugin/parser/ast/rename_table_stmt.gorename to backend/plugin/parser/ast/rename_table_stmt.godiff --git a/plugin/parser/ast/role_spec.go b/backend/plugin/parser/ast/role_spec.gosimilarity index 100%rename from plugin/parser/ast/role_spec.gorename to backend/plugin/parser/ast/role_spec.godiff --git a/plugin/parser/ast/select_stmt.go b/backend/plugin/parser/ast/select_stmt.gosimilarity index 100%rename from plugin/parser/ast/select_stmt.gorename to backend/plugin/parser/ast/select_stmt.godiff --git a/plugin/parser/ast/sequence_def.go b/backend/plugin/parser/ast/sequence_def.gosimilarity index 100%rename from plugin/parser/ast/sequence_def.gorename to backend/plugin/parser/ast/sequence_def.godiff --git a/plugin/parser/ast/serial.go b/backend/plugin/parser/ast/serial.gosimilarity index 100%rename from plugin/parser/ast/serial.gorename to backend/plugin/parser/ast/serial.godiff --git a/plugin/parser/ast/set_default_stmt.go b/backend/plugin/parser/ast/set_default_stmt.gosimilarity index 100%rename from plugin/parser/ast/set_default_stmt.gorename to backend/plugin/parser/ast/set_default_stmt.godiff --git a/plugin/parser/ast/set_not_null_stmt.go b/backend/plugin/parser/ast/set_not_null_stmt.gosimilarity index 100%rename from plugin/parser/ast/set_not_null_stmt.gorename to backend/plugin/parser/ast/set_not_null_stmt.godiff --git a/plugin/parser/ast/set_schema_stmt.go b/backend/plugin/parser/ast/set_schema_stmt.gosimilarity index 100%rename from plugin/parser/ast/set_schema_stmt.gorename to backend/plugin/parser/ast/set_schema_stmt.godiff --git a/plugin/parser/ast/string_def.go b/backend/plugin/parser/ast/string_def.gosimilarity index 100%rename from plugin/parser/ast/string_def.gorename to backend/plugin/parser/ast/string_def.godiff --git a/plugin/parser/ast/subquery_def.go b/backend/plugin/parser/ast/subquery_def.gosimilarity index 100%rename from plugin/parser/ast/subquery_def.gorename to backend/plugin/parser/ast/subquery_def.godiff --git a/plugin/parser/ast/table_def.go b/backend/plugin/parser/ast/table_def.gosimilarity index 100%rename from plugin/parser/ast/table_def.gorename to backend/plugin/parser/ast/table_def.godiff --git a/plugin/parser/ast/text.go b/backend/plugin/parser/ast/text.gosimilarity index 100%rename from plugin/parser/ast/text.gorename to backend/plugin/parser/ast/text.godiff --git a/plugin/parser/ast/trigger_def.go b/backend/plugin/parser/ast/trigger_def.gosimilarity index 100%rename from plugin/parser/ast/trigger_def.gorename to backend/plugin/parser/ast/trigger_def.godiff --git a/plugin/parser/ast/unconverted_data_type.go b/backend/plugin/parser/ast/unconverted_data_type.gosimilarity index 100%rename from plugin/parser/ast/unconverted_data_type.gorename to backend/plugin/parser/ast/unconverted_data_type.godiff --git a/plugin/parser/ast/unconverted_expression_def.go b/backend/plugin/parser/ast/unconverted_expression_def.gosimilarity index 100%rename from plugin/parser/ast/unconverted_expression_def.gorename to backend/plugin/parser/ast/unconverted_expression_def.godiff --git a/plugin/parser/ast/unconverted_stmt.go b/backend/plugin/parser/ast/unconverted_stmt.gosimilarity index 100%rename from plugin/parser/ast/unconverted_stmt.gorename to backend/plugin/parser/ast/unconverted_stmt.godiff --git a/plugin/parser/ast/update_stmt.go b/backend/plugin/parser/ast/update_stmt.gosimilarity index 100%rename from plugin/parser/ast/update_stmt.gorename to backend/plugin/parser/ast/update_stmt.godiff --git a/plugin/parser/ast/utils.go b/backend/plugin/parser/ast/utils.gosimilarity index 100%rename from plugin/parser/ast/utils.gorename to backend/plugin/parser/ast/utils.godiff --git a/plugin/parser/differ/differ.go b/backend/plugin/parser/differ/differ.gosimilarity index 95%rename from plugin/parser/differ/differ.gorename to backend/plugin/parser/differ/differ.goindex bec4aa8d6a..4949be6dd2 100644--- a/plugin/parser/differ/differ.go+++ b/backend/plugin/parser/differ/differ.go@@ -6,7 +6,7 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/parser"+ "github.com/bytebase/bytebase/backend/plugin/parser")// SchemaDiffer is the interface for schema differ.diff --git a/plugin/parser/differ/mysql/column_test.go b/backend/plugin/parser/differ/mysql/column_test.gosimilarity index 100%rename from plugin/parser/differ/mysql/column_test.gorename to backend/plugin/parser/differ/mysql/column_test.godiff --git a/plugin/parser/differ/mysql/constraint_test.go b/backend/plugin/parser/differ/mysql/constraint_test.gosimilarity index 100%rename from plugin/parser/differ/mysql/constraint_test.gorename to backend/plugin/parser/differ/mysql/constraint_test.godiff --git a/plugin/parser/differ/mysql/differ.go b/backend/plugin/parser/differ/mysql/differ.gosimilarity index 99%rename from plugin/parser/differ/mysql/differ.gorename to backend/plugin/parser/differ/mysql/differ.goindex 8e3a39f502..5db20f2c24 100644--- a/plugin/parser/differ/mysql/differ.go+++ b/backend/plugin/parser/differ/mysql/differ.go@@ -10,7 +10,7 @@ import ("go.uber.org/zap"- "github.com/bytebase/bytebase/common/log"+ "github.com/bytebase/bytebase/backend/common/log""github.com/pingcap/tidb/parser""github.com/pingcap/tidb/parser/ast"@@ -19,9 +19,9 @@ import ("github.com/pingcap/tidb/types""github.com/pkg/errors"- bbparser "github.com/bytebase/bytebase/plugin/parser"+ bbparser "github.com/bytebase/bytebase/backend/plugin/parser"- "github.com/bytebase/bytebase/plugin/parser/differ"+ "github.com/bytebase/bytebase/backend/plugin/parser/differ"// Register pingcap parser driver.driver "github.com/pingcap/tidb/types/parser_driver"diff --git a/plugin/parser/differ/mysql/differ_test.go b/backend/plugin/parser/differ/mysql/differ_test.gosimilarity index 100%rename from plugin/parser/differ/mysql/differ_test.gorename to backend/plugin/parser/differ/mysql/differ_test.godiff --git a/plugin/parser/differ/mysql/table_test.go b/backend/plugin/parser/differ/mysql/table_test.gosimilarity index 100%rename from plugin/parser/differ/mysql/table_test.gorename to backend/plugin/parser/differ/mysql/table_test.godiff --git a/plugin/parser/differ/mysql/utils.go b/backend/plugin/parser/differ/mysql/utils.gosimilarity index 100%rename from plugin/parser/differ/mysql/utils.gorename to backend/plugin/parser/differ/mysql/utils.godiff --git a/plugin/parser/differ/mysql/utils_test.go b/backend/plugin/parser/differ/mysql/utils_test.gosimilarity index 100%rename from plugin/parser/differ/mysql/utils_test.gorename to backend/plugin/parser/differ/mysql/utils_test.godiff --git a/plugin/parser/differ/pg/differ.go b/backend/plugin/parser/differ/pg/differ.gosimilarity index 99%rename from plugin/parser/differ/pg/differ.gorename to backend/plugin/parser/differ/pg/differ.goindex 5b20845751..91322a370e 100644--- a/plugin/parser/differ/pg/differ.go+++ b/backend/plugin/parser/differ/pg/differ.go@@ -8,9 +8,9 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/parser"- "github.com/bytebase/bytebase/plugin/parser/ast"- "github.com/bytebase/bytebase/plugin/parser/differ"+ "github.com/bytebase/bytebase/backend/plugin/parser"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/parser/differ")var (diff --git a/plugin/parser/differ/pg/differ_test.go b/backend/plugin/parser/differ/pg/differ_test.gosimilarity index 95%rename from plugin/parser/differ/pg/differ_test.gorename to backend/plugin/parser/differ/pg/differ_test.goindex 206d26e58d..66bf8dc23c 100644--- a/plugin/parser/differ/pg/differ_test.go+++ b/backend/plugin/parser/differ/pg/differ_test.go@@ -10,7 +10,7 @@ import ("gopkg.in/yaml.v3"// Register PostgreSQL parser engine.- _ "github.com/bytebase/bytebase/plugin/parser/engine/pg"+ _ "github.com/bytebase/bytebase/backend/plugin/parser/engine/pg")type DifferTestData struct {diff --git a/plugin/parser/differ/pg/test-data/test_differ_constraint.yaml b/backend/plugin/parser/differ/pg/test-data/test_differ_constraint.yamlsimilarity index 100%rename from plugin/parser/differ/pg/test-data/test_differ_constraint.yamlrename to backend/plugin/parser/differ/pg/test-data/test_differ_constraint.yamldiff --git a/plugin/parser/differ/pg/test-data/test_differ_data.yaml b/backend/plugin/parser/differ/pg/test-data/test_differ_data.yamlsimilarity index 100%rename from plugin/parser/differ/pg/test-data/test_differ_data.yamlrename to backend/plugin/parser/differ/pg/test-data/test_differ_data.yamldiff --git a/plugin/parser/differ/pg/test-data/test_differ_merge.yaml b/backend/plugin/parser/differ/pg/test-data/test_differ_merge.yamlsimilarity index 100%rename from plugin/parser/differ/pg/test-data/test_differ_merge.yamlrename to backend/plugin/parser/differ/pg/test-data/test_differ_merge.yamldiff --git a/plugin/parser/differ/pg/test-data/test_differ_schema.yaml b/backend/plugin/parser/differ/pg/test-data/test_differ_schema.yamlsimilarity index 100%rename from plugin/parser/differ/pg/test-data/test_differ_schema.yamlrename to backend/plugin/parser/differ/pg/test-data/test_differ_schema.yamldiff --git a/plugin/parser/differ/pg/test-data/test_differ_sequence.yaml b/backend/plugin/parser/differ/pg/test-data/test_differ_sequence.yamlsimilarity index 100%rename from plugin/parser/differ/pg/test-data/test_differ_sequence.yamlrename to backend/plugin/parser/differ/pg/test-data/test_differ_sequence.yamldiff --git a/plugin/parser/edit/edit.go b/backend/plugin/parser/edit/edit.gosimilarity index 94%rename from plugin/parser/edit/edit.gorename to backend/plugin/parser/edit/edit.goindex caae3d6672..b6962a4948 100644--- a/plugin/parser/edit/edit.go+++ b/backend/plugin/parser/edit/edit.go@@ -6,8 +6,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/plugin/parser"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/plugin/parser")// SchemaEditor is the interface for schema editor.diff --git a/plugin/parser/edit/mysql/deparse.go b/backend/plugin/parser/edit/mysql/deparse.gosimilarity index 99%rename from plugin/parser/edit/mysql/deparse.gorename to backend/plugin/parser/edit/mysql/deparse.goindex e42de114db..1214834b0b 100644--- a/plugin/parser/edit/mysql/deparse.go+++ b/backend/plugin/parser/edit/mysql/deparse.go@@ -12,7 +12,7 @@ import ("github.com/pingcap/tidb/types""github.com/pkg/errors"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")// DeparseDatabaseEdit deparses DatabaseEdit to DDL statement.diff --git a/plugin/parser/edit/mysql/deparse_test.go b/backend/plugin/parser/edit/mysql/deparse_test.gosimilarity index 99%rename from plugin/parser/edit/mysql/deparse_test.gorename to backend/plugin/parser/edit/mysql/deparse_test.goindex f76d04a325..1d0a4f0599 100644--- a/plugin/parser/edit/mysql/deparse_test.go+++ b/backend/plugin/parser/edit/mysql/deparse_test.go@@ -5,7 +5,7 @@ import ("github.com/stretchr/testify/assert"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api"// Register pingcap parser driver._ "github.com/pingcap/tidb/types/parser_driver"diff --git a/plugin/parser/edit/mysql/edit.go b/backend/plugin/parser/edit/mysql/edit.gosimilarity index 69%rename from plugin/parser/edit/mysql/edit.gorename to backend/plugin/parser/edit/mysql/edit.goindex 47cf02a35d..dcef5f2c95 100644--- a/plugin/parser/edit/mysql/edit.go+++ b/backend/plugin/parser/edit/mysql/edit.go@@ -2,9 +2,9 @@package mysqlimport (- bbparser "github.com/bytebase/bytebase/plugin/parser"+ bbparser "github.com/bytebase/bytebase/backend/plugin/parser"- "github.com/bytebase/bytebase/plugin/parser/edit"+ "github.com/bytebase/bytebase/backend/plugin/parser/edit")var (diff --git a/plugin/parser/edit/mysql/validate.go b/backend/plugin/parser/edit/mysql/validate.gosimilarity index 98%rename from plugin/parser/edit/mysql/validate.gorename to backend/plugin/parser/edit/mysql/validate.goindex b5f7af9ba9..f2e75f460e 100644--- a/plugin/parser/edit/mysql/validate.go+++ b/backend/plugin/parser/edit/mysql/validate.go@@ -5,7 +5,7 @@ import ("github.com/pingcap/tidb/parser/mysql"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")// ValidateDatabaseEdit validates the api message DatabaseEdit, including related column type.diff --git a/plugin/parser/edit/mysql/validate_test.go b/backend/plugin/parser/edit/mysql/validate_test.gosimilarity index 98%rename from plugin/parser/edit/mysql/validate_test.gorename to backend/plugin/parser/edit/mysql/validate_test.goindex 6d74863867..620d40a082 100644--- a/plugin/parser/edit/mysql/validate_test.go+++ b/backend/plugin/parser/edit/mysql/validate_test.go@@ -5,7 +5,7 @@ import ("github.com/stretchr/testify/assert"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")func TestValidateDatabaseEditColumnType(t *testing.T) {diff --git a/plugin/parser/edit/pg/deparse.go b/backend/plugin/parser/edit/pg/deparse.gosimilarity index 98%rename from plugin/parser/edit/pg/deparse.gorename to backend/plugin/parser/edit/pg/deparse.goindex b8346c195e..ec09983fb0 100644--- a/plugin/parser/edit/pg/deparse.go+++ b/backend/plugin/parser/edit/pg/deparse.go@@ -6,9 +6,9 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/plugin/parser"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/plugin/parser"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")// DeparseContext is the context including walkthrough nodes and comment statements.diff --git a/plugin/parser/edit/pg/deparse_test.go b/backend/plugin/parser/edit/pg/deparse_test.gosimilarity index 99%rename from plugin/parser/edit/pg/deparse_test.gorename to backend/plugin/parser/edit/pg/deparse_test.goindex 339694b41e..4a422a3fd9 100644--- a/plugin/parser/edit/pg/deparse_test.go+++ b/backend/plugin/parser/edit/pg/deparse_test.go@@ -5,10 +5,10 @@ import ("github.com/stretchr/testify/assert"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api"// Register PostgreSQL parser engine.- _ "github.com/bytebase/bytebase/plugin/parser/engine/pg"+ _ "github.com/bytebase/bytebase/backend/plugin/parser/engine/pg")func TestDeparseRenameSchema(t *testing.T) {diff --git a/plugin/parser/edit/pg/edit.go b/backend/plugin/parser/edit/pg/edit.gosimilarity index 69%rename from plugin/parser/edit/pg/edit.gorename to backend/plugin/parser/edit/pg/edit.goindex 9840f80f6c..5ab79ed82f 100644--- a/plugin/parser/edit/pg/edit.go+++ b/backend/plugin/parser/edit/pg/edit.go@@ -2,9 +2,9 @@package pgimport (- bbparser "github.com/bytebase/bytebase/plugin/parser"+ bbparser "github.com/bytebase/bytebase/backend/plugin/parser"- "github.com/bytebase/bytebase/plugin/parser/edit"+ "github.com/bytebase/bytebase/backend/plugin/parser/edit")var (diff --git a/plugin/parser/edit/pg/validate.go b/backend/plugin/parser/edit/pg/validate.gosimilarity index 87%rename from plugin/parser/edit/pg/validate.gorename to backend/plugin/parser/edit/pg/validate.goindex b55c34f1ea..de65a587d4 100644--- a/plugin/parser/edit/pg/validate.go+++ b/backend/plugin/parser/edit/pg/validate.go@@ -1,7 +1,7 @@package pgimport (- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")// ValidateDatabaseEdit validates the api message DatabaseEdit, including related column type.diff --git a/plugin/parser/edit/pg/validate_test.go b/backend/plugin/parser/edit/pg/validate_test.gosimilarity index 91%rename from plugin/parser/edit/pg/validate_test.gorename to backend/plugin/parser/edit/pg/validate_test.goindex ddad9d4ba7..37695f2fa6 100644--- a/plugin/parser/edit/pg/validate_test.go+++ b/backend/plugin/parser/edit/pg/validate_test.go@@ -5,7 +5,7 @@ import ("github.com/stretchr/testify/assert"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")func TestValidateDatabaseEditColumnType(t *testing.T) {diff --git a/plugin/parser/engine/pg/convert.go b/backend/plugin/parser/engine/pg/convert.gosimilarity index 99%rename from plugin/parser/engine/pg/convert.gorename to backend/plugin/parser/engine/pg/convert.goindex b69d6c2a26..14a9c0e999 100644--- a/plugin/parser/engine/pg/convert.go+++ b/backend/plugin/parser/engine/pg/convert.go@@ -8,8 +8,8 @@ import (pgquery "github.com/pganalyze/pg_query_go/v2""github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/parser"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/parser"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")// convert converts the pg_query.Node to ast.Node.diff --git a/plugin/parser/engine/pg/convert_test.go b/backend/plugin/parser/engine/pg/convert_test.gosimilarity index 99%rename from plugin/parser/engine/pg/convert_test.gorename to backend/plugin/parser/engine/pg/convert_test.goindex ecce185be4..920a2fe745 100644--- a/plugin/parser/engine/pg/convert_test.go+++ b/backend/plugin/parser/engine/pg/convert_test.go@@ -5,8 +5,8 @@ import ("github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/plugin/parser"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/parser"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")type testData struct {diff --git a/plugin/parser/engine/pg/data_type_test.go b/backend/plugin/parser/engine/pg/data_type_test.gosimilarity index 91%rename from plugin/parser/engine/pg/data_type_test.gorename to backend/plugin/parser/engine/pg/data_type_test.goindex 1bbb1393f4..c180a84568 100644--- a/plugin/parser/engine/pg/data_type_test.go+++ b/backend/plugin/parser/engine/pg/data_type_test.go@@ -6,8 +6,8 @@ import ("github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/plugin/parser"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/parser"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")func TestEquivalentType(t *testing.T) {diff --git a/plugin/parser/engine/pg/deparse.go b/backend/plugin/parser/engine/pg/deparse.gosimilarity index 99%rename from plugin/parser/engine/pg/deparse.gorename to backend/plugin/parser/engine/pg/deparse.goindex ad281536b3..3db786db06 100644--- a/plugin/parser/engine/pg/deparse.go+++ b/backend/plugin/parser/engine/pg/deparse.go@@ -7,8 +7,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/parser"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/parser"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")func deparse(context parser.DeparseContext, in ast.Node, buf *strings.Builder) error {diff --git a/plugin/parser/engine/pg/deparse_test.go b/backend/plugin/parser/engine/pg/deparse_test.gosimilarity index 97%rename from plugin/parser/engine/pg/deparse_test.gorename to backend/plugin/parser/engine/pg/deparse_test.goindex b6af8781c5..fb5b3877d2 100644--- a/plugin/parser/engine/pg/deparse_test.go+++ b/backend/plugin/parser/engine/pg/deparse_test.go@@ -9,7 +9,7 @@ import ("github.com/stretchr/testify/require""gopkg.in/yaml.v3"- "github.com/bytebase/bytebase/plugin/parser"+ "github.com/bytebase/bytebase/backend/plugin/parser")// TestDeparseData is the test data struct.diff --git a/plugin/parser/engine/pg/empty_for_release.go b/backend/plugin/parser/engine/pg/empty_for_release.gosimilarity index 100%rename from plugin/parser/engine/pg/empty_for_release.gorename to backend/plugin/parser/engine/pg/empty_for_release.godiff --git a/plugin/parser/engine/pg/parser.go b/backend/plugin/parser/engine/pg/parser.gosimilarity index 93%rename from plugin/parser/engine/pg/parser.gorename to backend/plugin/parser/engine/pg/parser.goindex 7235bbe58f..c0356ed792 100644--- a/plugin/parser/engine/pg/parser.go+++ b/backend/plugin/parser/engine/pg/parser.go@@ -7,8 +7,8 @@ import (pgquery "github.com/pganalyze/pg_query_go/v2""github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/parser"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/parser"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")var (diff --git a/plugin/parser/engine/pg/test-data/test_alter_sequence_data.yaml b/backend/plugin/parser/engine/pg/test-data/test_alter_sequence_data.yamlsimilarity index 100%rename from plugin/parser/engine/pg/test-data/test_alter_sequence_data.yamlrename to backend/plugin/parser/engine/pg/test-data/test_alter_sequence_data.yamldiff --git a/plugin/parser/engine/pg/test-data/test_alter_table_data.yaml b/backend/plugin/parser/engine/pg/test-data/test_alter_table_data.yamlsimilarity index 100%rename from plugin/parser/engine/pg/test-data/test_alter_table_data.yamlrename to backend/plugin/parser/engine/pg/test-data/test_alter_table_data.yamldiff --git a/plugin/parser/engine/pg/test-data/test_create_index_data.yaml b/backend/plugin/parser/engine/pg/test-data/test_create_index_data.yamlsimilarity index 100%rename from plugin/parser/engine/pg/test-data/test_create_index_data.yamlrename to backend/plugin/parser/engine/pg/test-data/test_create_index_data.yamldiff --git a/plugin/parser/engine/pg/test-data/test_create_schema_data.yaml b/backend/plugin/parser/engine/pg/test-data/test_create_schema_data.yamlsimilarity index 100%rename from plugin/parser/engine/pg/test-data/test_create_schema_data.yamlrename to backend/plugin/parser/engine/pg/test-data/test_create_schema_data.yamldiff --git a/plugin/parser/engine/pg/test-data/test_create_sequence_data.yaml b/backend/plugin/parser/engine/pg/test-data/test_create_sequence_data.yamlsimilarity index 100%rename from plugin/parser/engine/pg/test-data/test_create_sequence_data.yamlrename to backend/plugin/parser/engine/pg/test-data/test_create_sequence_data.yamldiff --git a/plugin/parser/engine/pg/test-data/test_create_table_data.yaml b/backend/plugin/parser/engine/pg/test-data/test_create_table_data.yamlsimilarity index 100%rename from plugin/parser/engine/pg/test-data/test_create_table_data.yamlrename to backend/plugin/parser/engine/pg/test-data/test_create_table_data.yamldiff --git a/plugin/parser/engine/pg/test-data/test_drop_index_data.yaml b/backend/plugin/parser/engine/pg/test-data/test_drop_index_data.yamlsimilarity index 100%rename from plugin/parser/engine/pg/test-data/test_drop_index_data.yamlrename to backend/plugin/parser/engine/pg/test-data/test_drop_index_data.yamldiff --git a/plugin/parser/engine/pg/test-data/test_drop_schema_data.yaml b/backend/plugin/parser/engine/pg/test-data/test_drop_schema_data.yamlsimilarity index 100%rename from plugin/parser/engine/pg/test-data/test_drop_schema_data.yamlrename to backend/plugin/parser/engine/pg/test-data/test_drop_schema_data.yamldiff --git a/plugin/parser/engine/pg/test-data/test_drop_sequence_data.yaml b/backend/plugin/parser/engine/pg/test-data/test_drop_sequence_data.yamlsimilarity index 100%rename from plugin/parser/engine/pg/test-data/test_drop_sequence_data.yamlrename to backend/plugin/parser/engine/pg/test-data/test_drop_sequence_data.yamldiff --git a/plugin/parser/engine/pg/test-data/test_drop_table_data.yaml b/backend/plugin/parser/engine/pg/test-data/test_drop_table_data.yamlsimilarity index 100%rename from plugin/parser/engine/pg/test-data/test_drop_table_data.yamlrename to backend/plugin/parser/engine/pg/test-data/test_drop_table_data.yamldiff --git a/plugin/parser/engine/pg/test-data/test_extension_data.yaml b/backend/plugin/parser/engine/pg/test-data/test_extension_data.yamlsimilarity index 100%rename from plugin/parser/engine/pg/test-data/test_extension_data.yamlrename to backend/plugin/parser/engine/pg/test-data/test_extension_data.yamldiff --git a/plugin/parser/engine/pg/test-data/test_function_data.yaml b/backend/plugin/parser/engine/pg/test-data/test_function_data.yamlsimilarity index 100%rename from plugin/parser/engine/pg/test-data/test_function_data.yamlrename to backend/plugin/parser/engine/pg/test-data/test_function_data.yamldiff --git a/plugin/parser/engine/pg/test-data/test_rename_schema_data.yaml b/backend/plugin/parser/engine/pg/test-data/test_rename_schema_data.yamlsimilarity index 100%rename from plugin/parser/engine/pg/test-data/test_rename_schema_data.yamlrename to backend/plugin/parser/engine/pg/test-data/test_rename_schema_data.yamldiff --git a/plugin/parser/engine/pg/test-data/test_trigger_data.yaml b/backend/plugin/parser/engine/pg/test-data/test_trigger_data.yamlsimilarity index 100%rename from plugin/parser/engine/pg/test-data/test_trigger_data.yamlrename to backend/plugin/parser/engine/pg/test-data/test_trigger_data.yamldiff --git a/plugin/parser/engine/pg/test-data/test_type_data.yaml b/backend/plugin/parser/engine/pg/test-data/test_type_data.yamlsimilarity index 100%rename from plugin/parser/engine/pg/test-data/test_type_data.yamlrename to backend/plugin/parser/engine/pg/test-data/test_type_data.yamldiff --git a/plugin/parser/error.go b/backend/plugin/parser/error.gosimilarity index 100%rename from plugin/parser/error.gorename to backend/plugin/parser/error.godiff --git a/plugin/parser/parser.go b/backend/plugin/parser/parser.gosimilarity index 97%rename from plugin/parser/parser.gorename to backend/plugin/parser/parser.goindex 3235e00c8a..1314237655 100644--- a/plugin/parser/parser.go+++ b/backend/plugin/parser/parser.go@@ -7,7 +7,7 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")// EngineType is the type of a parser engine.diff --git a/plugin/parser/set_line_for_create_table_test.go b/backend/plugin/parser/set_line_for_create_table_test.gosimilarity index 96%rename from plugin/parser/set_line_for_create_table_test.gorename to backend/plugin/parser/set_line_for_create_table_test.goindex ee304d60ac..4d7ef15944 100644--- a/plugin/parser/set_line_for_create_table_test.go+++ b/backend/plugin/parser/set_line_for_create_table_test.go@@ -8,11 +8,11 @@ import (tidbast "github.com/pingcap/tidb/parser/ast""github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/plugin/parser"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/parser"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast"// Register postgres parser driver.- _ "github.com/bytebase/bytebase/plugin/parser/engine/pg"+ _ "github.com/bytebase/bytebase/backend/plugin/parser/engine/pg"// Register pingcap parser driver._ "github.com/pingcap/tidb/types/parser_driver")diff --git a/plugin/parser/split_multi_sql_test.go b/backend/plugin/parser/split_multi_sql_test.gosimilarity index 100%rename from plugin/parser/split_multi_sql_test.gorename to backend/plugin/parser/split_multi_sql_test.godiff --git a/plugin/parser/tokenizer.go b/backend/plugin/parser/tokenizer.gosimilarity index 99%rename from plugin/parser/tokenizer.gorename to backend/plugin/parser/tokenizer.goindex 2037e4b62a..b10add7133 100644--- a/plugin/parser/tokenizer.go+++ b/backend/plugin/parser/tokenizer.go@@ -9,7 +9,7 @@ import (tidbast "github.com/pingcap/tidb/parser/ast""github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")const (diff --git a/plugin/parser/transform/mysql/transform.go b/backend/plugin/parser/transform/mysql/transform.gosimilarity index 96%rename from plugin/parser/transform/mysql/transform.gorename to backend/plugin/parser/transform/mysql/transform.goindex 91049afc52..1bcc97e285 100644--- a/plugin/parser/transform/mysql/transform.go+++ b/backend/plugin/parser/transform/mysql/transform.go@@ -10,9 +10,9 @@ import ("github.com/pingcap/tidb/parser/model""github.com/pkg/errors"- bbparser "github.com/bytebase/bytebase/plugin/parser"+ bbparser "github.com/bytebase/bytebase/backend/plugin/parser"- "github.com/bytebase/bytebase/plugin/parser/transform"+ "github.com/bytebase/bytebase/backend/plugin/parser/transform"// Register pingcap parser driver._ "github.com/pingcap/tidb/types/parser_driver")diff --git a/plugin/parser/transform/mysql/transform_test.go b/backend/plugin/parser/transform/mysql/transform_test.gosimilarity index 100%rename from plugin/parser/transform/mysql/transform_test.gorename to backend/plugin/parser/transform/mysql/transform_test.godiff --git a/plugin/parser/transform/transform.go b/backend/plugin/parser/transform/transform.gosimilarity index 95%rename from plugin/parser/transform/transform.gorename to backend/plugin/parser/transform/transform.goindex 5b6e03c782..eb486fd625 100644--- a/plugin/parser/transform/transform.go+++ b/backend/plugin/parser/transform/transform.go@@ -6,7 +6,7 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/parser"+ "github.com/bytebase/bytebase/backend/plugin/parser")// SchemaTransformer is the interface for schema transformer.diff --git a/plugin/parser/utils.go b/backend/plugin/parser/utils.gosimilarity index 99%rename from plugin/parser/utils.gorename to backend/plugin/parser/utils.goindex 2e8a8edc42..4bade4835f 100644--- a/plugin/parser/utils.go+++ b/backend/plugin/parser/utils.go@@ -13,7 +13,7 @@ import ("github.com/pingcap/tidb/parser/model""github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast")// SingleSQL is a separate SQL split from multi-SQL.diff --git a/plugin/parser/utils_test.go b/backend/plugin/parser/utils_test.gosimilarity index 100%rename from plugin/parser/utils_test.gorename to backend/plugin/parser/utils_test.godiff --git a/plugin/storage/s3/s3.go b/backend/plugin/storage/s3/s3.gosimilarity index 100%rename from plugin/storage/s3/s3.gorename to backend/plugin/storage/s3/s3.godiff --git a/plugin/storage/s3/s3_test.go b/backend/plugin/storage/s3/s3_test.gosimilarity index 96%rename from plugin/storage/s3/s3_test.gorename to backend/plugin/storage/s3/s3_test.goindex 72b579b8a1..fe433aca2f 100644--- a/plugin/storage/s3/s3_test.go+++ b/backend/plugin/storage/s3/s3_test.go@@ -10,7 +10,7 @@ import ("github.com/stretchr/testify/require""go.uber.org/zap"- "github.com/bytebase/bytebase/common/log"+ "github.com/bytebase/bytebase/backend/common/log")const (diff --git a/plugin/vcs/CODENOTIFY b/backend/plugin/vcs/CODENOTIFYsimilarity index 100%rename from plugin/vcs/CODENOTIFYrename to backend/plugin/vcs/CODENOTIFYdiff --git a/plugin/vcs/github/bytebase-sql-review.yml b/backend/plugin/vcs/github/bytebase-sql-review.ymlsimilarity index 100%rename from plugin/vcs/github/bytebase-sql-review.ymlrename to backend/plugin/vcs/github/bytebase-sql-review.ymldiff --git a/plugin/vcs/github/github.go b/backend/plugin/vcs/github/github.gosimilarity index 99%rename from plugin/vcs/github/github.gorename to backend/plugin/vcs/github/github.goindex 2a5e04502c..3f499f09cb 100644--- a/plugin/vcs/github/github.go+++ b/backend/plugin/vcs/github/github.go@@ -21,10 +21,10 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/vcs"- "github.com/bytebase/bytebase/plugin/vcs/internal/oauth"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/vcs"+ "github.com/bytebase/bytebase/backend/plugin/vcs/internal/oauth")const (diff --git a/plugin/vcs/github/github_test.go b/backend/plugin/vcs/github/github_test.gosimilarity index 99%rename from plugin/vcs/github/github_test.gorename to backend/plugin/vcs/github/github_test.goindex 35ed4b7a1a..ff251dba7f 100644--- a/plugin/vcs/github/github_test.go+++ b/backend/plugin/vcs/github/github_test.go@@ -11,9 +11,9 @@ import ("github.com/stretchr/testify/assert""github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/vcs"- "github.com/bytebase/bytebase/plugin/vcs/internal/oauth"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/vcs"+ "github.com/bytebase/bytebase/backend/plugin/vcs/internal/oauth")func TestProvider_FetchUserInfo(t *testing.T) {diff --git a/plugin/vcs/github/sql_review.go b/backend/plugin/vcs/github/sql_review.gosimilarity index 91%rename from plugin/vcs/github/sql_review.gorename to backend/plugin/vcs/github/sql_review.goindex 49f04172e3..966c7b1c1b 100644--- a/plugin/vcs/github/sql_review.go+++ b/backend/plugin/vcs/github/sql_review.go@@ -4,7 +4,7 @@ import (_ "embed""fmt"- "github.com/bytebase/bytebase/plugin/vcs"+ "github.com/bytebase/bytebase/backend/plugin/vcs")// sqlReviewAction is the GitHub action for SQL review in VCS workflow.diff --git a/plugin/vcs/gitlab/bytebase-sql-review.yml b/backend/plugin/vcs/gitlab/bytebase-sql-review.ymlsimilarity index 100%rename from plugin/vcs/gitlab/bytebase-sql-review.ymlrename to backend/plugin/vcs/gitlab/bytebase-sql-review.ymldiff --git a/plugin/vcs/gitlab/gitlab.go b/backend/plugin/vcs/gitlab/gitlab.gosimilarity index 99%rename from plugin/vcs/gitlab/gitlab.gorename to backend/plugin/vcs/gitlab/gitlab.goindex eda585524b..259ebd923c 100644--- a/plugin/vcs/gitlab/gitlab.go+++ b/backend/plugin/vcs/gitlab/gitlab.go@@ -15,9 +15,9 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/vcs"- "github.com/bytebase/bytebase/plugin/vcs/internal/oauth"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/vcs"+ "github.com/bytebase/bytebase/backend/plugin/vcs/internal/oauth")const (diff --git a/plugin/vcs/gitlab/gitlab_test.go b/backend/plugin/vcs/gitlab/gitlab_test.gosimilarity index 99%rename from plugin/vcs/gitlab/gitlab_test.gorename to backend/plugin/vcs/gitlab/gitlab_test.goindex c14884bbc8..5d61c090be 100644--- a/plugin/vcs/gitlab/gitlab_test.go+++ b/backend/plugin/vcs/gitlab/gitlab_test.go@@ -11,9 +11,9 @@ import ("github.com/stretchr/testify/assert""github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/vcs"- "github.com/bytebase/bytebase/plugin/vcs/internal/oauth"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/vcs"+ "github.com/bytebase/bytebase/backend/plugin/vcs/internal/oauth")func TestProvider_FetchUserInfo(t *testing.T) {diff --git a/plugin/vcs/gitlab/sql_review.go b/backend/plugin/vcs/gitlab/sql_review.gosimilarity index 97%rename from plugin/vcs/gitlab/sql_review.gorename to backend/plugin/vcs/gitlab/sql_review.goindex db17cb635d..09cc52657d 100644--- a/plugin/vcs/gitlab/sql_review.go+++ b/backend/plugin/vcs/gitlab/sql_review.go@@ -6,7 +6,7 @@ import ("gopkg.in/yaml.v3"- "github.com/bytebase/bytebase/plugin/vcs"+ "github.com/bytebase/bytebase/backend/plugin/vcs")const (diff --git a/plugin/vcs/gitlab/sql_review_test.go b/backend/plugin/vcs/gitlab/sql_review_test.gosimilarity index 100%rename from plugin/vcs/gitlab/sql_review_test.gorename to backend/plugin/vcs/gitlab/sql_review_test.godiff --git a/plugin/vcs/internal/oauth/oauth.go b/backend/plugin/vcs/internal/oauth/oauth.gosimilarity index 100%rename from plugin/vcs/internal/oauth/oauth.gorename to backend/plugin/vcs/internal/oauth/oauth.godiff --git a/plugin/vcs/internal/oauth/oauth_test.go b/backend/plugin/vcs/internal/oauth/oauth_test.gosimilarity index 98%rename from plugin/vcs/internal/oauth/oauth_test.gorename to backend/plugin/vcs/internal/oauth/oauth_test.goindex d54ba90496..014df5e3d0 100644--- a/plugin/vcs/internal/oauth/oauth_test.go+++ b/backend/plugin/vcs/internal/oauth/oauth_test.go@@ -11,7 +11,7 @@ import ("github.com/stretchr/testify/assert""github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/common")func TestPost(t *testing.T) {diff --git a/plugin/vcs/util.go b/backend/plugin/vcs/util.gosimilarity index 98%rename from plugin/vcs/util.gorename to backend/plugin/vcs/util.goindex b8cc08625e..99805d1b17 100644--- a/plugin/vcs/util.go+++ b/backend/plugin/vcs/util.go@@ -7,7 +7,7 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/common/log"+ "github.com/bytebase/bytebase/backend/common/log")// Branch is the helper function returns the branch name from reference name.diff --git a/plugin/vcs/util_test.go b/backend/plugin/vcs/util_test.gosimilarity index 100%rename from plugin/vcs/util_test.gorename to backend/plugin/vcs/util_test.godiff --git a/plugin/vcs/vcs.go b/backend/plugin/vcs/vcs.gosimilarity index 99%rename from plugin/vcs/vcs.gorename to backend/plugin/vcs/vcs.goindex 6640ac0d83..2df497514d 100644--- a/plugin/vcs/vcs.go+++ b/backend/plugin/vcs/vcs.go@@ -10,7 +10,7 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/common")// Type is the type of a VCS.diff --git a/plugin/vcs/vcs_test.go b/backend/plugin/vcs/vcs_test.gosimilarity index 100%rename from plugin/vcs/vcs_test.gorename to backend/plugin/vcs/vcs_test.godiff --git a/plugin/webhook/custom.go b/backend/plugin/webhook/custom.gosimilarity index 100%rename from plugin/webhook/custom.gorename to backend/plugin/webhook/custom.godiff --git a/plugin/webhook/dingtalk.go b/backend/plugin/webhook/dingtalk.gosimilarity index 100%rename from plugin/webhook/dingtalk.gorename to backend/plugin/webhook/dingtalk.godiff --git a/plugin/webhook/discord.go b/backend/plugin/webhook/discord.gosimilarity index 100%rename from plugin/webhook/discord.gorename to backend/plugin/webhook/discord.godiff --git a/plugin/webhook/feishu.go b/backend/plugin/webhook/feishu.gosimilarity index 100%rename from plugin/webhook/feishu.gorename to backend/plugin/webhook/feishu.godiff --git a/plugin/webhook/slack.go b/backend/plugin/webhook/slack.gosimilarity index 100%rename from plugin/webhook/slack.gorename to backend/plugin/webhook/slack.godiff --git a/plugin/webhook/teams.go b/backend/plugin/webhook/teams.gosimilarity index 100%rename from plugin/webhook/teams.gorename to backend/plugin/webhook/teams.godiff --git a/plugin/webhook/webhook.go b/backend/plugin/webhook/webhook.gosimilarity index 98%rename from plugin/webhook/webhook.gorename to backend/plugin/webhook/webhook.goindex 069c9ac76a..2bb6321b32 100644--- a/plugin/webhook/webhook.go+++ b/backend/plugin/webhook/webhook.go@@ -7,7 +7,7 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/common")var (diff --git a/plugin/webhook/webhook_test.go b/backend/plugin/webhook/webhook_test.gosimilarity index 97%rename from plugin/webhook/webhook_test.gorename to backend/plugin/webhook/webhook_test.goindex 04cc3ee0c6..fd5cc2ca00 100644--- a/plugin/webhook/webhook_test.go+++ b/backend/plugin/webhook/webhook_test.go@@ -6,7 +6,7 @@ import ("github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/common")func TestContext_getMetaList(t *testing.T) {diff --git a/plugin/webhook/wecom.go b/backend/plugin/webhook/wecom.gosimilarity index 100%rename from plugin/webhook/wecom.gorename to backend/plugin/webhook/wecom.godiff --git a/resources/README.md b/backend/resources/README.mdsimilarity index 100%rename from resources/README.mdrename to backend/resources/README.mddiff --git a/resources/mongoutil/mongoutil.go b/backend/resources/mongoutil/mongoutil.gosimilarity index 95%rename from resources/mongoutil/mongoutil.gorename to backend/resources/mongoutil/mongoutil.goindex a3f19da447..74ec8fe543 100644--- a/resources/mongoutil/mongoutil.go+++ b/backend/resources/mongoutil/mongoutil.go@@ -10,8 +10,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/resources/utils"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/resources/utils")// nolintdiff --git a/resources/mongoutil/resources_darwin_amd64.go b/backend/resources/mongoutil/resources_darwin_amd64.gosimilarity index 100%rename from resources/mongoutil/resources_darwin_amd64.gorename to backend/resources/mongoutil/resources_darwin_amd64.godiff --git a/resources/mongoutil/resources_darwin_arm64.go b/backend/resources/mongoutil/resources_darwin_arm64.gosimilarity index 100%rename from resources/mongoutil/resources_darwin_arm64.gorename to backend/resources/mongoutil/resources_darwin_arm64.godiff --git a/resources/mongoutil/resources_linux_amd64.go b/backend/resources/mongoutil/resources_linux_amd64.gosimilarity index 100%rename from resources/mongoutil/resources_linux_amd64.gorename to backend/resources/mongoutil/resources_linux_amd64.godiff --git a/resources/mysql/fetch_mysql.sh b/backend/resources/mysql/fetch_mysql.shsimilarity index 100%rename from resources/mysql/fetch_mysql.shrename to backend/resources/mysql/fetch_mysql.shdiff --git a/resources/mysql/mysql.go b/backend/resources/mysql/mysql.gosimilarity index 99%rename from resources/mysql/mysql.gorename to backend/resources/mysql/mysql.goindex 53ed8f12a1..9f482f072a 100644--- a/resources/mysql/mysql.go+++ b/backend/resources/mysql/mysql.go@@ -18,7 +18,7 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/resources/utils"+ "github.com/bytebase/bytebase/backend/resources/utils"// install mysql driver._ "github.com/go-sql-driver/mysql"diff --git a/resources/mysql/resources_darwin.go b/backend/resources/mysql/resources_darwin.gosimilarity index 100%rename from resources/mysql/resources_darwin.gorename to backend/resources/mysql/resources_darwin.godiff --git a/resources/mysql/resources_linux.go b/backend/resources/mysql/resources_linux.gosimilarity index 100%rename from resources/mysql/resources_linux.gorename to backend/resources/mysql/resources_linux.godiff --git a/resources/mysqlutil/mysqlutil.go b/backend/resources/mysqlutil/mysqlutil.gosimilarity index 97%rename from resources/mysqlutil/mysqlutil.gorename to backend/resources/mysqlutil/mysqlutil.goindex e167eb79cd..e34180c203 100644--- a/resources/mysqlutil/mysqlutil.go+++ b/backend/resources/mysqlutil/mysqlutil.go@@ -13,8 +13,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/resources/utils"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/resources/utils")type binaryName stringdiff --git a/resources/mysqlutil/mysqlutil_test.go b/backend/resources/mysqlutil/mysqlutil_test.gosimilarity index 100%rename from resources/mysqlutil/mysqlutil_test.gorename to backend/resources/mysqlutil/mysqlutil_test.godiff --git a/resources/mysqlutil/resources_darwin_amd64.go b/backend/resources/mysqlutil/resources_darwin_amd64.gosimilarity index 100%rename from resources/mysqlutil/resources_darwin_amd64.gorename to backend/resources/mysqlutil/resources_darwin_amd64.godiff --git a/resources/mysqlutil/resources_darwin_arm64.go b/backend/resources/mysqlutil/resources_darwin_arm64.gosimilarity index 100%rename from resources/mysqlutil/resources_darwin_arm64.gorename to backend/resources/mysqlutil/resources_darwin_arm64.godiff --git a/resources/mysqlutil/resources_linux_amd64.go b/backend/resources/mysqlutil/resources_linux_amd64.gosimilarity index 100%rename from resources/mysqlutil/resources_linux_amd64.gorename to backend/resources/mysqlutil/resources_linux_amd64.godiff --git a/resources/mysqlutil/resources_linux_arm64.go b/backend/resources/mysqlutil/resources_linux_arm64.gosimilarity index 100%rename from resources/mysqlutil/resources_linux_arm64.gorename to backend/resources/mysqlutil/resources_linux_arm64.godiff --git a/resources/postgres/postgres.go b/backend/resources/postgres/postgres.gosimilarity index 98%rename from resources/postgres/postgres.gorename to backend/resources/postgres/postgres.goindex 9e0d3af1a7..319471d463 100644--- a/resources/postgres/postgres.go+++ b/backend/resources/postgres/postgres.go@@ -17,9 +17,9 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/resources/utils"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/resources/utils")// isPgDump15 returns true if the pg_dump binary is version 15.diff --git a/resources/postgres/resources_darwin.go b/backend/resources/postgres/resources_darwin.gosimilarity index 100%rename from resources/postgres/resources_darwin.gorename to backend/resources/postgres/resources_darwin.godiff --git a/resources/postgres/resources_linux_amd64.go b/backend/resources/postgres/resources_linux_amd64.gosimilarity index 100%rename from resources/postgres/resources_linux_amd64.gorename to backend/resources/postgres/resources_linux_amd64.godiff --git a/resources/postgres/resources_linux_arm64.go b/backend/resources/postgres/resources_linux_arm64.gosimilarity index 100%rename from resources/postgres/resources_linux_arm64.gorename to backend/resources/postgres/resources_linux_arm64.godiff --git a/resources/utils/extract.go b/backend/resources/utils/extract.gosimilarity index 100%rename from resources/utils/extract.gorename to backend/resources/utils/extract.godiff --git a/server/CODENOTIFY b/backend/server/CODENOTIFYsimilarity index 100%rename from server/CODENOTIFYrename to backend/server/CODENOTIFYdiff --git a/server/acl.go b/backend/server/acl.gosimilarity index 99%rename from server/acl.gorename to backend/server/acl.goindex 0e174901a4..105b5346c3 100644--- a/server/acl.go+++ b/backend/server/acl.go@@ -14,9 +14,9 @@ import ("github.com/labstack/echo/v4"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/store")const (diff --git a/server/acl_casbin_model.conf b/backend/server/acl_casbin_model.confsimilarity index 100%rename from server/acl_casbin_model.confrename to backend/server/acl_casbin_model.confdiff --git a/server/acl_casbin_policy_dba.csv b/backend/server/acl_casbin_policy_dba.csvsimilarity index 100%rename from server/acl_casbin_policy_dba.csvrename to backend/server/acl_casbin_policy_dba.csvdiff --git a/server/acl_casbin_policy_developer.csv b/backend/server/acl_casbin_policy_developer.csvsimilarity index 100%rename from server/acl_casbin_policy_developer.csvrename to backend/server/acl_casbin_policy_developer.csvdiff --git a/server/acl_casbin_policy_owner.csv b/backend/server/acl_casbin_policy_owner.csvsimilarity index 100%rename from server/acl_casbin_policy_owner.csvrename to backend/server/acl_casbin_policy_owner.csvdiff --git a/server/acl_project_test.go b/backend/server/acl_project_test.gosimilarity index 99%rename from server/acl_project_test.gorename to backend/server/acl_project_test.goindex 43b8ec6e5e..1e7646a414 100644--- a/server/acl_project_test.go+++ b/backend/server/acl_project_test.go@@ -4,8 +4,8 @@ import ("net/url""testing"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")func TestEnforceWorkspaceDeveloperProjectRouteACL(t *testing.T) {diff --git a/server/acl_sheet_test.go b/backend/server/acl_sheet_test.gosimilarity index 99%rename from server/acl_sheet_test.gorename to backend/server/acl_sheet_test.goindex ddcc304d22..0ea9e6a130 100644--- a/server/acl_sheet_test.go+++ b/backend/server/acl_sheet_test.go@@ -3,7 +3,7 @@ package serverimport ("testing"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")func TestEnforceWorkspaceDeveloperSheetRouteACL(t *testing.T) {diff --git a/server/acl_test_helper.go b/backend/server/acl_test_helper.gosimilarity index 95%rename from server/acl_test_helper.gorename to backend/server/acl_test_helper.goindex fe2e1bd4ba..11b164d6e3 100644--- a/server/acl_test_helper.go+++ b/backend/server/acl_test_helper.go@@ -1,8 +1,8 @@package serverimport (- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")// map from project ID to the map of <role, principal ID>.diff --git a/server/activity.go b/backend/server/activity.gosimilarity index 97%rename from server/activity.gorename to backend/server/activity.goindex bac83446e4..3341509ca5 100644--- a/server/activity.go+++ b/backend/server/activity.go@@ -9,9 +9,9 @@ import ("github.com/google/jsonapi""github.com/labstack/echo/v4"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/server/component/activity"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/server/component/activity")func (s *Server) registerActivityRoutes(g *echo.Group) {diff --git a/server/actuator.go b/backend/server/actuator.gosimilarity index 92%rename from server/actuator.gorename to backend/server/actuator.goindex 7262464e49..3de12e21e5 100644--- a/server/actuator.go+++ b/backend/server/actuator.go@@ -6,8 +6,8 @@ import ("github.com/labstack/echo/v4"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/store")// demoDataPath is the path prefix for demo data.diff --git a/server/anomaly.go b/backend/server/anomaly.gosimilarity index 97%rename from server/anomaly.gorename to backend/server/anomaly.goindex a81bb18211..7c3017fb89 100644--- a/server/anomaly.go+++ b/backend/server/anomaly.go@@ -8,7 +8,7 @@ import ("github.com/google/jsonapi""github.com/labstack/echo/v4"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")func (s *Server) registerAnomalyRoutes(g *echo.Group) {diff --git a/server/api/auth/auth.go b/backend/server/api/auth/auth.gosimilarity index 98%rename from server/api/auth/auth.gorename to backend/server/api/auth/auth.goindex 71449296cc..b1be514ec1 100644--- a/server/api/auth/auth.go+++ b/backend/server/api/auth/auth.go@@ -18,9 +18,9 @@ import ("github.com/golang-jwt/jwt/v4"errs "github.com/pkg/errors"- "github.com/bytebase/bytebase/common"- enterpriseAPI "github.com/bytebase/bytebase/enterprise/api"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/common"+ enterpriseAPI "github.com/bytebase/bytebase/backend/enterprise/api"+ "github.com/bytebase/bytebase/backend/store")const (diff --git a/server/api/auth/config.go b/backend/server/api/auth/config.gosimilarity index 100%rename from server/api/auth/config.gorename to backend/server/api/auth/config.godiff --git a/server/api/auth/header.go b/backend/server/api/auth/header.gosimilarity index 100%rename from server/api/auth/header.gorename to backend/server/api/auth/header.godiff --git a/server/api/v1/acl.go b/backend/server/api/v1/acl.gosimilarity index 96%rename from server/api/v1/acl.gorename to backend/server/api/v1/acl.goindex f1bd2cc1e3..a7f0eef426 100644--- a/server/api/v1/acl.go+++ b/backend/server/api/v1/acl.go@@ -10,12 +10,12 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- enterpriseAPI "github.com/bytebase/bytebase/enterprise/api"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ enterpriseAPI "github.com/bytebase/bytebase/backend/enterprise/api"+ "github.com/bytebase/bytebase/backend/server/api/auth"+ "github.com/bytebase/bytebase/backend/store"v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"- "github.com/bytebase/bytebase/server/api/auth"- "github.com/bytebase/bytebase/store")// ACLInterceptor is the v1 ACL interceptor for gRPC server.diff --git a/server/api/v1/acl_config.go b/backend/server/api/v1/acl_config.gosimilarity index 97%rename from server/api/v1/acl_config.gorename to backend/server/api/v1/acl_config.goindex 9f597879fd..b69540e949 100644--- a/server/api/v1/acl_config.go+++ b/backend/server/api/v1/acl_config.go@@ -3,7 +3,7 @@ package v1import ("strings"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")const (diff --git a/server/api/v1/auth_service.go b/backend/server/api/v1/auth_service.gosimilarity index 96%rename from server/api/v1/auth_service.gorename to backend/server/api/v1/auth_service.goindex 67a00a381d..b9884bcb3b 100644--- a/server/api/v1/auth_service.go+++ b/backend/server/api/v1/auth_service.go@@ -13,15 +13,15 @@ import ("google.golang.org/grpc/status""google.golang.org/protobuf/types/known/emptypb"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- metricAPI "github.com/bytebase/bytebase/metric"- "github.com/bytebase/bytebase/plugin/metric"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ metricAPI "github.com/bytebase/bytebase/backend/metric"+ "github.com/bytebase/bytebase/backend/plugin/metric"+ "github.com/bytebase/bytebase/backend/server/api/auth"+ "github.com/bytebase/bytebase/backend/server/component/config"+ "github.com/bytebase/bytebase/backend/server/runner/metricreport"+ "github.com/bytebase/bytebase/backend/store"v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"- "github.com/bytebase/bytebase/server/api/auth"- "github.com/bytebase/bytebase/server/component/config"- "github.com/bytebase/bytebase/server/runner/metricreport"- "github.com/bytebase/bytebase/store")// AuthService implements the auth service.diff --git a/server/api/v1/common.go b/backend/server/api/v1/common.gosimilarity index 100%rename from server/api/v1/common.gorename to backend/server/api/v1/common.godiff --git a/server/api/v1/common_test.go b/backend/server/api/v1/common_test.gosimilarity index 100%rename from server/api/v1/common_test.gorename to backend/server/api/v1/common_test.godiff --git a/server/api/v1/database_service.go b/backend/server/api/v1/database_service.gosimilarity index 98%rename from server/api/v1/database_service.gorename to backend/server/api/v1/database_service.goindex e8aeb12b72..f5aeec155e 100644--- a/server/api/v1/database_service.go+++ b/backend/server/api/v1/database_service.go@@ -9,10 +9,10 @@ import ("google.golang.org/grpc/status""google.golang.org/protobuf/types/known/timestamppb"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/store"storepb "github.com/bytebase/bytebase/proto/generated-go/store"v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"- "github.com/bytebase/bytebase/store")// DatabaseService implements the database service.diff --git a/server/api/v1/docs.go b/backend/server/api/v1/docs.gosimilarity index 100%rename from server/api/v1/docs.gorename to backend/server/api/v1/docs.godiff --git a/server/api/v1/environment_service.go b/backend/server/api/v1/environment_service.gosimilarity index 97%rename from server/api/v1/environment_service.gorename to backend/server/api/v1/environment_service.goindex df273f6693..bcbe8eb93a 100644--- a/server/api/v1/environment_service.go+++ b/backend/server/api/v1/environment_service.go@@ -8,11 +8,11 @@ import ("google.golang.org/grpc/status""google.golang.org/protobuf/types/known/emptypb"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- enterpriseAPI "github.com/bytebase/bytebase/enterprise/api"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ enterpriseAPI "github.com/bytebase/bytebase/backend/enterprise/api"+ "github.com/bytebase/bytebase/backend/store"v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"- "github.com/bytebase/bytebase/store")// EnvironmentService implements the environment service.diff --git a/server/api/v1/idp_service.go b/backend/server/api/v1/idp_service.gosimilarity index 98%rename from server/api/v1/idp_service.gorename to backend/server/api/v1/idp_service.goindex a2d51613d3..136f8c9d49 100644--- a/server/api/v1/idp_service.go+++ b/backend/server/api/v1/idp_service.go@@ -10,11 +10,11 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/common"- enterpriseAPI "github.com/bytebase/bytebase/enterprise/api"+ "github.com/bytebase/bytebase/backend/common"+ enterpriseAPI "github.com/bytebase/bytebase/backend/enterprise/api"+ "github.com/bytebase/bytebase/backend/store"storepb "github.com/bytebase/bytebase/proto/generated-go/store"v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"- "github.com/bytebase/bytebase/store")// IdentityProviderService implements the identity provider service.diff --git a/server/api/v1/instance_role_service.go b/backend/server/api/v1/instance_role_service.gosimilarity index 97%rename from server/api/v1/instance_role_service.gorename to backend/server/api/v1/instance_role_service.goindex e81c24b6aa..5899a96c4b 100644--- a/server/api/v1/instance_role_service.go+++ b/backend/server/api/v1/instance_role_service.go@@ -9,11 +9,11 @@ import ("google.golang.org/grpc/status""google.golang.org/protobuf/types/known/emptypb"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/server/component/dbfactory"+ "github.com/bytebase/bytebase/backend/store"v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"- "github.com/bytebase/bytebase/server/component/dbfactory"- "github.com/bytebase/bytebase/store")// InstanceRoleService implements the database role service.diff --git a/server/api/v1/instance_service.go b/backend/server/api/v1/instance_service.gosimilarity index 98%rename from server/api/v1/instance_service.gorename to backend/server/api/v1/instance_service.goindex e24bf00387..3bc30e35aa 100644--- a/server/api/v1/instance_service.go+++ b/backend/server/api/v1/instance_service.go@@ -10,12 +10,12 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- enterpriseAPI "github.com/bytebase/bytebase/enterprise/api"- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ enterpriseAPI "github.com/bytebase/bytebase/backend/enterprise/api"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/store"v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"- "github.com/bytebase/bytebase/store")// InstanceService implements the instance service.diff --git a/server/api/v1/org_policy_service.go b/backend/server/api/v1/org_policy_service.gosimilarity index 98%rename from server/api/v1/org_policy_service.gorename to backend/server/api/v1/org_policy_service.goindex 4d4efdc632..495cc0f6bd 100644--- a/server/api/v1/org_policy_service.go+++ b/backend/server/api/v1/org_policy_service.go@@ -12,12 +12,12 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- enterpriseAPI "github.com/bytebase/bytebase/enterprise/api"- "github.com/bytebase/bytebase/plugin/advisor"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ enterpriseAPI "github.com/bytebase/bytebase/backend/enterprise/api"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/store"v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"- "github.com/bytebase/bytebase/store")// OrgPolicyService implements the workspace policy service.diff --git a/server/api/v1/project_service.go b/backend/server/api/v1/project_service.gosimilarity index 99%rename from server/api/v1/project_service.gorename to backend/server/api/v1/project_service.goindex fe545727c0..25fb4256f2 100644--- a/server/api/v1/project_service.go+++ b/backend/server/api/v1/project_service.go@@ -10,10 +10,10 @@ import ("google.golang.org/grpc/status""google.golang.org/protobuf/types/known/emptypb"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/store"v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"- "github.com/bytebase/bytebase/store")// ProjectService implements the project service.diff --git a/server/api/v1/project_service_test.go b/backend/server/api/v1/project_service_test.gosimilarity index 100%rename from server/api/v1/project_service_test.gorename to backend/server/api/v1/project_service_test.godiff --git a/server/auth.go b/backend/server/auth.gosimilarity index 97%rename from server/auth.gorename to backend/server/auth.goindex 86f3b9365f..d07ce2f09b 100644--- a/server/auth.go+++ b/backend/server/auth.go@@ -10,11 +10,11 @@ import ("github.com/labstack/echo/v4""golang.org/x/crypto/bcrypt"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/vcs"- "github.com/bytebase/bytebase/server/component/activity"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/vcs"+ "github.com/bytebase/bytebase/backend/server/component/activity"+ "github.com/bytebase/bytebase/backend/store")func (s *Server) registerAuthRoutes(g *echo.Group) {diff --git a/server/bookmark.go b/backend/server/bookmark.gosimilarity index 97%rename from server/bookmark.gorename to backend/server/bookmark.goindex 2d423d38f1..d88596cb11 100644--- a/server/bookmark.go+++ b/backend/server/bookmark.go@@ -8,8 +8,8 @@ import ("github.com/google/jsonapi""github.com/labstack/echo/v4"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")func (s *Server) registerBookmarkRoutes(g *echo.Group) {diff --git a/server/component/activity/manager.go b/backend/server/component/activity/manager.gosimilarity index 98%rename from server/component/activity/manager.gorename to backend/server/component/activity/manager.goindex 90eeaa4c73..19960010ce 100644--- a/server/component/activity/manager.go+++ b/backend/server/component/activity/manager.go@@ -9,12 +9,12 @@ import ("strconv""time"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/webhook"- "github.com/bytebase/bytebase/server/component/config"- "github.com/bytebase/bytebase/server/utils"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/webhook"+ "github.com/bytebase/bytebase/backend/server/component/config"+ "github.com/bytebase/bytebase/backend/server/utils"+ "github.com/bytebase/bytebase/backend/store""github.com/pkg/errors""go.uber.org/zap"diff --git a/server/component/config/profile.go b/backend/server/component/config/profile.gosimilarity index 96%rename from server/component/config/profile.gorename to backend/server/component/config/profile.goindex 910190c007..3727106959 100644--- a/server/component/config/profile.go+++ b/backend/server/component/config/profile.go@@ -4,8 +4,8 @@ package configimport ("time"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")// Profile is the configuration to start main server.diff --git a/server/component/dbfactory/dbfactory.go b/backend/server/component/dbfactory/dbfactory.gosimilarity index 94%rename from server/component/dbfactory/dbfactory.gorename to backend/server/component/dbfactory/dbfactory.goindex 2e3ec6ba70..14f39b1803 100644--- a/server/component/dbfactory/dbfactory.go+++ b/backend/server/component/dbfactory/dbfactory.go@@ -4,11 +4,11 @@ package dbfactoryimport ("context"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/server/utils"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/server/utils"+ "github.com/bytebase/bytebase/backend/store")// DBFactory is the factory for building database driver.diff --git a/server/component/state/state.go b/backend/server/component/state/state.gosimilarity index 97%rename from server/component/state/state.gorename to backend/server/component/state/state.goindex fa18300188..28837b0e93 100644--- a/server/component/state/state.go+++ b/backend/server/component/state/state.go@@ -4,7 +4,7 @@ package stateimport ("sync"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")// InstanceMaximumConnectionNumber is the maximum number of connections outstanding per instance.diff --git a/server/database.go b/backend/server/database.gosimilarity index 99%rename from server/database.gorename to backend/server/database.goindex 5daa341f1c..8d529cb74d 100644--- a/server/database.go+++ b/backend/server/database.go@@ -13,13 +13,13 @@ import ("go.uber.org/zap""google.golang.org/protobuf/encoding/protojson"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/parser"- "github.com/bytebase/bytebase/plugin/parser/edit"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/parser"+ "github.com/bytebase/bytebase/backend/plugin/parser/edit"+ "github.com/bytebase/bytebase/backend/store")func (s *Server) registerDatabaseRoutes(g *echo.Group) {diff --git a/server/debug.go b/backend/server/debug.gosimilarity index 95%rename from server/debug.gorename to backend/server/debug.goindex 317495db83..a71ff04568 100644--- a/server/debug.go+++ b/backend/server/debug.go@@ -7,8 +7,8 @@ import ("github.com/labstack/echo/v4""go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common/log"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common/log")func (s *Server) registerDebugRoutes(g *echo.Group) {diff --git a/server/deploy.go b/backend/server/deploy.gosimilarity index 100%rename from server/deploy.gorename to backend/server/deploy.godiff --git a/server/environment.go b/backend/server/environment.gosimilarity index 98%rename from server/environment.gorename to backend/server/environment.goindex e86769740a..74d5600043 100644--- a/server/environment.go+++ b/backend/server/environment.go@@ -11,9 +11,9 @@ import ("github.com/labstack/echo/v4""github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/store")func (s *Server) registerEnvironmentRoutes(g *echo.Group) {diff --git a/server/error_recorder.go b/backend/server/error_recorder.gosimilarity index 96%rename from server/error_recorder.gorename to backend/server/error_recorder.goindex 18a1b1682d..e90f454592 100644--- a/server/error_recorder.go+++ b/backend/server/error_recorder.go@@ -5,7 +5,7 @@ import ("runtime/debug""time"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api""github.com/labstack/echo/v4")diff --git a/server/inbox.go b/backend/server/inbox.gosimilarity index 97%rename from server/inbox.gorename to backend/server/inbox.goindex 1d27c264c5..c9262e11a1 100644--- a/server/inbox.go+++ b/backend/server/inbox.go@@ -8,8 +8,8 @@ import ("github.com/google/jsonapi""github.com/labstack/echo/v4"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")func (s *Server) registerInboxRoutes(g *echo.Group) {diff --git a/server/instance.go b/backend/server/instance.gosimilarity index 98%rename from server/instance.gorename to backend/server/instance.goindex 633a11b65e..833f482a08 100644--- a/server/instance.go+++ b/backend/server/instance.go@@ -14,12 +14,12 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/resources/postgres"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/resources/postgres"+ "github.com/bytebase/bytebase/backend/store")// pgConnectionInfo represents the embedded postgres instance connection info.diff --git a/server/issue.go b/backend/server/issue.gosimilarity index 99%rename from server/issue.gorename to backend/server/issue.goindex fa39539ef3..5d1d45c974 100644--- a/server/issue.go+++ b/backend/server/issue.go@@ -16,15 +16,15 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/util"- "github.com/bytebase/bytebase/plugin/vcs"- "github.com/bytebase/bytebase/server/component/activity"- "github.com/bytebase/bytebase/server/utils"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/util"+ "github.com/bytebase/bytebase/backend/plugin/vcs"+ "github.com/bytebase/bytebase/backend/server/component/activity"+ "github.com/bytebase/bytebase/backend/server/utils"+ "github.com/bytebase/bytebase/backend/store")func (s *Server) registerIssueRoutes(g *echo.Group) {diff --git a/server/issue_subscriber.go b/backend/server/issue_subscriber.gosimilarity index 97%rename from server/issue_subscriber.gorename to backend/server/issue_subscriber.goindex ebb12a9237..e9a0506476 100644--- a/server/issue_subscriber.go+++ b/backend/server/issue_subscriber.go@@ -8,8 +8,8 @@ import ("github.com/google/jsonapi""github.com/labstack/echo/v4"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")func (s *Server) registerIssueSubscriberRoutes(g *echo.Group) {diff --git a/server/issue_test.go b/backend/server/issue_test.gosimilarity index 97%rename from server/issue_test.gorename to backend/server/issue_test.goindex 8ac7d61a72..c5a72b1cf7 100644--- a/server/issue_test.go+++ b/backend/server/issue_test.go@@ -5,7 +5,7 @@ import ("github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db")func TestCheckCharacterSetCollationOwner(t *testing.T) {diff --git a/server/jwt.go b/backend/server/jwt.gosimilarity index 98%rename from server/jwt.gorename to backend/server/jwt.goindex d43af59f26..c3bf2559ba 100644--- a/server/jwt.go+++ b/backend/server/jwt.go@@ -12,9 +12,9 @@ import ("github.com/labstack/echo/v4"pkgerrors "github.com/pkg/errors"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/server/api/auth"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/server/api/auth"+ "github.com/bytebase/bytebase/backend/store")const (diff --git a/server/member.go b/backend/server/member.gosimilarity index 98%rename from server/member.gorename to backend/server/member.goindex 6d34f8f4fc..9546751405 100644--- a/server/member.go+++ b/backend/server/member.go@@ -9,9 +9,9 @@ import ("github.com/google/jsonapi""github.com/labstack/echo/v4"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/server/component/activity"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/server/component/activity"+ "github.com/bytebase/bytebase/backend/store")func (s *Server) registerMemberRoutes(g *echo.Group) {diff --git a/server/oauth.go b/backend/server/oauth.gosimilarity index 92%rename from server/oauth.gorename to backend/server/oauth.goindex ea14f1cbad..24ee443e8d 100644--- a/server/oauth.go+++ b/backend/server/oauth.go@@ -7,10 +7,10 @@ import ("github.com/google/jsonapi""github.com/labstack/echo/v4"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- vcsPlugin "github.com/bytebase/bytebase/plugin/vcs"- _ "github.com/bytebase/bytebase/plugin/vcs/github" // Import to call the init until it is imported from somewhere else+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ vcsPlugin "github.com/bytebase/bytebase/backend/plugin/vcs"+ _ "github.com/bytebase/bytebase/backend/plugin/vcs/github" // Import to call the init until it is imported from somewhere else)func (s *Server) registerOAuthRoutes(g *echo.Group) {diff --git a/server/openapi_instance.go b/backend/server/openapi_instance.gosimilarity index 95%rename from server/openapi_instance.gorename to backend/server/openapi_instance.goindex df49ecfed3..925aad9eec 100644--- a/server/openapi_instance.go+++ b/backend/server/openapi_instance.go@@ -7,8 +7,8 @@ import ("github.com/labstack/echo/v4"- openAPIV1 "github.com/bytebase/bytebase/api/v1"- "github.com/bytebase/bytebase/store"+ openAPIV1 "github.com/bytebase/bytebase/backend/api/v1"+ "github.com/bytebase/bytebase/backend/store")func (s *Server) updateInstanceDatabase(c echo.Context) error {diff --git a/server/openapi_issue.go b/backend/server/openapi_issue.gosimilarity index 92%rename from server/openapi_issue.gorename to backend/server/openapi_issue.goindex 058b8359d0..100c4375cb 100644--- a/server/openapi_issue.go+++ b/backend/server/openapi_issue.go@@ -8,10 +8,10 @@ import ("github.com/labstack/echo/v4"- "github.com/bytebase/bytebase/api"- openAPIV1 "github.com/bytebase/bytebase/api/v1"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ openAPIV1 "github.com/bytebase/bytebase/backend/api/v1"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/store")func (s *Server) createIssueByOpenAPI(c echo.Context) error {diff --git a/server/openapi_metric.go b/backend/server/openapi_metric.gosimilarity index 88%rename from server/openapi_metric.gorename to backend/server/openapi_metric.goindex d6abee691d..0a5235c4ee 100644--- a/server/openapi_metric.go+++ b/backend/server/openapi_metric.go@@ -6,8 +6,8 @@ import ("github.com/labstack/echo/v4"- metricAPI "github.com/bytebase/bytebase/metric"- "github.com/bytebase/bytebase/plugin/metric"+ metricAPI "github.com/bytebase/bytebase/backend/metric"+ "github.com/bytebase/bytebase/backend/plugin/metric")func openAPIMetricMiddleware(s *Server, next echo.HandlerFunc) echo.HandlerFunc {diff --git a/server/openapi_sql.go b/backend/server/openapi_sql.gosimilarity index 94%rename from server/openapi_sql.gorename to backend/server/openapi_sql.goindex bb7726646e..6ad043e9c2 100644--- a/server/openapi_sql.go+++ b/backend/server/openapi_sql.go@@ -9,14 +9,14 @@ import ("github.com/labstack/echo/v4"- metricAPI "github.com/bytebase/bytebase/metric"- "github.com/bytebase/bytebase/plugin/advisor/catalog"- advisorDB "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/metric"- "github.com/bytebase/bytebase/plugin/parser"- "github.com/bytebase/bytebase/plugin/parser/differ"- "github.com/bytebase/bytebase/store"+ metricAPI "github.com/bytebase/bytebase/backend/metric"+ "github.com/bytebase/bytebase/backend/plugin/advisor/catalog"+ advisorDB "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/metric"+ "github.com/bytebase/bytebase/backend/plugin/parser"+ "github.com/bytebase/bytebase/backend/plugin/parser/differ"+ "github.com/bytebase/bytebase/backend/store")var (diff --git a/server/policy.go b/backend/server/policy.gosimilarity index 98%rename from server/policy.gorename to backend/server/policy.goindex 2333322c19..1c27de1092 100644--- a/server/policy.go+++ b/backend/server/policy.go@@ -9,8 +9,8 @@ import ("github.com/labstack/echo/v4""github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")// hasAccessToUpdatePolicy checks if user can access to policy control feature.diff --git a/server/principal.go b/backend/server/principal.gosimilarity index 98%rename from server/principal.gorename to backend/server/principal.goindex 4ed272af7a..f9ba17ee8d 100644--- a/server/principal.go+++ b/backend/server/principal.go@@ -10,9 +10,9 @@ import ("github.com/labstack/echo/v4""golang.org/x/crypto/bcrypt"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/store")// serviceAccountAccessKeyPrefix is the prefix for service account access key.diff --git a/server/project.go b/backend/server/project.gosimilarity index 99%rename from server/project.gorename to backend/server/project.goindex 7f1c47bd96..d43dcbd828 100644--- a/server/project.go+++ b/backend/server/project.go@@ -18,14 +18,14 @@ import ("go.uber.org/zap""gopkg.in/yaml.v3"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- vcsPlugin "github.com/bytebase/bytebase/plugin/vcs"- "github.com/bytebase/bytebase/plugin/vcs/github"- "github.com/bytebase/bytebase/plugin/vcs/gitlab"- "github.com/bytebase/bytebase/server/utils"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ vcsPlugin "github.com/bytebase/bytebase/backend/plugin/vcs"+ "github.com/bytebase/bytebase/backend/plugin/vcs/github"+ "github.com/bytebase/bytebase/backend/plugin/vcs/gitlab"+ "github.com/bytebase/bytebase/backend/server/utils"+ "github.com/bytebase/bytebase/backend/store")const (diff --git a/server/project_member.go b/backend/server/project_member.gosimilarity index 98%rename from server/project_member.gorename to backend/server/project_member.goindex fdfec30446..22c44aab4e 100644--- a/server/project_member.go+++ b/backend/server/project_member.go@@ -9,9 +9,9 @@ import ("github.com/labstack/echo/v4""go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/store")func (s *Server) registerProjectMemberRoutes(g *echo.Group) {diff --git a/server/project_webhook.go b/backend/server/project_webhook.gosimilarity index 97%rename from server/project_webhook.gorename to backend/server/project_webhook.goindex 8cb4a6ea55..6ece76fe18 100644--- a/server/project_webhook.go+++ b/backend/server/project_webhook.go@@ -10,10 +10,10 @@ import ("github.com/gosimple/slug""github.com/labstack/echo/v4"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- webhookPlugin "github.com/bytebase/bytebase/plugin/webhook"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ webhookPlugin "github.com/bytebase/bytebase/backend/plugin/webhook"+ "github.com/bytebase/bytebase/backend/store")func (s *Server) registerProjectWebhookRoutes(g *echo.Group) {diff --git a/server/recover.go b/backend/server/recover.gosimilarity index 90%rename from server/recover.gorename to backend/server/recover.goindex ec4539babe..5b02bc588f 100644--- a/server/recover.go+++ b/backend/server/recover.go@@ -5,7 +5,7 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/common/log"+ "github.com/bytebase/bytebase/backend/common/log")func recoverMiddleware(next echo.HandlerFunc) echo.HandlerFunc {diff --git a/server/runner/anomaly/scanner.go b/backend/server/runner/anomaly/scanner.gosimilarity index 97%rename from server/runner/anomaly/scanner.gorename to backend/server/runner/anomaly/scanner.goindex 23fe9d04e1..3d27995ce7 100644--- a/server/runner/anomaly/scanner.go+++ b/backend/server/runner/anomaly/scanner.go@@ -12,13 +12,13 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- enterpriseAPI "github.com/bytebase/bytebase/enterprise/api"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/server/component/dbfactory"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ enterpriseAPI "github.com/bytebase/bytebase/backend/enterprise/api"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/server/component/dbfactory"+ "github.com/bytebase/bytebase/backend/store")const (diff --git a/server/runner/apprun/runner.go b/backend/server/runner/apprun/runner.gosimilarity index 97%rename from server/runner/apprun/runner.gorename to backend/server/runner/apprun/runner.goindex 38434dc1a8..8b00491e4a 100644--- a/server/runner/apprun/runner.go+++ b/backend/server/runner/apprun/runner.go@@ -11,13 +11,13 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/app/feishu"- "github.com/bytebase/bytebase/server/component/activity"- "github.com/bytebase/bytebase/server/component/config"- "github.com/bytebase/bytebase/server/utils"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/app/feishu"+ "github.com/bytebase/bytebase/backend/server/component/activity"+ "github.com/bytebase/bytebase/backend/server/component/config"+ "github.com/bytebase/bytebase/backend/server/utils"+ "github.com/bytebase/bytebase/backend/store")// NewRunner returns a runner.diff --git a/server/runner/backuprun/runner.go b/backend/server/runner/backuprun/runner.gosimilarity index 96%rename from server/runner/backuprun/runner.gorename to backend/server/runner/backuprun/runner.goindex e57c64f8a1..ea4d8fa592 100644--- a/server/runner/backuprun/runner.go+++ b/backend/server/runner/backuprun/runner.go@@ -17,17 +17,17 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/mysql"- "github.com/bytebase/bytebase/plugin/storage/s3"- "github.com/bytebase/bytebase/server/component/config"- "github.com/bytebase/bytebase/server/component/dbfactory"- "github.com/bytebase/bytebase/server/component/state"- "github.com/bytebase/bytebase/server/utils"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/mysql"+ "github.com/bytebase/bytebase/backend/plugin/storage/s3"+ "github.com/bytebase/bytebase/backend/server/component/config"+ "github.com/bytebase/bytebase/backend/server/component/dbfactory"+ "github.com/bytebase/bytebase/backend/server/component/state"+ "github.com/bytebase/bytebase/backend/server/utils"+ "github.com/bytebase/bytebase/backend/store")// NewRunner creates a new backup runner.diff --git a/server/runner/metricreport/reporter.go b/backend/server/runner/metricreport/reporter.gosimilarity index 91%rename from server/runner/metricreport/reporter.gorename to backend/server/runner/metricreport/reporter.goindex cd3aa15040..e1e303b6a9 100644--- a/server/runner/metricreport/reporter.go+++ b/backend/server/runner/metricreport/reporter.go@@ -9,13 +9,13 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common/log"- enterpriseAPI "github.com/bytebase/bytebase/enterprise/api"- "github.com/bytebase/bytebase/plugin/metric"- "github.com/bytebase/bytebase/plugin/metric/segment"- "github.com/bytebase/bytebase/server/component/config"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common/log"+ enterpriseAPI "github.com/bytebase/bytebase/backend/enterprise/api"+ "github.com/bytebase/bytebase/backend/plugin/metric"+ "github.com/bytebase/bytebase/backend/plugin/metric/segment"+ "github.com/bytebase/bytebase/backend/server/component/config"+ "github.com/bytebase/bytebase/backend/store""go.uber.org/zap")diff --git a/server/runner/rollbackrun/runner.go b/backend/server/runner/rollbackrun/runner.gosimilarity index 93%rename from server/runner/rollbackrun/runner.gorename to backend/server/runner/rollbackrun/runner.goindex 7eb26f08f2..9370a17772 100644--- a/server/runner/rollbackrun/runner.go+++ b/backend/server/runner/rollbackrun/runner.go@@ -11,13 +11,13 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/mysql"- "github.com/bytebase/bytebase/server/component/dbfactory"- "github.com/bytebase/bytebase/server/component/state"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/mysql"+ "github.com/bytebase/bytebase/backend/server/component/dbfactory"+ "github.com/bytebase/bytebase/backend/server/component/state"+ "github.com/bytebase/bytebase/backend/store")// NewRunner creates a new rollback runner.diff --git a/server/runner/schemasync/syncer.go b/backend/server/runner/schemasync/syncer.gosimilarity index 95%rename from server/runner/schemasync/syncer.gorename to backend/server/runner/schemasync/syncer.goindex b0fa833a2c..3b13256f32 100644--- a/server/runner/schemasync/syncer.go+++ b/backend/server/runner/schemasync/syncer.go@@ -13,15 +13,15 @@ import ("go.uber.org/zap""google.golang.org/protobuf/testing/protocmp"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/server/component/config"+ "github.com/bytebase/bytebase/backend/server/component/dbfactory"+ "github.com/bytebase/bytebase/backend/server/component/state"+ "github.com/bytebase/bytebase/backend/server/utils"+ "github.com/bytebase/bytebase/backend/store"storepb "github.com/bytebase/bytebase/proto/generated-go/store"- "github.com/bytebase/bytebase/server/component/config"- "github.com/bytebase/bytebase/server/component/dbfactory"- "github.com/bytebase/bytebase/server/component/state"- "github.com/bytebase/bytebase/server/utils"- "github.com/bytebase/bytebase/store")const (diff --git a/server/runner/schemasync/syncer_test.go b/backend/server/runner/schemasync/syncer_test.gosimilarity index 100%rename from server/runner/schemasync/syncer_test.gorename to backend/server/runner/schemasync/syncer_test.godiff --git a/server/runner/taskcheck/database_connect_executor.go b/backend/server/runner/taskcheck/database_connect_executor.gosimilarity index 90%rename from server/runner/taskcheck/database_connect_executor.gorename to backend/server/runner/taskcheck/database_connect_executor.goindex ab8a958c59..3a0c306616 100644--- a/server/runner/taskcheck/database_connect_executor.go+++ b/backend/server/runner/taskcheck/database_connect_executor.go@@ -4,10 +4,10 @@ import ("context""fmt"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/server/component/dbfactory"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/server/component/dbfactory"+ "github.com/bytebase/bytebase/backend/store")// NewDatabaseConnectExecutor creates a task check database connect executor.diff --git a/server/runner/taskcheck/executor.go b/backend/server/runner/taskcheck/executor.gosimilarity index 86%rename from server/runner/taskcheck/executor.gorename to backend/server/runner/taskcheck/executor.goindex 6fb46e8a67..74d0a27dfd 100644--- a/server/runner/taskcheck/executor.go+++ b/backend/server/runner/taskcheck/executor.go@@ -3,7 +3,7 @@ package taskcheckimport ("context"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")// Executor is the task check executor.diff --git a/server/runner/taskcheck/ghost_sync_executor.go b/backend/server/runner/taskcheck/ghost_sync_executor.gosimilarity index 94%rename from server/runner/taskcheck/ghost_sync_executor.gorename to backend/server/runner/taskcheck/ghost_sync_executor.goindex b6467d22e1..29ba5efc29 100644--- a/server/runner/taskcheck/ghost_sync_executor.go+++ b/backend/server/runner/taskcheck/ghost_sync_executor.go@@ -7,10 +7,10 @@ import ("github.com/github/gh-ost/go/logic""github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/server/utils"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/server/utils"+ "github.com/bytebase/bytebase/backend/store")// NewGhostSyncExecutor creates a task check gh-ost sync executor.diff --git a/server/runner/taskcheck/lgtm_executor.go b/backend/server/runner/taskcheck/lgtm_executor.gosimilarity index 96%rename from server/runner/taskcheck/lgtm_executor.gorename to backend/server/runner/taskcheck/lgtm_executor.goindex 9e31744240..fb45259e35 100644--- a/server/runner/taskcheck/lgtm_executor.go+++ b/backend/server/runner/taskcheck/lgtm_executor.go@@ -6,9 +6,9 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/store")// NewLGTMExecutor creates a task check LGTM executor.diff --git a/server/runner/taskcheck/migration_schema_executor.go b/backend/server/runner/taskcheck/migration_schema_executor.gosimilarity index 89%rename from server/runner/taskcheck/migration_schema_executor.gorename to backend/server/runner/taskcheck/migration_schema_executor.goindex 2b26d63f97..258368743d 100644--- a/server/runner/taskcheck/migration_schema_executor.go+++ b/backend/server/runner/taskcheck/migration_schema_executor.go@@ -4,10 +4,10 @@ import ("context""fmt"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/server/component/dbfactory"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/server/component/dbfactory"+ "github.com/bytebase/bytebase/backend/store")// NewMigrationSchemaExecutor creates a task check migration schema executor.diff --git a/server/runner/taskcheck/pitr_mysql_executor.go b/backend/server/runner/taskcheck/pitr_mysql_executor.gosimilarity index 90%rename from server/runner/taskcheck/pitr_mysql_executor.gorename to backend/server/runner/taskcheck/pitr_mysql_executor.goindex c2e5f1e49b..0c8d4bad6e 100644--- a/server/runner/taskcheck/pitr_mysql_executor.go+++ b/backend/server/runner/taskcheck/pitr_mysql_executor.go@@ -6,11 +6,11 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/db/mysql"- "github.com/bytebase/bytebase/server/component/dbfactory"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/db/mysql"+ "github.com/bytebase/bytebase/backend/server/component/dbfactory"+ "github.com/bytebase/bytebase/backend/store")// NewPITRMySQLExecutor creates a task check migration schema executor.diff --git a/server/runner/taskcheck/scheduler.go b/backend/server/runner/taskcheck/scheduler.gosimilarity index 97%rename from server/runner/taskcheck/scheduler.gorename to backend/server/runner/taskcheck/scheduler.goindex 56b31bb536..ba39a87c99 100644--- a/server/runner/taskcheck/scheduler.go+++ b/backend/server/runner/taskcheck/scheduler.go@@ -11,13 +11,13 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- enterpriseAPI "github.com/bytebase/bytebase/enterprise/api"- "github.com/bytebase/bytebase/server/component/state"- "github.com/bytebase/bytebase/server/utils"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ enterpriseAPI "github.com/bytebase/bytebase/backend/enterprise/api"+ "github.com/bytebase/bytebase/backend/server/component/state"+ "github.com/bytebase/bytebase/backend/server/utils"+ "github.com/bytebase/bytebase/backend/store")const (diff --git a/server/runner/taskcheck/statement_advisor_composite_executor.go b/backend/server/runner/taskcheck/statement_advisor_composite_executor.gosimilarity index 92%rename from server/runner/taskcheck/statement_advisor_composite_executor.gorename to backend/server/runner/taskcheck/statement_advisor_composite_executor.goindex f147f210e6..77246b8779 100644--- a/server/runner/taskcheck/statement_advisor_composite_executor.go+++ b/backend/server/runner/taskcheck/statement_advisor_composite_executor.go@@ -4,12 +4,12 @@ import ("context""encoding/json"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/advisor"- advisorDB "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/server/component/dbfactory"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ advisorDB "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/server/component/dbfactory"+ "github.com/bytebase/bytebase/backend/store")// SQL review policy consists of a list of SQL review rules.diff --git a/server/runner/taskcheck/statement_advisor_simple_executor.go b/backend/server/runner/taskcheck/statement_advisor_simple_executor.gosimilarity index 89%rename from server/runner/taskcheck/statement_advisor_simple_executor.gorename to backend/server/runner/taskcheck/statement_advisor_simple_executor.goindex adb521efb9..753caadb5e 100644--- a/server/runner/taskcheck/statement_advisor_simple_executor.go+++ b/backend/server/runner/taskcheck/statement_advisor_simple_executor.go@@ -4,11 +4,11 @@ import ("context""encoding/json"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/advisor"- advisorDB "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ advisorDB "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/db")// NewStatementAdvisorSimpleExecutor creates a task check statement simple advisor executor.diff --git a/server/runner/taskcheck/statement_type_executor.go b/backend/server/runner/taskcheck/statement_type_executor.gosimilarity index 95%rename from server/runner/taskcheck/statement_type_executor.gorename to backend/server/runner/taskcheck/statement_type_executor.goindex 57ad04e230..4b951fab97 100644--- a/server/runner/taskcheck/statement_type_executor.go+++ b/backend/server/runner/taskcheck/statement_type_executor.go@@ -8,13 +8,13 @@ import (tidbparser "github.com/pingcap/tidb/parser"tidbast "github.com/pingcap/tidb/parser/ast"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/parser"- "github.com/bytebase/bytebase/plugin/parser/ast"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/parser"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/store")// NewStatementTypeExecutor creates a task check DML executor.diff --git a/server/runner/taskcheck/statement_type_executor_test.go b/backend/server/runner/taskcheck/statement_type_executor_test.gosimilarity index 96%rename from server/runner/taskcheck/statement_type_executor_test.gorename to backend/server/runner/taskcheck/statement_type_executor_test.goindex 99616a4d53..fc539ed110 100644--- a/server/runner/taskcheck/statement_type_executor_test.go+++ b/backend/server/runner/taskcheck/statement_type_executor_test.go@@ -5,13 +5,13 @@ import ("github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"// Register pingcap parser driver._ "github.com/pingcap/tidb/types/parser_driver"// Register postgres parser driver.- _ "github.com/bytebase/bytebase/plugin/parser/engine/pg"+ _ "github.com/bytebase/bytebase/backend/plugin/parser/engine/pg")type testData struct {diff --git a/server/runner/taskrun/data_update_executor.go b/backend/server/runner/taskrun/data_update_executor.gosimilarity index 80%rename from server/runner/taskrun/data_update_executor.gorename to backend/server/runner/taskrun/data_update_executor.goindex 16a6c0ac03..2898ea06c6 100644--- a/server/runner/taskrun/data_update_executor.go+++ b/backend/server/runner/taskrun/data_update_executor.go@@ -6,13 +6,13 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/server/component/activity"- "github.com/bytebase/bytebase/server/component/config"- "github.com/bytebase/bytebase/server/component/dbfactory"- "github.com/bytebase/bytebase/server/component/state"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/server/component/activity"+ "github.com/bytebase/bytebase/backend/server/component/config"+ "github.com/bytebase/bytebase/backend/server/component/dbfactory"+ "github.com/bytebase/bytebase/backend/server/component/state"+ "github.com/bytebase/bytebase/backend/store")// NewDataUpdateExecutor creates a data update (DML) task executor.diff --git a/server/runner/taskrun/database_backup_executor.go b/backend/server/runner/taskrun/database_backup_executor.gosimilarity index 93%rename from server/runner/taskrun/database_backup_executor.gorename to backend/server/runner/taskrun/database_backup_executor.goindex 920a0380b9..a7cd6b675e 100644--- a/server/runner/taskrun/database_backup_executor.go+++ b/backend/server/runner/taskrun/database_backup_executor.go@@ -11,14 +11,14 @@ import ("go.uber.org/zap""golang.org/x/sys/unix"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- bbs3 "github.com/bytebase/bytebase/plugin/storage/s3"- "github.com/bytebase/bytebase/server/component/config"- "github.com/bytebase/bytebase/server/component/dbfactory"- "github.com/bytebase/bytebase/server/runner/backuprun"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ bbs3 "github.com/bytebase/bytebase/backend/plugin/storage/s3"+ "github.com/bytebase/bytebase/backend/server/component/config"+ "github.com/bytebase/bytebase/backend/server/component/dbfactory"+ "github.com/bytebase/bytebase/backend/server/runner/backuprun"+ "github.com/bytebase/bytebase/backend/store")const (diff --git a/server/runner/taskrun/database_create_executor.go b/backend/server/runner/taskrun/database_create_executor.gosimilarity index 95%rename from server/runner/taskrun/database_create_executor.gorename to backend/server/runner/taskrun/database_create_executor.goindex 2b41e93236..de5e93d6fc 100644--- a/server/runner/taskrun/database_create_executor.go+++ b/backend/server/runner/taskrun/database_create_executor.go@@ -12,15 +12,15 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/server/component/config"- "github.com/bytebase/bytebase/server/component/dbfactory"- "github.com/bytebase/bytebase/server/runner/schemasync"- "github.com/bytebase/bytebase/server/utils"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/server/component/config"+ "github.com/bytebase/bytebase/backend/server/component/dbfactory"+ "github.com/bytebase/bytebase/backend/server/runner/schemasync"+ "github.com/bytebase/bytebase/backend/server/utils"+ "github.com/bytebase/bytebase/backend/store")// NewDatabaseCreateExecutor creates a database create task executor.diff --git a/server/runner/taskrun/database_create_executor_test.go b/backend/server/runner/taskrun/database_create_executor_test.gosimilarity index 95%rename from server/runner/taskrun/database_create_executor_test.gorename to backend/server/runner/taskrun/database_create_executor_test.goindex f147a52f7d..56272ec6ec 100644--- a/server/runner/taskrun/database_create_executor_test.go+++ b/backend/server/runner/taskrun/database_create_executor_test.go@@ -5,7 +5,7 @@ import ("github.com/stretchr/testify/assert"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/store")func TestGetPeerTenantDatabase(t *testing.T) {diff --git a/server/runner/taskrun/default_executor.go b/backend/server/runner/taskrun/default_executor.gosimilarity index 86%rename from server/runner/taskrun/default_executor.gorename to backend/server/runner/taskrun/default_executor.goindex a87ed4cfef..55f46ebd70 100644--- a/server/runner/taskrun/default_executor.go+++ b/backend/server/runner/taskrun/default_executor.go@@ -6,8 +6,8 @@ import ("go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common/log"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common/log")// NewDefaultExecutor creates a default task executor.diff --git a/server/runner/taskrun/executor.go b/backend/server/runner/taskrun/executor.gosimilarity index 96%rename from server/runner/taskrun/executor.gorename to backend/server/runner/taskrun/executor.goindex 3263c0e19d..a043d84ffe 100644--- a/server/runner/taskrun/executor.go+++ b/backend/server/runner/taskrun/executor.go@@ -11,20 +11,20 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/mysql"- "github.com/bytebase/bytebase/plugin/parser"- "github.com/bytebase/bytebase/plugin/parser/transform"- vcsPlugin "github.com/bytebase/bytebase/plugin/vcs"- "github.com/bytebase/bytebase/server/component/activity"- "github.com/bytebase/bytebase/server/component/config"- "github.com/bytebase/bytebase/server/component/dbfactory"- "github.com/bytebase/bytebase/server/component/state"- "github.com/bytebase/bytebase/server/utils"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/mysql"+ "github.com/bytebase/bytebase/backend/plugin/parser"+ "github.com/bytebase/bytebase/backend/plugin/parser/transform"+ vcsPlugin "github.com/bytebase/bytebase/backend/plugin/vcs"+ "github.com/bytebase/bytebase/backend/server/component/activity"+ "github.com/bytebase/bytebase/backend/server/component/config"+ "github.com/bytebase/bytebase/backend/server/component/dbfactory"+ "github.com/bytebase/bytebase/backend/server/component/state"+ "github.com/bytebase/bytebase/backend/server/utils"+ "github.com/bytebase/bytebase/backend/store")// Executor is the task executor.diff --git a/server/runner/taskrun/pitr_cutover_executor.go b/backend/server/runner/taskrun/pitr_cutover_executor.gosimilarity index 94%rename from server/runner/taskrun/pitr_cutover_executor.gorename to backend/server/runner/taskrun/pitr_cutover_executor.goindex 6e298c7528..ed922d03af 100644--- a/server/runner/taskrun/pitr_cutover_executor.go+++ b/backend/server/runner/taskrun/pitr_cutover_executor.go@@ -11,18 +11,18 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/mysql"- "github.com/bytebase/bytebase/plugin/db/util"- "github.com/bytebase/bytebase/server/component/activity"- "github.com/bytebase/bytebase/server/component/config"- "github.com/bytebase/bytebase/server/component/dbfactory"- "github.com/bytebase/bytebase/server/runner/backuprun"- "github.com/bytebase/bytebase/server/runner/schemasync"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/mysql"+ "github.com/bytebase/bytebase/backend/plugin/db/util"+ "github.com/bytebase/bytebase/backend/server/component/activity"+ "github.com/bytebase/bytebase/backend/server/component/config"+ "github.com/bytebase/bytebase/backend/server/component/dbfactory"+ "github.com/bytebase/bytebase/backend/server/runner/backuprun"+ "github.com/bytebase/bytebase/backend/server/runner/schemasync"+ "github.com/bytebase/bytebase/backend/store")// NewPITRCutoverExecutor creates a PITR cutover task executor.diff --git a/server/runner/taskrun/pitr_restore_executor.go b/backend/server/runner/taskrun/pitr_restore_executor.gosimilarity index 96%rename from server/runner/taskrun/pitr_restore_executor.gorename to backend/server/runner/taskrun/pitr_restore_executor.goindex cc24a5ca88..991a317536 100644--- a/server/runner/taskrun/pitr_restore_executor.go+++ b/backend/server/runner/taskrun/pitr_restore_executor.go@@ -13,20 +13,20 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/mysql"- "github.com/bytebase/bytebase/plugin/db/pg"- "github.com/bytebase/bytebase/plugin/db/util"- bbs3 "github.com/bytebase/bytebase/plugin/storage/s3"- "github.com/bytebase/bytebase/server/component/config"- "github.com/bytebase/bytebase/server/component/dbfactory"- "github.com/bytebase/bytebase/server/component/state"- "github.com/bytebase/bytebase/server/runner/backuprun"- "github.com/bytebase/bytebase/server/runner/schemasync"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/mysql"+ "github.com/bytebase/bytebase/backend/plugin/db/pg"+ "github.com/bytebase/bytebase/backend/plugin/db/util"+ bbs3 "github.com/bytebase/bytebase/backend/plugin/storage/s3"+ "github.com/bytebase/bytebase/backend/server/component/config"+ "github.com/bytebase/bytebase/backend/server/component/dbfactory"+ "github.com/bytebase/bytebase/backend/server/component/state"+ "github.com/bytebase/bytebase/backend/server/runner/backuprun"+ "github.com/bytebase/bytebase/backend/server/runner/schemasync"+ "github.com/bytebase/bytebase/backend/store")// NewPITRRestoreExecutor creates a PITR restore task executor.diff --git a/server/runner/taskrun/scheduler.go b/backend/server/runner/taskrun/scheduler.gosimilarity index 98%rename from server/runner/taskrun/scheduler.gorename to backend/server/runner/taskrun/scheduler.goindex d0de925456..2cf7f60997 100644--- a/server/runner/taskrun/scheduler.go+++ b/backend/server/runner/taskrun/scheduler.go@@ -16,18 +16,18 @@ import ("go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- enterpriseAPI "github.com/bytebase/bytebase/enterprise/api"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/server/component/activity"- "github.com/bytebase/bytebase/server/component/config"- "github.com/bytebase/bytebase/server/component/state"- "github.com/bytebase/bytebase/server/runner/apprun"- "github.com/bytebase/bytebase/server/runner/schemasync"- "github.com/bytebase/bytebase/server/utils"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ enterpriseAPI "github.com/bytebase/bytebase/backend/enterprise/api"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/server/component/activity"+ "github.com/bytebase/bytebase/backend/server/component/config"+ "github.com/bytebase/bytebase/backend/server/component/state"+ "github.com/bytebase/bytebase/backend/server/runner/apprun"+ "github.com/bytebase/bytebase/backend/server/runner/schemasync"+ "github.com/bytebase/bytebase/backend/server/utils"+ "github.com/bytebase/bytebase/backend/store")const (diff --git a/server/runner/taskrun/scheduler_test.go b/backend/server/runner/taskrun/scheduler_test.gosimilarity index 96%rename from server/runner/taskrun/scheduler_test.gorename to backend/server/runner/taskrun/scheduler_test.goindex d195a404c6..6f3616e147 100644--- a/server/runner/taskrun/scheduler_test.go+++ b/backend/server/runner/taskrun/scheduler_test.go@@ -5,7 +5,7 @@ import ("github.com/stretchr/testify/assert"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")func TestAreAllTasksDone(t *testing.T) {diff --git a/server/runner/taskrun/schema_baseline_executor.go b/backend/server/runner/taskrun/schema_baseline_executor.gosimilarity index 80%rename from server/runner/taskrun/schema_baseline_executor.gorename to backend/server/runner/taskrun/schema_baseline_executor.goindex 509be39068..ba0c5f0342 100644--- a/server/runner/taskrun/schema_baseline_executor.go+++ b/backend/server/runner/taskrun/schema_baseline_executor.go@@ -7,15 +7,15 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/server/component/activity"- "github.com/bytebase/bytebase/server/component/config"- "github.com/bytebase/bytebase/server/component/dbfactory"- "github.com/bytebase/bytebase/server/component/state"- "github.com/bytebase/bytebase/server/runner/schemasync"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/server/component/activity"+ "github.com/bytebase/bytebase/backend/server/component/config"+ "github.com/bytebase/bytebase/backend/server/component/dbfactory"+ "github.com/bytebase/bytebase/backend/server/component/state"+ "github.com/bytebase/bytebase/backend/server/runner/schemasync"+ "github.com/bytebase/bytebase/backend/store")// NewSchemaBaselineExecutor creates a schema baseline task executor.diff --git a/server/runner/taskrun/schema_update_executor.go b/backend/server/runner/taskrun/schema_update_executor.gosimilarity index 82%rename from server/runner/taskrun/schema_update_executor.gorename to backend/server/runner/taskrun/schema_update_executor.goindex 0df3fdd4b1..ed632619c9 100644--- a/server/runner/taskrun/schema_update_executor.go+++ b/backend/server/runner/taskrun/schema_update_executor.go@@ -7,15 +7,15 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/server/component/activity"- "github.com/bytebase/bytebase/server/component/config"- "github.com/bytebase/bytebase/server/component/dbfactory"- "github.com/bytebase/bytebase/server/component/state"- "github.com/bytebase/bytebase/server/runner/schemasync"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/server/component/activity"+ "github.com/bytebase/bytebase/backend/server/component/config"+ "github.com/bytebase/bytebase/backend/server/component/dbfactory"+ "github.com/bytebase/bytebase/backend/server/component/state"+ "github.com/bytebase/bytebase/backend/server/runner/schemasync"+ "github.com/bytebase/bytebase/backend/store")// NewSchemaUpdateExecutor creates a schema update (DDL) task executor.diff --git a/server/runner/taskrun/schema_update_ghost_cutover_executor.go b/backend/server/runner/taskrun/schema_update_ghost_cutover_executor.gosimilarity index 90%rename from server/runner/taskrun/schema_update_ghost_cutover_executor.gorename to backend/server/runner/taskrun/schema_update_ghost_cutover_executor.goindex 2516bb8084..6e67490144 100644--- a/server/runner/taskrun/schema_update_ghost_cutover_executor.go+++ b/backend/server/runner/taskrun/schema_update_ghost_cutover_executor.go@@ -13,19 +13,19 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/util"- vcsPlugin "github.com/bytebase/bytebase/plugin/vcs"- "github.com/bytebase/bytebase/server/component/activity"- "github.com/bytebase/bytebase/server/component/config"- "github.com/bytebase/bytebase/server/component/dbfactory"- "github.com/bytebase/bytebase/server/component/state"- "github.com/bytebase/bytebase/server/runner/schemasync"- "github.com/bytebase/bytebase/server/utils"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/util"+ vcsPlugin "github.com/bytebase/bytebase/backend/plugin/vcs"+ "github.com/bytebase/bytebase/backend/server/component/activity"+ "github.com/bytebase/bytebase/backend/server/component/config"+ "github.com/bytebase/bytebase/backend/server/component/dbfactory"+ "github.com/bytebase/bytebase/backend/server/component/state"+ "github.com/bytebase/bytebase/backend/server/runner/schemasync"+ "github.com/bytebase/bytebase/backend/server/utils"+ "github.com/bytebase/bytebase/backend/store")// NewSchemaUpdateGhostCutoverExecutor creates a schema update (gh-ost) cutover task executor.diff --git a/server/runner/taskrun/schema_update_ghost_sync_executor.go b/backend/server/runner/taskrun/schema_update_ghost_sync_executor.gosimilarity index 93%rename from server/runner/taskrun/schema_update_ghost_sync_executor.gorename to backend/server/runner/taskrun/schema_update_ghost_sync_executor.goindex 69412fa15f..090a2b91a1 100644--- a/server/runner/taskrun/schema_update_ghost_sync_executor.go+++ b/backend/server/runner/taskrun/schema_update_ghost_sync_executor.go@@ -12,12 +12,12 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/server/component/state"- "github.com/bytebase/bytebase/server/utils"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/server/component/state"+ "github.com/bytebase/bytebase/backend/server/utils"+ "github.com/bytebase/bytebase/backend/store")// NewSchemaUpdateGhostSyncExecutor creates a schema update (gh-ost) sync task executor.diff --git a/server/runner/taskrun/schema_update_sdl_executor.go b/backend/server/runner/taskrun/schema_update_sdl_executor.gosimilarity index 84%rename from server/runner/taskrun/schema_update_sdl_executor.gorename to backend/server/runner/taskrun/schema_update_sdl_executor.goindex e5b5a77da6..b1b69babbe 100644--- a/server/runner/taskrun/schema_update_sdl_executor.go+++ b/backend/server/runner/taskrun/schema_update_sdl_executor.go@@ -8,17 +8,17 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/parser"- "github.com/bytebase/bytebase/plugin/parser/differ"- "github.com/bytebase/bytebase/server/component/activity"- "github.com/bytebase/bytebase/server/component/config"- "github.com/bytebase/bytebase/server/component/dbfactory"- "github.com/bytebase/bytebase/server/component/state"- "github.com/bytebase/bytebase/server/runner/schemasync"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/parser"+ "github.com/bytebase/bytebase/backend/plugin/parser/differ"+ "github.com/bytebase/bytebase/backend/server/component/activity"+ "github.com/bytebase/bytebase/backend/server/component/config"+ "github.com/bytebase/bytebase/backend/server/component/dbfactory"+ "github.com/bytebase/bytebase/backend/server/component/state"+ "github.com/bytebase/bytebase/backend/server/runner/schemasync"+ "github.com/bytebase/bytebase/backend/store")// NewSchemaUpdateSDLExecutor creates a schema update (SDL) task executor.diff --git a/server/server.go b/backend/server/server.gosimilarity index 89%rename from server/server.gorename to backend/server/server.goindex 89bb223da6..86f1e7b57f 100644--- a/server/server.go+++ b/backend/server/server.go@@ -32,71 +32,71 @@ import (v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ enterpriseAPI "github.com/bytebase/bytebase/backend/enterprise/api"+ enterpriseService "github.com/bytebase/bytebase/backend/enterprise/service"+ "github.com/bytebase/bytebase/backend/metric"+ metricCollector "github.com/bytebase/bytebase/backend/metric/collector"+ "github.com/bytebase/bytebase/backend/plugin/app/feishu"+ bbs3 "github.com/bytebase/bytebase/backend/plugin/storage/s3"+ "github.com/bytebase/bytebase/backend/resources/mongoutil"+ "github.com/bytebase/bytebase/backend/resources/mysqlutil"+ "github.com/bytebase/bytebase/backend/resources/postgres"+ "github.com/bytebase/bytebase/backend/server/api/auth"+ v1 "github.com/bytebase/bytebase/backend/server/api/v1"+ "github.com/bytebase/bytebase/backend/server/component/activity"+ "github.com/bytebase/bytebase/backend/server/component/config"+ "github.com/bytebase/bytebase/backend/server/component/dbfactory"+ "github.com/bytebase/bytebase/backend/server/component/state"+ "github.com/bytebase/bytebase/backend/server/runner/anomaly"+ "github.com/bytebase/bytebase/backend/server/runner/apprun"+ "github.com/bytebase/bytebase/backend/server/runner/backuprun"+ "github.com/bytebase/bytebase/backend/server/runner/metricreport"+ "github.com/bytebase/bytebase/backend/server/runner/rollbackrun"+ "github.com/bytebase/bytebase/backend/server/runner/schemasync"+ "github.com/bytebase/bytebase/backend/server/runner/taskcheck"+ "github.com/bytebase/bytebase/backend/server/runner/taskrun"+ "github.com/bytebase/bytebase/backend/store"_ "github.com/bytebase/bytebase/docs/openapi" // initial the swagger doc- enterpriseAPI "github.com/bytebase/bytebase/enterprise/api"- enterpriseService "github.com/bytebase/bytebase/enterprise/service"- "github.com/bytebase/bytebase/metric"- metricCollector "github.com/bytebase/bytebase/metric/collector"- "github.com/bytebase/bytebase/plugin/app/feishu"- bbs3 "github.com/bytebase/bytebase/plugin/storage/s3"- "github.com/bytebase/bytebase/resources/mongoutil"- "github.com/bytebase/bytebase/resources/mysqlutil"- "github.com/bytebase/bytebase/resources/postgres"- "github.com/bytebase/bytebase/server/api/auth"- v1 "github.com/bytebase/bytebase/server/api/v1"- "github.com/bytebase/bytebase/server/component/activity"- "github.com/bytebase/bytebase/server/component/config"- "github.com/bytebase/bytebase/server/component/dbfactory"- "github.com/bytebase/bytebase/server/component/state"- "github.com/bytebase/bytebase/server/runner/anomaly"- "github.com/bytebase/bytebase/server/runner/apprun"- "github.com/bytebase/bytebase/server/runner/backuprun"- "github.com/bytebase/bytebase/server/runner/metricreport"- "github.com/bytebase/bytebase/server/runner/rollbackrun"- "github.com/bytebase/bytebase/server/runner/schemasync"- "github.com/bytebase/bytebase/server/runner/taskcheck"- "github.com/bytebase/bytebase/server/runner/taskrun"- "github.com/bytebase/bytebase/store"// Register clickhouse driver.- _ "github.com/bytebase/bytebase/plugin/db/clickhouse"+ _ "github.com/bytebase/bytebase/backend/plugin/db/clickhouse"// Register mysql driver.- _ "github.com/bytebase/bytebase/plugin/db/mysql"+ _ "github.com/bytebase/bytebase/backend/plugin/db/mysql"// Register postgres driver.- _ "github.com/bytebase/bytebase/plugin/db/pg"+ _ "github.com/bytebase/bytebase/backend/plugin/db/pg"// Register snowflake driver.- _ "github.com/bytebase/bytebase/plugin/db/snowflake"+ _ "github.com/bytebase/bytebase/backend/plugin/db/snowflake"// Register sqlite driver.- _ "github.com/bytebase/bytebase/plugin/db/sqlite"+ _ "github.com/bytebase/bytebase/backend/plugin/db/sqlite"// Register mongodb driver.- _ "github.com/bytebase/bytebase/plugin/db/mongodb"+ _ "github.com/bytebase/bytebase/backend/plugin/db/mongodb"// Register spanner driver.- _ "github.com/bytebase/bytebase/plugin/db/spanner"+ _ "github.com/bytebase/bytebase/backend/plugin/db/spanner"// Register pingcap parser driver._ "github.com/pingcap/tidb/types/parser_driver"// Register fake advisor.- _ "github.com/bytebase/bytebase/plugin/advisor/fake"+ _ "github.com/bytebase/bytebase/backend/plugin/advisor/fake"// Register mysql advisor.- _ "github.com/bytebase/bytebase/plugin/advisor/mysql"+ _ "github.com/bytebase/bytebase/backend/plugin/advisor/mysql"// Register postgresql advisor.- _ "github.com/bytebase/bytebase/plugin/advisor/pg"+ _ "github.com/bytebase/bytebase/backend/plugin/advisor/pg"// Register mysql differ driver.- _ "github.com/bytebase/bytebase/plugin/parser/differ/mysql"+ _ "github.com/bytebase/bytebase/backend/plugin/parser/differ/mysql"// Register postgres differ driver.- _ "github.com/bytebase/bytebase/plugin/parser/differ/pg"+ _ "github.com/bytebase/bytebase/backend/plugin/parser/differ/pg"// Register mysql edit driver.- _ "github.com/bytebase/bytebase/plugin/parser/edit/mysql"+ _ "github.com/bytebase/bytebase/backend/plugin/parser/edit/mysql"// Register postgres edit driver.- _ "github.com/bytebase/bytebase/plugin/parser/edit/pg"+ _ "github.com/bytebase/bytebase/backend/plugin/parser/edit/pg"// Register postgres parser driver.- _ "github.com/bytebase/bytebase/plugin/parser/engine/pg"+ _ "github.com/bytebase/bytebase/backend/plugin/parser/engine/pg"// Register mysql transform driver.- _ "github.com/bytebase/bytebase/plugin/parser/transform/mysql"+ _ "github.com/bytebase/bytebase/backend/plugin/parser/transform/mysql")const (@@ -169,7 +169,7 @@ var casbinDBAPolicy stringvar casbinDeveloperPolicy string// Use following cmd to generate swagger doc-// swag init -g ./server.go -d ./server --output docs/openapi --parseDependency+// swag init -g ./backend/server.go -d ./backend/server --output docs/openapi --parseDependency// @title Bytebase OpenAPI// @version 1.0diff --git a/server/server_frontend_embed.go b/backend/server/server_frontend_embed.gosimilarity index 97%rename from server/server_frontend_embed.gorename to backend/server/server_frontend_embed.goindex d694826e1a..491c7f4f10 100644--- a/server/server_frontend_embed.go+++ b/backend/server/server_frontend_embed.go@@ -12,7 +12,7 @@ import ("github.com/labstack/echo/v4""github.com/labstack/echo/v4/middleware"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/common")//go:embed dist/assets/*diff --git a/server/server_frontend_not_embed.go b/backend/server/server_frontend_not_embed.gosimilarity index 95%rename from server/server_frontend_not_embed.gorename to backend/server/server_frontend_not_embed.goindex 168a1b8342..88108b3b1e 100644--- a/server/server_frontend_not_embed.go+++ b/backend/server/server_frontend_not_embed.go@@ -10,7 +10,7 @@ import ("github.com/labstack/echo/v4"- "github.com/bytebase/bytebase/common/log"+ "github.com/bytebase/bytebase/backend/common/log")func embedFrontend(e *echo.Echo) {diff --git a/server/setting.go b/backend/server/setting.gosimilarity index 96%rename from server/setting.gorename to backend/server/setting.goindex 02a8b7f47b..7bbe8598eb 100644--- a/server/setting.go+++ b/backend/server/setting.go@@ -8,9 +8,9 @@ import ("github.com/google/jsonapi""github.com/labstack/echo/v4"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/app/feishu"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/app/feishu")// Some settings contain secret info so we only return settings that are needed by the client.diff --git a/server/sheet.go b/backend/server/sheet.gosimilarity index 98%rename from server/sheet.gorename to backend/server/sheet.goindex 4c51ba3300..e83d515098 100644--- a/server/sheet.go+++ b/backend/server/sheet.go@@ -11,9 +11,9 @@ import ("github.com/labstack/echo/v4""github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/store")func (s *Server) registerSheetRoutes(g *echo.Group) {diff --git a/server/sheet_organizer.go b/backend/server/sheet_organizer.gosimilarity index 96%rename from server/sheet_organizer.gorename to backend/server/sheet_organizer.goindex 5e6a0112da..dab16cc2fe 100644--- a/server/sheet_organizer.go+++ b/backend/server/sheet_organizer.go@@ -8,7 +8,7 @@ import ("github.com/google/jsonapi""github.com/labstack/echo/v4"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")func (s *Server) registerSheetOrganizerRoutes(g *echo.Group) {diff --git a/server/sheet_test.go b/backend/server/sheet_test.gosimilarity index 100%rename from server/sheet_test.gorename to backend/server/sheet_test.godiff --git a/server/sql.go b/backend/server/sql.gosimilarity index 97%rename from server/sql.gorename to backend/server/sql.goindex f59cc7828f..3776b96a56 100644--- a/server/sql.go+++ b/backend/server/sql.go@@ -15,18 +15,18 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/catalog"- advisorDB "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/util"- "github.com/bytebase/bytebase/plugin/parser"- "github.com/bytebase/bytebase/plugin/parser/ast"- "github.com/bytebase/bytebase/server/component/activity"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/catalog"+ advisorDB "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/util"+ "github.com/bytebase/bytebase/backend/plugin/parser"+ "github.com/bytebase/bytebase/backend/plugin/parser/ast"+ "github.com/bytebase/bytebase/backend/server/component/activity"+ "github.com/bytebase/bytebase/backend/store")func (s *Server) registerSQLRoutes(g *echo.Group) {diff --git a/server/sql_test.go b/backend/server/sql_test.gosimilarity index 100%rename from server/sql_test.gorename to backend/server/sql_test.godiff --git a/server/stage.go b/backend/server/stage.gosimilarity index 98%rename from server/stage.gorename to backend/server/stage.goindex bf496dca70..fa34c04958 100644--- a/server/stage.go+++ b/backend/server/stage.go@@ -8,7 +8,7 @@ import ("github.com/google/jsonapi""github.com/labstack/echo/v4"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")func (s *Server) registerStageRoutes(g *echo.Group) {diff --git a/server/subscription.go b/backend/server/subscription.gosimilarity index 95%rename from server/subscription.gorename to backend/server/subscription.goindex a208b3fb53..a87fb4ec82 100644--- a/server/subscription.go+++ b/backend/server/subscription.go@@ -9,11 +9,11 @@ import ("github.com/google/jsonapi""github.com/labstack/echo/v4"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- enterpriseAPI "github.com/bytebase/bytebase/enterprise/api"- metricAPI "github.com/bytebase/bytebase/metric"- "github.com/bytebase/bytebase/plugin/metric"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ enterpriseAPI "github.com/bytebase/bytebase/backend/enterprise/api"+ metricAPI "github.com/bytebase/bytebase/backend/metric"+ "github.com/bytebase/bytebase/backend/plugin/metric")func (s *Server) registerSubscriptionRoutes(g *echo.Group) {diff --git a/server/task.go b/backend/server/task.gosimilarity index 98%rename from server/task.gorename to backend/server/task.goindex 44c232b190..23e0a754c5 100644--- a/server/task.go+++ b/backend/server/task.go@@ -8,8 +8,8 @@ import ("github.com/google/jsonapi""github.com/labstack/echo/v4"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")func (s *Server) registerTaskRoutes(g *echo.Group) {diff --git a/server/utils/utils.go b/backend/server/utils/utils.gosimilarity index 98%rename from server/utils/utils.gorename to backend/server/utils/utils.goindex c41728b039..9d90f646f7 100644--- a/server/utils/utils.go+++ b/backend/server/utils/utils.go@@ -13,10 +13,10 @@ import (ghostsql "github.com/github/gh-ost/go/sql""github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/store")// GetLatestSchemaVersion gets the latest schema version for a database.diff --git a/server/utils/utils_test.go b/backend/server/utils/utils_test.gosimilarity index 98%rename from server/utils/utils_test.gorename to backend/server/utils/utils_test.goindex fef4e33dfe..1cef5a5567 100644--- a/server/utils/utils_test.go+++ b/backend/server/utils/utils_test.go@@ -6,8 +6,8 @@ import ("github.com/stretchr/testify/assert""github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/store")func TestGetDatabaseMatrixFromDeploymentSchedule(t *testing.T) {diff --git a/server/vcs.go b/backend/server/vcs.gosimilarity index 98%rename from server/vcs.gorename to backend/server/vcs.goindex 905a3a5ab2..cbe2c75e31 100644--- a/server/vcs.go+++ b/backend/server/vcs.go@@ -9,9 +9,9 @@ import ("github.com/google/jsonapi""github.com/labstack/echo/v4"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/vcs"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/vcs")func (s *Server) registerVCSRoutes(g *echo.Group) {diff --git a/server/webhook.go b/backend/server/webhook.gosimilarity index 98%rename from server/webhook.gorename to backend/server/webhook.goindex 370ae06997..6e907319de 100644--- a/server/webhook.go+++ b/backend/server/webhook.go@@ -21,18 +21,18 @@ import ("go.uber.org/zap""gopkg.in/yaml.v3"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/advisor"- advisorDB "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/vcs"- "github.com/bytebase/bytebase/plugin/vcs/github"- "github.com/bytebase/bytebase/plugin/vcs/gitlab"- "github.com/bytebase/bytebase/server/component/activity"- "github.com/bytebase/bytebase/server/utils"- "github.com/bytebase/bytebase/store"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ advisorDB "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/vcs"+ "github.com/bytebase/bytebase/backend/plugin/vcs/github"+ "github.com/bytebase/bytebase/backend/plugin/vcs/gitlab"+ "github.com/bytebase/bytebase/backend/server/component/activity"+ "github.com/bytebase/bytebase/backend/server/utils"+ "github.com/bytebase/bytebase/backend/store")const (diff --git a/server/webhook_test.go b/backend/server/webhook_test.gosimilarity index 98%rename from server/webhook_test.gorename to backend/server/webhook_test.goindex c3e7f233e7..db785962f5 100644--- a/server/webhook_test.go+++ b/backend/server/webhook_test.go@@ -6,10 +6,10 @@ import ("github.com/stretchr/testify/assert""github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/vcs"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/vcs")// TODO(d): fix the double underscore "__".diff --git a/sql-server/advise.go b/backend/sql-server/advise.gosimilarity index 94%rename from sql-server/advise.gorename to backend/sql-server/advise.goindex 90135d5399..e8ca817645 100644--- a/sql-server/advise.go+++ b/backend/sql-server/advise.go@@ -7,15 +7,15 @@ import ("io""net/http"- metricAPI "github.com/bytebase/bytebase/metric"+ metricAPI "github.com/bytebase/bytebase/backend/metric""github.com/labstack/echo/v4""gopkg.in/yaml.v3"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/advisor/catalog"- advisorDB "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/metric"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/advisor/catalog"+ advisorDB "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/metric")var (diff --git a/sql-server/metric.go b/backend/sql-server/metric.gosimilarity index 87%rename from sql-server/metric.gorename to backend/sql-server/metric.goindex 331e841663..24b32ce42f 100644--- a/sql-server/metric.go+++ b/backend/sql-server/metric.go@@ -7,9 +7,9 @@ import ("github.com/labstack/echo/v4""go.uber.org/zap"- "github.com/bytebase/bytebase/common/log"- metricAPI "github.com/bytebase/bytebase/metric"- "github.com/bytebase/bytebase/plugin/metric"+ "github.com/bytebase/bytebase/backend/common/log"+ metricAPI "github.com/bytebase/bytebase/backend/metric"+ "github.com/bytebase/bytebase/backend/plugin/metric")type metricReporter struct {diff --git a/sql-server/profile.go b/backend/sql-server/profile.gosimilarity index 92%rename from sql-server/profile.gorename to backend/sql-server/profile.goindex 4e9c8f9e30..0e13a08438 100644--- a/sql-server/profile.go+++ b/backend/sql-server/profile.go@@ -1,6 +1,6 @@package sqlserver-import "github.com/bytebase/bytebase/common"+import "github.com/bytebase/bytebase/backend/common"// Profile is the configuration to start main server.type Profile struct {diff --git a/sql-server/server.go b/backend/sql-server/server.gosimilarity index 93%rename from sql-server/server.gorename to backend/sql-server/server.goindex b29c76050d..1f71813225 100644--- a/sql-server/server.go+++ b/backend/sql-server/server.go@@ -9,16 +9,16 @@ import (echoSwagger "github.com/swaggo/echo-swagger"+ "github.com/bytebase/bytebase/backend/plugin/metric/segment"_ "github.com/bytebase/bytebase/docs/sqlservice" // initial the swagger doc- "github.com/bytebase/bytebase/plugin/metric/segment""github.com/labstack/echo-contrib/pprof""github.com/labstack/echo-contrib/prometheus""github.com/labstack/echo/v4""github.com/labstack/echo/v4/middleware"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log")// Server is the Bytebase server.@@ -30,7 +30,7 @@ type Server struct {}// Use following cmd to generate swagger doc-// swag init -g ./server.go -d ./sql-server --output docs/sqlservice --parseDependency+// swag init -g ./backend/server.go -d ./backend/sql-server --output docs/sqlservice --parseDependency// @title Bytebase SQL Service// @version 1.0diff --git a/store/CODENOTIFY b/backend/store/CODENOTIFYsimilarity index 100%rename from store/CODENOTIFYrename to backend/store/CODENOTIFYdiff --git a/store/README.md b/backend/store/README.mdsimilarity index 100%rename from store/README.mdrename to backend/store/README.mddiff --git a/store/activity.go b/backend/store/activity.gosimilarity index 99%rename from store/activity.gorename to backend/store/activity.goindex e65b0d9f7f..a352669f00 100644--- a/store/activity.go+++ b/backend/store/activity.go@@ -8,8 +8,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")// activityRaw is the store model for an Activity.diff --git a/store/anomaly.go b/backend/store/anomaly.gosimilarity index 99%rename from store/anomaly.gorename to backend/store/anomaly.goindex 0e48cc66b4..96b8ba72b0 100644--- a/store/anomaly.go+++ b/backend/store/anomaly.go@@ -8,8 +8,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")// anomalyRaw is the store model for an Anomaly.diff --git a/store/backup.go b/backend/store/backup.gosimilarity index 99%rename from store/backup.gorename to backend/store/backup.goindex 427800912d..ab17f56b63 100644--- a/store/backup.go+++ b/backend/store/backup.go@@ -9,8 +9,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")// backupRaw is the store model for an Backup.diff --git a/store/bookmark.go b/backend/store/bookmark.gosimilarity index 98%rename from store/bookmark.gorename to backend/store/bookmark.goindex ed53677946..8817c981c4 100644--- a/store/bookmark.go+++ b/backend/store/bookmark.go@@ -8,8 +8,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")// bookmarkRaw is the store model for an Bookmark.diff --git a/store/cache.go b/backend/store/cache.gosimilarity index 100%rename from store/cache.gorename to backend/store/cache.godiff --git a/store/catalog.go b/backend/store/catalog.gosimilarity index 82%rename from store/catalog.gorename to backend/store/catalog.goindex f08e57e604..df97b49754 100644--- a/store/catalog.go+++ b/backend/store/catalog.go@@ -3,9 +3,9 @@ package storeimport ("context"- "github.com/bytebase/bytebase/plugin/advisor/catalog"- advisorDB "github.com/bytebase/bytebase/plugin/advisor/db"- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/advisor/catalog"+ advisorDB "github.com/bytebase/bytebase/backend/plugin/advisor/db"+ "github.com/bytebase/bytebase/backend/plugin/db")var (diff --git a/store/data_source.go b/backend/store/data_source.gosimilarity index 99%rename from store/data_source.gorename to backend/store/data_source.goindex c3022b5475..1f17458516 100644--- a/store/data_source.go+++ b/backend/store/data_source.go@@ -7,7 +7,7 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")// DataSourceMessage is the message for data source.diff --git a/store/database.go b/backend/store/database.gosimilarity index 99%rename from store/database.gorename to backend/store/database.goindex 83f5c83a4a..383b51c198 100644--- a/store/database.go+++ b/backend/store/database.go@@ -10,8 +10,8 @@ import ("github.com/lib/pq""github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")// FindDatabase finds a list of Database instances.diff --git a/store/db_schema.go b/backend/store/db_schema.gosimilarity index 100%rename from store/db_schema.gorename to backend/store/db_schema.godiff --git a/store/demo/dev/10000##reset.sql b/backend/store/demo/dev/10000##reset.sqlsimilarity index 100%rename from store/demo/dev/10000##reset.sqlrename to backend/store/demo/dev/10000##reset.sqldiff --git a/store/demo/dev/10001##principal.sql b/backend/store/demo/dev/10001##principal.sqlsimilarity index 100%rename from store/demo/dev/10001##principal.sqlrename to backend/store/demo/dev/10001##principal.sqldiff --git a/store/demo/dev/10010##workspace.sql b/backend/store/demo/dev/10010##workspace.sqlsimilarity index 100%rename from store/demo/dev/10010##workspace.sqlrename to backend/store/demo/dev/10010##workspace.sqldiff --git a/store/demo/dev/10020##member.sql b/backend/store/demo/dev/10020##member.sqlsimilarity index 100%rename from store/demo/dev/10020##member.sqlrename to backend/store/demo/dev/10020##member.sqldiff --git a/store/demo/dev/10030##project.sql b/backend/store/demo/dev/10030##project.sqlsimilarity index 100%rename from store/demo/dev/10030##project.sqlrename to backend/store/demo/dev/10030##project.sqldiff --git a/store/demo/dev/10040##project_member.sql b/backend/store/demo/dev/10040##project_member.sqlsimilarity index 100%rename from store/demo/dev/10040##project_member.sqlrename to backend/store/demo/dev/10040##project_member.sqldiff --git a/store/demo/dev/10041##project_webhook.sql b/backend/store/demo/dev/10041##project_webhook.sqlsimilarity index 100%rename from store/demo/dev/10041##project_webhook.sqlrename to backend/store/demo/dev/10041##project_webhook.sqldiff --git a/store/demo/dev/10050##environment.sql b/backend/store/demo/dev/10050##environment.sqlsimilarity index 100%rename from store/demo/dev/10050##environment.sqlrename to backend/store/demo/dev/10050##environment.sqldiff --git a/store/demo/dev/10051##policy.sql b/backend/store/demo/dev/10051##policy.sqlsimilarity index 100%rename from store/demo/dev/10051##policy.sqlrename to backend/store/demo/dev/10051##policy.sqldiff --git a/store/demo/dev/10060##instance.sql b/backend/store/demo/dev/10060##instance.sqlsimilarity index 100%rename from store/demo/dev/10060##instance.sqlrename to backend/store/demo/dev/10060##instance.sqldiff --git a/store/demo/dev/10061##instance_user.sql b/backend/store/demo/dev/10061##instance_user.sqlsimilarity index 100%rename from store/demo/dev/10061##instance_user.sqlrename to backend/store/demo/dev/10061##instance_user.sqldiff --git a/store/demo/dev/10070##db.sql b/backend/store/demo/dev/10070##db.sqlsimilarity index 100%rename from store/demo/dev/10070##db.sqlrename to backend/store/demo/dev/10070##db.sqldiff --git a/store/demo/dev/10071##db_schema.sql b/backend/store/demo/dev/10071##db_schema.sqlsimilarity index 100%rename from store/demo/dev/10071##db_schema.sqlrename to backend/store/demo/dev/10071##db_schema.sqldiff --git a/store/demo/dev/10074##backup.sql b/backend/store/demo/dev/10074##backup.sqlsimilarity index 100%rename from store/demo/dev/10074##backup.sqlrename to backend/store/demo/dev/10074##backup.sqldiff --git a/store/demo/dev/10080##data_source.sql b/backend/store/demo/dev/10080##data_source.sqlsimilarity index 100%rename from store/demo/dev/10080##data_source.sqlrename to backend/store/demo/dev/10080##data_source.sqldiff --git a/store/demo/dev/10090##pipeline.sql b/backend/store/demo/dev/10090##pipeline.sqlsimilarity index 100%rename from store/demo/dev/10090##pipeline.sqlrename to backend/store/demo/dev/10090##pipeline.sqldiff --git a/store/demo/dev/10100##stage.sql b/backend/store/demo/dev/10100##stage.sqlsimilarity index 100%rename from store/demo/dev/10100##stage.sqlrename to backend/store/demo/dev/10100##stage.sqldiff --git a/store/demo/dev/10110##task.sql b/backend/store/demo/dev/10110##task.sqlsimilarity index 100%rename from store/demo/dev/10110##task.sqlrename to backend/store/demo/dev/10110##task.sqldiff --git a/store/demo/dev/10111##task_dag.sql b/backend/store/demo/dev/10111##task_dag.sqlsimilarity index 100%rename from store/demo/dev/10111##task_dag.sqlrename to backend/store/demo/dev/10111##task_dag.sqldiff --git a/store/demo/dev/10120##task_run.sql b/backend/store/demo/dev/10120##task_run.sqlsimilarity index 100%rename from store/demo/dev/10120##task_run.sqlrename to backend/store/demo/dev/10120##task_run.sqldiff --git a/store/demo/dev/10121##task_check_run.sql b/backend/store/demo/dev/10121##task_check_run.sqlsimilarity index 100%rename from store/demo/dev/10121##task_check_run.sqlrename to backend/store/demo/dev/10121##task_check_run.sqldiff --git a/store/demo/dev/10130##issue.sql b/backend/store/demo/dev/10130##issue.sqlsimilarity index 100%rename from store/demo/dev/10130##issue.sqlrename to backend/store/demo/dev/10130##issue.sqldiff --git a/store/demo/dev/10131##issue_subscriber.sql b/backend/store/demo/dev/10131##issue_subscriber.sqlsimilarity index 100%rename from store/demo/dev/10131##issue_subscriber.sqlrename to backend/store/demo/dev/10131##issue_subscriber.sqldiff --git a/store/demo/dev/10140##activity.sql b/backend/store/demo/dev/10140##activity.sqlsimilarity index 100%rename from store/demo/dev/10140##activity.sqlrename to backend/store/demo/dev/10140##activity.sqldiff --git a/store/demo/dev/10150##inbox.sql b/backend/store/demo/dev/10150##inbox.sqlsimilarity index 100%rename from store/demo/dev/10150##inbox.sqlrename to backend/store/demo/dev/10150##inbox.sqldiff --git a/store/demo/dev/10160##bookmark.sql b/backend/store/demo/dev/10160##bookmark.sqlsimilarity index 100%rename from store/demo/dev/10160##bookmark.sqlrename to backend/store/demo/dev/10160##bookmark.sqldiff --git a/store/demo/dev/10170##vcs.sql b/backend/store/demo/dev/10170##vcs.sqlsimilarity index 100%rename from store/demo/dev/10170##vcs.sqlrename to backend/store/demo/dev/10170##vcs.sqldiff --git a/store/demo/dev/10180##repository.sql b/backend/store/demo/dev/10180##repository.sqlsimilarity index 100%rename from store/demo/dev/10180##repository.sqlrename to backend/store/demo/dev/10180##repository.sqldiff --git a/store/demo/dev/10190##anomaly.sql b/backend/store/demo/dev/10190##anomaly.sqlsimilarity index 100%rename from store/demo/dev/10190##anomaly.sqlrename to backend/store/demo/dev/10190##anomaly.sqldiff --git a/store/demo/dev/README.md b/backend/store/demo/dev/README.mdsimilarity index 100%rename from store/demo/dev/README.mdrename to backend/store/demo/dev/README.mddiff --git a/store/demo/prod/10000##reset.sql b/backend/store/demo/prod/10000##reset.sqlsimilarity index 100%rename from store/demo/prod/10000##reset.sqlrename to backend/store/demo/prod/10000##reset.sqldiff --git a/store/demo/prod/10001##principal.sql b/backend/store/demo/prod/10001##principal.sqlsimilarity index 100%rename from store/demo/prod/10001##principal.sqlrename to backend/store/demo/prod/10001##principal.sqldiff --git a/store/demo/prod/10010##workspace.sql b/backend/store/demo/prod/10010##workspace.sqlsimilarity index 100%rename from store/demo/prod/10010##workspace.sqlrename to backend/store/demo/prod/10010##workspace.sqldiff --git a/store/demo/prod/10020##member.sql b/backend/store/demo/prod/10020##member.sqlsimilarity index 100%rename from store/demo/prod/10020##member.sqlrename to backend/store/demo/prod/10020##member.sqldiff --git a/store/demo/prod/10030##project.sql b/backend/store/demo/prod/10030##project.sqlsimilarity index 100%rename from store/demo/prod/10030##project.sqlrename to backend/store/demo/prod/10030##project.sqldiff --git a/store/demo/prod/10040##project_member.sql b/backend/store/demo/prod/10040##project_member.sqlsimilarity index 100%rename from store/demo/prod/10040##project_member.sqlrename to backend/store/demo/prod/10040##project_member.sqldiff --git a/store/demo/prod/10041##project_webhook.sql b/backend/store/demo/prod/10041##project_webhook.sqlsimilarity index 100%rename from store/demo/prod/10041##project_webhook.sqlrename to backend/store/demo/prod/10041##project_webhook.sqldiff --git a/store/demo/prod/10050##environment.sql b/backend/store/demo/prod/10050##environment.sqlsimilarity index 100%rename from store/demo/prod/10050##environment.sqlrename to backend/store/demo/prod/10050##environment.sqldiff --git a/store/demo/prod/10051##policy.sql b/backend/store/demo/prod/10051##policy.sqlsimilarity index 100%rename from store/demo/prod/10051##policy.sqlrename to backend/store/demo/prod/10051##policy.sqldiff --git a/store/demo/prod/10060##instance.sql b/backend/store/demo/prod/10060##instance.sqlsimilarity index 100%rename from store/demo/prod/10060##instance.sqlrename to backend/store/demo/prod/10060##instance.sqldiff --git a/store/demo/prod/10061##instance_user.sql b/backend/store/demo/prod/10061##instance_user.sqlsimilarity index 100%rename from store/demo/prod/10061##instance_user.sqlrename to backend/store/demo/prod/10061##instance_user.sqldiff --git a/store/demo/prod/10070##db.sql b/backend/store/demo/prod/10070##db.sqlsimilarity index 100%rename from store/demo/prod/10070##db.sqlrename to backend/store/demo/prod/10070##db.sqldiff --git a/store/demo/prod/10071##db_schema.sql b/backend/store/demo/prod/10071##db_schema.sqlsimilarity index 100%rename from store/demo/prod/10071##db_schema.sqlrename to backend/store/demo/prod/10071##db_schema.sqldiff --git a/store/demo/prod/10074##backup.sql b/backend/store/demo/prod/10074##backup.sqlsimilarity index 100%rename from store/demo/prod/10074##backup.sqlrename to backend/store/demo/prod/10074##backup.sqldiff --git a/store/demo/prod/10080##data_source.sql b/backend/store/demo/prod/10080##data_source.sqlsimilarity index 100%rename from store/demo/prod/10080##data_source.sqlrename to backend/store/demo/prod/10080##data_source.sqldiff --git a/store/demo/prod/10090##pipeline.sql b/backend/store/demo/prod/10090##pipeline.sqlsimilarity index 100%rename from store/demo/prod/10090##pipeline.sqlrename to backend/store/demo/prod/10090##pipeline.sqldiff --git a/store/demo/prod/10100##stage.sql b/backend/store/demo/prod/10100##stage.sqlsimilarity index 100%rename from store/demo/prod/10100##stage.sqlrename to backend/store/demo/prod/10100##stage.sqldiff --git a/store/demo/prod/10110##task.sql b/backend/store/demo/prod/10110##task.sqlsimilarity index 100%rename from store/demo/prod/10110##task.sqlrename to backend/store/demo/prod/10110##task.sqldiff --git a/store/demo/prod/10111##task_dag.sql b/backend/store/demo/prod/10111##task_dag.sqlsimilarity index 100%rename from store/demo/prod/10111##task_dag.sqlrename to backend/store/demo/prod/10111##task_dag.sqldiff --git a/store/demo/prod/10120##task_run.sql b/backend/store/demo/prod/10120##task_run.sqlsimilarity index 100%rename from store/demo/prod/10120##task_run.sqlrename to backend/store/demo/prod/10120##task_run.sqldiff --git a/store/demo/prod/10121##task_check_run.sql b/backend/store/demo/prod/10121##task_check_run.sqlsimilarity index 100%rename from store/demo/prod/10121##task_check_run.sqlrename to backend/store/demo/prod/10121##task_check_run.sqldiff --git a/store/demo/prod/10130##issue.sql b/backend/store/demo/prod/10130##issue.sqlsimilarity index 100%rename from store/demo/prod/10130##issue.sqlrename to backend/store/demo/prod/10130##issue.sqldiff --git a/store/demo/prod/10131##issue_subscriber.sql b/backend/store/demo/prod/10131##issue_subscriber.sqlsimilarity index 100%rename from store/demo/prod/10131##issue_subscriber.sqlrename to backend/store/demo/prod/10131##issue_subscriber.sqldiff --git a/store/demo/prod/10140##activity.sql b/backend/store/demo/prod/10140##activity.sqlsimilarity index 100%rename from store/demo/prod/10140##activity.sqlrename to backend/store/demo/prod/10140##activity.sqldiff --git a/store/demo/prod/10150##inbox.sql b/backend/store/demo/prod/10150##inbox.sqlsimilarity index 100%rename from store/demo/prod/10150##inbox.sqlrename to backend/store/demo/prod/10150##inbox.sqldiff --git a/store/demo/prod/10160##bookmark.sql b/backend/store/demo/prod/10160##bookmark.sqlsimilarity index 100%rename from store/demo/prod/10160##bookmark.sqlrename to backend/store/demo/prod/10160##bookmark.sqldiff --git a/store/demo/prod/10170##vcs.sql b/backend/store/demo/prod/10170##vcs.sqlsimilarity index 100%rename from store/demo/prod/10170##vcs.sqlrename to backend/store/demo/prod/10170##vcs.sqldiff --git a/store/demo/prod/10180##repository.sql b/backend/store/demo/prod/10180##repository.sqlsimilarity index 100%rename from store/demo/prod/10180##repository.sqlrename to backend/store/demo/prod/10180##repository.sqldiff --git a/store/demo/prod/10190##anomaly.sql b/backend/store/demo/prod/10190##anomaly.sqlsimilarity index 100%rename from store/demo/prod/10190##anomaly.sqlrename to backend/store/demo/prod/10190##anomaly.sqldiff --git a/store/demo/prod/README.md b/backend/store/demo/prod/README.mdsimilarity index 100%rename from store/demo/prod/README.mdrename to backend/store/demo/prod/README.mddiff --git a/store/demo/schema-migration-history/10000##reset.sql b/backend/store/demo/schema-migration-history/10000##reset.sqlsimilarity index 100%rename from store/demo/schema-migration-history/10000##reset.sqlrename to backend/store/demo/schema-migration-history/10000##reset.sqldiff --git a/store/demo/schema-migration-history/10001##data.sql b/backend/store/demo/schema-migration-history/10001##data.sqlsimilarity index 100%rename from store/demo/schema-migration-history/10001##data.sqlrename to backend/store/demo/schema-migration-history/10001##data.sqldiff --git a/store/deploy.go b/backend/store/deploy.gosimilarity index 98%rename from store/deploy.gorename to backend/store/deploy.goindex 8ca434810d..b6cb3c011f 100644--- a/store/deploy.go+++ b/backend/store/deploy.go@@ -9,8 +9,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")// deploymentConfigRaw is the store model for an DeploymentConfig.diff --git a/store/environment.go b/backend/store/environment.gosimilarity index 99%rename from store/environment.gorename to backend/store/environment.goindex 43dc31af6c..052577a327 100644--- a/store/environment.go+++ b/backend/store/environment.go@@ -9,8 +9,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")// EnvironmentCreate is the API message for creating an environment.diff --git a/store/external_approval.go b/backend/store/external_approval.gosimilarity index 98%rename from store/external_approval.gorename to backend/store/external_approval.goindex d32a9234b1..00ec906871 100644--- a/store/external_approval.go+++ b/backend/store/external_approval.go@@ -8,8 +8,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")type externalApprovalRaw struct {diff --git a/store/idp.go b/backend/store/idp.gosimilarity index 99%rename from store/idp.gorename to backend/store/idp.goindex 528795f0f0..47ce6b66cd 100644--- a/store/idp.go+++ b/backend/store/idp.go@@ -9,8 +9,8 @@ import ("github.com/pkg/errors""google.golang.org/protobuf/encoding/protojson"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"storepb "github.com/bytebase/bytebase/proto/generated-go/store")diff --git a/store/inbox.go b/backend/store/inbox.gosimilarity index 99%rename from store/inbox.gorename to backend/store/inbox.goindex 339134db4e..d79433ec31 100644--- a/store/inbox.go+++ b/backend/store/inbox.go@@ -8,8 +8,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")// inboxRaw is the store model for an Inbox.diff --git a/store/instance.go b/backend/store/instance.gosimilarity index 99%rename from store/instance.gorename to backend/store/instance.goindex 21551c8362..ef97adc12f 100644--- a/store/instance.go+++ b/backend/store/instance.go@@ -10,9 +10,9 @@ import ("google.golang.org/grpc/codes""google.golang.org/grpc/status"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/db")// GetInstanceByID gets an instance of Instance.diff --git a/store/instance_user.go b/backend/store/instance_user.gosimilarity index 98%rename from store/instance_user.gorename to backend/store/instance_user.goindex f978cff1f5..d2f40d1ad1 100644--- a/store/instance_user.go+++ b/backend/store/instance_user.go@@ -7,8 +7,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")// InstanceUserMessage is the mssage for instance user.diff --git a/store/instance_user_test.go b/backend/store/instance_user_test.gosimilarity index 100%rename from store/instance_user_test.gorename to backend/store/instance_user_test.godiff --git a/store/issue.go b/backend/store/issue.gosimilarity index 99%rename from store/issue.gorename to backend/store/issue.goindex d9303b8f4a..5f07fd005a 100644--- a/store/issue.go+++ b/backend/store/issue.go@@ -11,8 +11,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")// issueRaw is the store model for an Issue.diff --git a/store/issue_subscriber.go b/backend/store/issue_subscriber.gosimilarity index 98%rename from store/issue_subscriber.gorename to backend/store/issue_subscriber.goindex d216036300..6fca1bb943 100644--- a/store/issue_subscriber.go+++ b/backend/store/issue_subscriber.go@@ -8,8 +8,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")// issueSubscriberRaw is the store model for an IssueSubscriber.diff --git a/store/metadb.go b/backend/store/metadb.gosimilarity index 96%rename from store/metadb.gorename to backend/store/metadb.goindex acfde27f1f..30025a4505 100644--- a/store/metadb.go+++ b/backend/store/metadb.go@@ -8,10 +8,10 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- dbdriver "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/resources/postgres"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ dbdriver "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/resources/postgres")// MetadataDB abstracts the underlying Postgres instance.diff --git a/store/migration/dev/20220408000000##schema_version_type.sql b/backend/store/migration/dev/20220408000000##schema_version_type.sqlsimilarity index 100%rename from store/migration/dev/20220408000000##schema_version_type.sqlrename to backend/store/migration/dev/20220408000000##schema_version_type.sqldiff --git a/store/migration/dev/20230117000000##idp.sql b/backend/store/migration/dev/20230117000000##idp.sqlsimilarity index 100%rename from store/migration/dev/20230117000000##idp.sqlrename to backend/store/migration/dev/20230117000000##idp.sqldiff --git a/store/migration/dev/LATEST.sql b/backend/store/migration/dev/LATEST.sqlsimilarity index 100%rename from store/migration/dev/LATEST.sqlrename to backend/store/migration/dev/LATEST.sqldiff --git a/store/migration/dev/LATEST_DATA.sql b/backend/store/migration/dev/LATEST_DATA.sqlsimilarity index 100%rename from store/migration/dev/LATEST_DATA.sqlrename to backend/store/migration/dev/LATEST_DATA.sqldiff --git a/store/migration/prod/1.0/0000##initial_schema.sql b/backend/store/migration/prod/1.0/0000##initial_schema.sqlsimilarity index 100%rename from store/migration/prod/1.0/0000##initial_schema.sqlrename to backend/store/migration/prod/1.0/0000##initial_schema.sqldiff --git a/store/migration/prod/1.0/0001##initial_data.sql b/backend/store/migration/prod/1.0/0001##initial_data.sqlsimilarity index 100%rename from store/migration/prod/1.0/0001##initial_data.sqlrename to backend/store/migration/prod/1.0/0001##initial_data.sqldiff --git a/store/migration/prod/1.1/0000##db_extension.sql b/backend/store/migration/prod/1.1/0000##db_extension.sqlsimilarity index 100%rename from store/migration/prod/1.1/0000##db_extension.sqlrename to backend/store/migration/prod/1.1/0000##db_extension.sqldiff --git a/store/migration/prod/1.1/0001##sheet_vcs.sql b/backend/store/migration/prod/1.1/0001##sheet_vcs.sqlsimilarity index 100%rename from store/migration/prod/1.1/0001##sheet_vcs.sqlrename to backend/store/migration/prod/1.1/0001##sheet_vcs.sqldiff --git a/store/migration/prod/1.1/0002##sheet_organizer.sql b/backend/store/migration/prod/1.1/0002##sheet_organizer.sqlsimilarity index 100%rename from store/migration/prod/1.1/0002##sheet_organizer.sqlrename to backend/store/migration/prod/1.1/0002##sheet_organizer.sqldiff --git a/store/migration/prod/1.10/0000##db_schema.sql b/backend/store/migration/prod/1.10/0000##db_schema.sqlsimilarity index 100%rename from store/migration/prod/1.10/0000##db_schema.sqlrename to backend/store/migration/prod/1.10/0000##db_schema.sqldiff --git a/store/migration/prod/1.10/0001##add_idx_db_project_id.sql b/backend/store/migration/prod/1.10/0001##add_idx_db_project_id.sqlsimilarity index 100%rename from store/migration/prod/1.10/0001##add_idx_db_project_id.sqlrename to backend/store/migration/prod/1.10/0001##add_idx_db_project_id.sqldiff --git a/store/migration/prod/1.10/0002##resource_id.sql b/backend/store/migration/prod/1.10/0002##resource_id.sqlsimilarity index 100%rename from store/migration/prod/1.10/0002##resource_id.sqlrename to backend/store/migration/prod/1.10/0002##resource_id.sqldiff --git a/store/migration/prod/1.10/0003##mongo_instance_type.sql b/backend/store/migration/prod/1.10/0003##mongo_instance_type.sqlsimilarity index 100%rename from store/migration/prod/1.10/0003##mongo_instance_type.sqlrename to backend/store/migration/prod/1.10/0003##mongo_instance_type.sqldiff --git a/store/migration/prod/1.10/0004##add_datasource_option.sql b/backend/store/migration/prod/1.10/0004##add_datasource_option.sqlsimilarity index 100%rename from store/migration/prod/1.10/0004##add_datasource_option.sqlrename to backend/store/migration/prod/1.10/0004##add_datasource_option.sqldiff --git a/store/migration/prod/1.10/0005##data_source.sql b/backend/store/migration/prod/1.10/0005##data_source.sqlsimilarity index 100%rename from store/migration/prod/1.10/0005##data_source.sqlrename to backend/store/migration/prod/1.10/0005##data_source.sqldiff --git a/store/migration/prod/1.11/0000##add_instance_engine_spanner.sql b/backend/store/migration/prod/1.11/0000##add_instance_engine_spanner.sqlsimilarity index 100%rename from store/migration/prod/1.11/0000##add_instance_engine_spanner.sqlrename to backend/store/migration/prod/1.11/0000##add_instance_engine_spanner.sqldiff --git a/store/migration/prod/1.11/0001##change_migration_history_id_type_to_string.sql b/backend/store/migration/prod/1.11/0001##change_migration_history_id_type_to_string.sqlsimilarity index 100%rename from store/migration/prod/1.11/0001##change_migration_history_id_type_to_string.sqlrename to backend/store/migration/prod/1.11/0001##change_migration_history_id_type_to_string.sqldiff --git a/store/migration/prod/1.2/0000##backup.sql b/backend/store/migration/prod/1.2/0000##backup.sqlsimilarity index 100%rename from store/migration/prod/1.2/0000##backup.sqlrename to backend/store/migration/prod/1.2/0000##backup.sqldiff --git a/store/migration/prod/1.2/0001##task_dag.sql b/backend/store/migration/prod/1.2/0001##task_dag.sqlsimilarity index 100%rename from store/migration/prod/1.2/0001##task_dag.sqlrename to backend/store/migration/prod/1.2/0001##task_dag.sqldiff --git a/store/migration/prod/1.3/0000##idx_primary_key_column.sql b/backend/store/migration/prod/1.3/0000##idx_primary_key_column.sqlsimilarity index 100%rename from store/migration/prod/1.3/0000##idx_primary_key_column.sqlrename to backend/store/migration/prod/1.3/0000##idx_primary_key_column.sqldiff --git a/store/migration/prod/1.3/0001##github_com.sql b/backend/store/migration/prod/1.3/0001##github_com.sqlsimilarity index 100%rename from store/migration/prod/1.3/0001##github_com.sqlrename to backend/store/migration/prod/1.3/0001##github_com.sqldiff --git a/store/migration/prod/1.3/0002##backup_type_pitr.sql b/backend/store/migration/prod/1.3/0002##backup_type_pitr.sqlsimilarity index 100%rename from store/migration/prod/1.3/0002##backup_type_pitr.sqlrename to backend/store/migration/prod/1.3/0002##backup_type_pitr.sqldiff --git a/store/migration/prod/1.3/0003##backup_retention.sql b/backend/store/migration/prod/1.3/0003##backup_retention.sqlsimilarity index 100%rename from store/migration/prod/1.3/0003##backup_retention.sqlrename to backend/store/migration/prod/1.3/0003##backup_retention.sqldiff --git a/store/migration/prod/1.3/0004##fix_container_id.sql b/backend/store/migration/prod/1.3/0004##fix_container_id.sqlsimilarity index 100%rename from store/migration/prod/1.3/0004##fix_container_id.sqlrename to backend/store/migration/prod/1.3/0004##fix_container_id.sqldiff --git a/store/migration/prod/1.4/0000##add_project_schema_change_type.sql b/backend/store/migration/prod/1.4/0000##add_project_schema_change_type.sqlsimilarity index 100%rename from store/migration/prod/1.4/0000##add_project_schema_change_type.sqlrename to backend/store/migration/prod/1.4/0000##add_project_schema_change_type.sqldiff --git a/store/migration/prod/1.4/0001##drop_repository_webhook_index.sql b/backend/store/migration/prod/1.4/0001##drop_repository_webhook_index.sqlsimilarity index 100%rename from store/migration/prod/1.4/0001##drop_repository_webhook_index.sqlrename to backend/store/migration/prod/1.4/0001##drop_repository_webhook_index.sqldiff --git a/store/migration/prod/1.4/0002##delete_wildcard_database_backup_settings.sql b/backend/store/migration/prod/1.4/0002##delete_wildcard_database_backup_settings.sqlsimilarity index 100%rename from store/migration/prod/1.4/0002##delete_wildcard_database_backup_settings.sqlrename to backend/store/migration/prod/1.4/0002##delete_wildcard_database_backup_settings.sqldiff --git a/store/migration/prod/1.5/0000##lgtm_check.sql b/backend/store/migration/prod/1.5/0000##lgtm_check.sqlsimilarity index 100%rename from store/migration/prod/1.5/0000##lgtm_check.sqlrename to backend/store/migration/prod/1.5/0000##lgtm_check.sqldiff --git a/store/migration/prod/1.6/0000##datasource_address_override.sql b/backend/store/migration/prod/1.6/0000##datasource_address_override.sqlsimilarity index 100%rename from store/migration/prod/1.6/0000##datasource_address_override.sqlrename to backend/store/migration/prod/1.6/0000##datasource_address_override.sqldiff --git a/store/migration/prod/1.6/0001##remove_timing_task_check_run.sql b/backend/store/migration/prod/1.6/0001##remove_timing_task_check_run.sqlsimilarity index 100%rename from store/migration/prod/1.6/0001##remove_timing_task_check_run.sqlrename to backend/store/migration/prod/1.6/0001##remove_timing_task_check_run.sqldiff --git a/store/migration/prod/1.7/0000##add_repository_enable_sql_review_ci.sql b/backend/store/migration/prod/1.7/0000##add_repository_enable_sql_review_ci.sqlsimilarity index 100%rename from store/migration/prod/1.7/0000##add_repository_enable_sql_review_ci.sqlrename to backend/store/migration/prod/1.7/0000##add_repository_enable_sql_review_ci.sqldiff --git a/store/migration/prod/1.8/0000##external_approval.sql b/backend/store/migration/prod/1.8/0000##external_approval.sqlsimilarity index 100%rename from store/migration/prod/1.8/0000##external_approval.sqlrename to backend/store/migration/prod/1.8/0000##external_approval.sqldiff --git a/store/migration/prod/1.8/0001##drop_db_label_key_value_fkey.sql b/backend/store/migration/prod/1.8/0001##drop_db_label_key_value_fkey.sqlsimilarity index 100%rename from store/migration/prod/1.8/0001##drop_db_label_key_value_fkey.sqlrename to backend/store/migration/prod/1.8/0001##drop_db_label_key_value_fkey.sqldiff --git a/store/migration/prod/1.9/0000##flexible_policy.sql b/backend/store/migration/prod/1.9/0000##flexible_policy.sqlsimilarity index 100%rename from store/migration/prod/1.9/0000##flexible_policy.sqlrename to backend/store/migration/prod/1.9/0000##flexible_policy.sqldiff --git a/store/migration/prod/1.9/0001##database_in_instance.sql b/backend/store/migration/prod/1.9/0001##database_in_instance.sqlsimilarity index 100%rename from store/migration/prod/1.9/0001##database_in_instance.sqlrename to backend/store/migration/prod/1.9/0001##database_in_instance.sqldiff --git a/store/migration/prod/1.9/0002##principal_type.sql b/backend/store/migration/prod/1.9/0002##principal_type.sqlsimilarity index 100%rename from store/migration/prod/1.9/0002##principal_type.sqlrename to backend/store/migration/prod/1.9/0002##principal_type.sqldiff --git a/store/migration/prod/1.9/0003##assignee_attetion.sql b/backend/store/migration/prod/1.9/0003##assignee_attetion.sqlsimilarity index 100%rename from store/migration/prod/1.9/0003##assignee_attetion.sqlrename to backend/store/migration/prod/1.9/0003##assignee_attetion.sqldiff --git a/store/migration/prod/LATEST.sql b/backend/store/migration/prod/LATEST.sqlsimilarity index 100%rename from store/migration/prod/LATEST.sqlrename to backend/store/migration/prod/LATEST.sqldiff --git a/store/migration/prod/LATEST_DATA.sql b/backend/store/migration/prod/LATEST_DATA.sqlsimilarity index 100%rename from store/migration/prod/LATEST_DATA.sqlrename to backend/store/migration/prod/LATEST_DATA.sqldiff --git a/store/pg_engine.go b/backend/store/pg_engine.gosimilarity index 99%rename from store/pg_engine.gorename to backend/store/pg_engine.goindex b8e493b68a..2fda5d6179 100644--- a/store/pg_engine.go+++ b/backend/store/pg_engine.go@@ -16,13 +16,13 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/common/log"- dbdriver "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/common/log"+ dbdriver "github.com/bytebase/bytebase/backend/plugin/db"// Register postgres driver.- _ "github.com/bytebase/bytebase/plugin/db/pg"+ _ "github.com/bytebase/bytebase/backend/plugin/db/pg"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/common")const (diff --git a/store/pg_engine_log.go b/backend/store/pg_engine_log.gosimilarity index 96%rename from store/pg_engine_log.gorename to backend/store/pg_engine_log.goindex e6a3256731..35e6ff83ff 100644--- a/store/pg_engine_log.go+++ b/backend/store/pg_engine_log.go@@ -11,7 +11,7 @@ import ("go.uber.org/zap"- "github.com/bytebase/bytebase/common/log"+ "github.com/bytebase/bytebase/backend/common/log")// Replace mutiple whitespace characters including /t/n with a single space.diff --git a/store/pg_engine_test.go b/backend/store/pg_engine_test.gosimilarity index 96%rename from store/pg_engine_test.gorename to backend/store/pg_engine_test.goindex 75fd8f8da4..7bd6782b43 100644--- a/store/pg_engine_test.go+++ b/backend/store/pg_engine_test.go@@ -10,10 +10,10 @@ import ("github.com/stretchr/testify/require""go.uber.org/zap"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- dbdriver "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/resources/postgres"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ dbdriver "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/resources/postgres")func TestGetMinorMigrationVersions(t *testing.T) {diff --git a/store/pipeline.go b/backend/store/pipeline.gosimilarity index 98%rename from store/pipeline.gorename to backend/store/pipeline.goindex e6b812ea85..56b13f780c 100644--- a/store/pipeline.go+++ b/backend/store/pipeline.go@@ -9,9 +9,9 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log")// pipelineRaw is the store model for an Pipeline.diff --git a/store/policy.go b/backend/store/policy.gosimilarity index 99%rename from store/policy.gorename to backend/store/policy.goindex e796e038cc..a63a2460dc 100644--- a/store/policy.go+++ b/backend/store/policy.go@@ -8,9 +8,9 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/advisor"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/advisor")// policyRaw is the store model for an Policy.diff --git a/store/principal.go b/backend/store/principal.gosimilarity index 99%rename from store/principal.gorename to backend/store/principal.goindex 323eaeb73a..6d7ac890e3 100644--- a/store/principal.go+++ b/backend/store/principal.go@@ -8,8 +8,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")// GetPrincipalList gets a list of Principal instances.diff --git a/store/project.go b/backend/store/project.gosimilarity index 99%rename from store/project.gorename to backend/store/project.goindex bcbdd4a7ad..5572142c81 100644--- a/store/project.go+++ b/backend/store/project.go@@ -8,8 +8,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")// GetProjectByID gets an instance of Project.diff --git a/store/project_member.go b/backend/store/project_member.gosimilarity index 99%rename from store/project_member.gorename to backend/store/project_member.goindex b2efec2fad..ef12683193 100644--- a/store/project_member.go+++ b/backend/store/project_member.go@@ -8,7 +8,7 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")// IAMPolicyMessage is the IAM policy of a project.diff --git a/store/project_member_test.go b/backend/store/project_member_test.gosimilarity index 98%rename from store/project_member_test.gorename to backend/store/project_member_test.goindex 5f6933e025..47561982b6 100644--- a/store/project_member_test.go+++ b/backend/store/project_member_test.go@@ -6,7 +6,7 @@ import ("github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")func TestGetIAMPolicyDiff(t *testing.T) {diff --git a/store/project_webhook.go b/backend/store/project_webhook.gosimilarity index 99%rename from store/project_webhook.gorename to backend/store/project_webhook.goindex 497e2a93c7..b177b28a1d 100644--- a/store/project_webhook.go+++ b/backend/store/project_webhook.go@@ -9,8 +9,8 @@ import ("github.com/jackc/pgtype""github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")// projectWebhookRaw is the store model for an ProjectWebhook.diff --git a/store/repository.go b/backend/store/repository.gosimilarity index 99%rename from store/repository.gorename to backend/store/repository.goindex 04ac0d8e1e..70d355b405 100644--- a/store/repository.go+++ b/backend/store/repository.go@@ -8,8 +8,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")// repositoryRaw is the store model for a Repository.diff --git a/store/setting.go b/backend/store/setting.gosimilarity index 98%rename from store/setting.gorename to backend/store/setting.goindex cd1d6ee455..db76691cde 100644--- a/store/setting.go+++ b/backend/store/setting.go@@ -7,8 +7,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")// settingRaw is the store model for an Setting.diff --git a/store/sheet.go b/backend/store/sheet.gosimilarity index 99%rename from store/sheet.gorename to backend/store/sheet.goindex d7c8c3e1cc..2d05cfcff4 100644--- a/store/sheet.go+++ b/backend/store/sheet.go@@ -8,9 +8,9 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/metric"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/metric")// sheetRaw is the store model for an Sheet.diff --git a/store/sheet_organizer.go b/backend/store/sheet_organizer.gosimilarity index 97%rename from store/sheet_organizer.gorename to backend/store/sheet_organizer.goindex 8cf6a5322f..4e9892915b 100644--- a/store/sheet_organizer.go+++ b/backend/store/sheet_organizer.go@@ -8,8 +8,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")// sheetOrganizerRaw is the store model for SheetOrganizer.diff --git a/store/stage.go b/backend/store/stage.gosimilarity index 99%rename from store/stage.gorename to backend/store/stage.goindex 551ea9bca5..9ff918d765 100644--- a/store/stage.go+++ b/backend/store/stage.go@@ -8,7 +8,7 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")// stageRaw is the store model for an Stage.diff --git a/store/stats.go b/backend/store/stats.gosimilarity index 98%rename from store/stats.gorename to backend/store/stats.goindex aecdc9a2f4..660365b7da 100644--- a/store/stats.go+++ b/backend/store/stats.go@@ -6,9 +6,9 @@ import ("fmt""strings"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/metric"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/metric")// CountInstanceMessage is the message for counting instances.diff --git a/store/store.go b/backend/store/store.gosimilarity index 97%rename from store/store.gorename to backend/store/store.goindex 38016dee77..da9fcff430 100644--- a/store/store.go+++ b/backend/store/store.go@@ -5,7 +5,7 @@ import ("fmt""sync"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")// Store provides database access to all raw objects.diff --git a/store/task.go b/backend/store/task.gosimilarity index 99%rename from store/task.gorename to backend/store/task.goindex f2061f082e..8af55c104e 100644--- a/store/task.go+++ b/backend/store/task.go@@ -11,10 +11,10 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/metric"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/metric")// taskRaw is the store model for an Task.diff --git a/store/task_check_run.go b/backend/store/task_check_run.gosimilarity index 98%rename from store/task_check_run.gorename to backend/store/task_check_run.goindex e154b84304..1b4f62ca8e 100644--- a/store/task_check_run.go+++ b/backend/store/task_check_run.go@@ -9,9 +9,9 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log")// taskCheckRunRaw is the store model for a TaskCheckRun.diff --git a/store/task_dag.go b/backend/store/task_dag.gosimilarity index 97%rename from store/task_dag.gorename to backend/store/task_dag.goindex 01a70062ac..74102435b2 100644--- a/store/task_dag.go+++ b/backend/store/task_dag.go@@ -8,8 +8,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")type taskDAGRaw struct {diff --git a/store/task_run.go b/backend/store/task_run.gosimilarity index 98%rename from store/task_run.gorename to backend/store/task_run.goindex 4cea84a26f..c171a4ed08 100644--- a/store/task_run.go+++ b/backend/store/task_run.go@@ -8,8 +8,8 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common")// taskRunRaw is the store model for an TaskRun.diff --git a/store/vcs.go b/backend/store/vcs.gosimilarity index 98%rename from store/vcs.gorename to backend/store/vcs.goindex f843c80cfb..8554d66138 100644--- a/store/vcs.go+++ b/backend/store/vcs.go@@ -8,9 +8,9 @@ import ("github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/vcs"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/vcs")// vcsRaw is the store model for a VCS (Version Control System).diff --git a/tests/backup_restore_test.go b/backend/tests/backup_restore_test.gosimilarity index 98%rename from tests/backup_restore_test.gorename to backend/tests/backup_restore_test.goindex ea15773e55..8001d261ea 100644--- a/tests/backup_restore_test.go+++ b/backend/tests/backup_restore_test.go@@ -16,11 +16,11 @@ import ("testing""time"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- resourcemysql "github.com/bytebase/bytebase/resources/mysql"- "github.com/bytebase/bytebase/tests/fake"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ resourcemysql "github.com/bytebase/bytebase/backend/resources/mysql"+ "github.com/bytebase/bytebase/backend/tests/fake""go.uber.org/zap"diff --git a/tests/data_source_test.go b/backend/tests/data_source_test.gosimilarity index 93%rename from tests/data_source_test.gorename to backend/tests/data_source_test.goindex 820422c52b..a3ddf0eb9f 100644--- a/tests/data_source_test.go+++ b/backend/tests/data_source_test.go@@ -7,10 +7,10 @@ import ("github.com/stretchr/testify/require""go.uber.org/zap/zapcore"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/tests/fake"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/tests/fake")func TestDataSource(t *testing.T) {diff --git a/tests/database.go b/backend/tests/database.gosimilarity index 98%rename from tests/database.gorename to backend/tests/database.goindex 8ab5583f26..5a87c4b060 100644--- a/tests/database.go+++ b/backend/tests/database.go@@ -13,9 +13,9 @@ import ("github.com/pkg/errors""go.uber.org/zap"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db")func (ctl *controller) createDatabase(project *api.Project, instance *api.Instance, databaseName string, owner string, labelMap map[string]string) error {diff --git a/tests/database_edit_test.go b/backend/tests/database_edit_test.gosimilarity index 93%rename from tests/database_edit_test.gorename to backend/tests/database_edit_test.goindex 2ace20e9bb..01e31b7a9a 100644--- a/tests/database_edit_test.go+++ b/backend/tests/database_edit_test.go@@ -9,10 +9,10 @@ import ("github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/resources/mysql"- "github.com/bytebase/bytebase/tests/fake"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/resources/mysql"+ "github.com/bytebase/bytebase/backend/tests/fake")func TestDatabaseEdit(t *testing.T) {diff --git a/tests/environment.go b/backend/tests/environment.gosimilarity index 97%rename from tests/environment.gorename to backend/tests/environment.goindex 103a8bec02..1cce2995a2 100644--- a/tests/environment.go+++ b/backend/tests/environment.go@@ -7,7 +7,7 @@ import ("github.com/google/jsonapi""github.com/pkg/errors"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")func (ctl *controller) createEnvironment(environmentCreate api.EnvironmentCreate) (*api.Environment, error) {diff --git a/tests/external_approval_test.go b/backend/tests/external_approval_test.gosimilarity index 98%rename from tests/external_approval_test.gorename to backend/tests/external_approval_test.goindex a702823e3b..256bcce661 100644--- a/tests/external_approval_test.go+++ b/backend/tests/external_approval_test.go@@ -9,9 +9,9 @@ import ("github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/tests/fake"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/tests/fake")func TestExternalApprovalFeishu_AllUserCanBeFound(t *testing.T) {diff --git a/tests/fake/fake.go b/backend/tests/fake/fake.gosimilarity index 100%rename from tests/fake/fake.gorename to backend/tests/fake/fake.godiff --git a/tests/fake/feishu.go b/backend/tests/fake/feishu.gosimilarity index 99%rename from tests/fake/feishu.gorename to backend/tests/fake/feishu.goindex 2e332230a9..e1d176faa3 100644--- a/tests/fake/feishu.go+++ b/backend/tests/fake/feishu.go@@ -12,7 +12,7 @@ import ("github.com/labstack/echo/v4""github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/app/feishu"+ "github.com/bytebase/bytebase/backend/plugin/app/feishu")// Feishu is a fake feishu API server implementation for testing.diff --git a/tests/fake/github.go b/backend/tests/fake/github.gosimilarity index 99%rename from tests/fake/github.gorename to backend/tests/fake/github.goindex d6b178d2c2..4d103e69fd 100644--- a/tests/fake/github.go+++ b/backend/tests/fake/github.go@@ -19,8 +19,8 @@ import ("github.com/labstack/echo/v4""github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/vcs"- "github.com/bytebase/bytebase/plugin/vcs/github"+ "github.com/bytebase/bytebase/backend/plugin/vcs"+ "github.com/bytebase/bytebase/backend/plugin/vcs/github")// GitHub is a fake implementation of GitHub VCS provider.diff --git a/tests/fake/gitlab.go b/backend/tests/fake/gitlab.gosimilarity index 99%rename from tests/fake/gitlab.gorename to backend/tests/fake/gitlab.goindex f83a9d8e46..dc5f2aabaf 100644--- a/tests/fake/gitlab.go+++ b/backend/tests/fake/gitlab.go@@ -16,8 +16,8 @@ import ("github.com/labstack/echo/v4""github.com/pkg/errors"- "github.com/bytebase/bytebase/plugin/vcs"- "github.com/bytebase/bytebase/plugin/vcs/gitlab"+ "github.com/bytebase/bytebase/backend/plugin/vcs"+ "github.com/bytebase/bytebase/backend/plugin/vcs/gitlab")// GitLab is a fake implementation of GitLab VCS provider.diff --git a/tests/fake/license b/backend/tests/fake/licensesimilarity index 100%rename from tests/fake/licenserename to backend/tests/fake/licensediff --git a/tests/fake/provider.go b/backend/tests/fake/provider.gosimilarity index 96%rename from tests/fake/provider.gorename to backend/tests/fake/provider.goindex fe023d7fc3..ac2b098a3b 100644--- a/tests/fake/provider.go+++ b/backend/tests/fake/provider.go@@ -3,7 +3,7 @@ package fakeimport ("net"- "github.com/bytebase/bytebase/plugin/vcs"+ "github.com/bytebase/bytebase/backend/plugin/vcs")// VCSProvider is a fake implementation of a VCS provider.diff --git a/tests/ghost_test.go b/backend/tests/ghost_test.gosimilarity index 98%rename from tests/ghost_test.gorename to backend/tests/ghost_test.goindex b36c6d0328..ca7f2635b7 100644--- a/tests/ghost_test.go+++ b/backend/tests/ghost_test.go@@ -11,10 +11,10 @@ import ("strings""testing"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/resources/mysql"- "github.com/bytebase/bytebase/tests/fake"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/resources/mysql"+ "github.com/bytebase/bytebase/backend/tests/fake"ghostsql "github.com/github/gh-ost/go/sql"_ "github.com/go-sql-driver/mysql"diff --git a/tests/instance.go b/backend/tests/instance.gosimilarity index 95%rename from tests/instance.gorename to backend/tests/instance.goindex a437961c02..91586ab402 100644--- a/tests/instance.go+++ b/backend/tests/instance.go@@ -8,8 +8,8 @@ import ("github.com/google/jsonapi""github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/plugin/db")// addInstance adds an instance.diff --git a/tests/issue.go b/backend/tests/issue.gosimilarity index 98%rename from tests/issue.gorename to backend/tests/issue.goindex 05a23efd47..d6ae7b53a4 100644--- a/tests/issue.go+++ b/backend/tests/issue.go@@ -9,8 +9,8 @@ import ("github.com/google/jsonapi""github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common/log"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common/log")// createIssue creates an issue.diff --git a/tests/member.go b/backend/tests/member.gosimilarity index 96%rename from tests/member.gorename to backend/tests/member.goindex fbe909bdd3..61fa6c4232 100644--- a/tests/member.go+++ b/backend/tests/member.go@@ -6,7 +6,7 @@ import ("github.com/google/jsonapi""github.com/pkg/errors"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")func (ctl *controller) createPrincipal(principalCreate api.PrincipalCreate) (*api.Principal, error) {diff --git a/tests/mysql.go b/backend/tests/mysql.gosimilarity index 95%rename from tests/mysql.gorename to backend/tests/mysql.goindex fde59b9a20..edde0278da 100644--- a/tests/mysql.go+++ b/backend/tests/mysql.go@@ -9,7 +9,7 @@ import ("fmt""testing"- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db")func getMySQLConnectionConfig(port string, database string) db.ConnectionConfig {diff --git a/tests/mysql_test.go b/backend/tests/mysql_test.gosimilarity index 96%rename from tests/mysql_test.gorename to backend/tests/mysql_test.goindex ba700d96af..e4c8abff9a 100644--- a/tests/mysql_test.go+++ b/backend/tests/mysql_test.go@@ -13,10 +13,10 @@ import ("github.com/stretchr/testify/require""go.uber.org/zap/zapcore"- "github.com/bytebase/bytebase/common/log"- pluginmysql "github.com/bytebase/bytebase/plugin/db/mysql"- resourcemysql "github.com/bytebase/bytebase/resources/mysql"- "github.com/bytebase/bytebase/resources/mysqlutil"+ "github.com/bytebase/bytebase/backend/common/log"+ pluginmysql "github.com/bytebase/bytebase/backend/plugin/db/mysql"+ resourcemysql "github.com/bytebase/bytebase/backend/resources/mysql"+ "github.com/bytebase/bytebase/backend/resources/mysqlutil")func TestCheckEngineInnoDB(t *testing.T) {diff --git a/tests/policy.go b/backend/tests/policy.gosimilarity index 96%rename from tests/policy.gorename to backend/tests/policy.goindex ddf66c2bff..be8d93683c 100644--- a/tests/policy.go+++ b/backend/tests/policy.go@@ -8,7 +8,7 @@ import ("github.com/google/jsonapi""github.com/pkg/errors"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")// upsertPolicy upserts the policy.diff --git a/tests/project.go b/backend/tests/project.gosimilarity index 98%rename from tests/project.gorename to backend/tests/project.goindex 066bfc97ad..28f0f3d7c5 100644--- a/tests/project.go+++ b/backend/tests/project.go@@ -9,7 +9,7 @@ import ("github.com/google/jsonapi""github.com/pkg/errors"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")// createProject creates an project.diff --git a/tests/project_test.go b/backend/tests/project_test.gosimilarity index 92%rename from tests/project_test.gorename to backend/tests/project_test.goindex 71217be726..d97ba1d12c 100644--- a/tests/project_test.go+++ b/backend/tests/project_test.go@@ -9,10 +9,10 @@ import ("github.com/stretchr/testify/require""go.uber.org/zap/zapcore"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/tests/fake"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/tests/fake")func TestArchiveProject(t *testing.T) {diff --git a/tests/rollback_test.go b/backend/tests/rollback_test.gosimilarity index 95%rename from tests/rollback_test.gorename to backend/tests/rollback_test.goindex e51820f78f..b5b72fc9cd 100644--- a/tests/rollback_test.go+++ b/backend/tests/rollback_test.go@@ -11,13 +11,13 @@ import ("github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/db/mysql"- resourcemysql "github.com/bytebase/bytebase/resources/mysql"- "github.com/bytebase/bytebase/resources/mysqlutil"- "github.com/bytebase/bytebase/tests/fake"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/db/mysql"+ resourcemysql "github.com/bytebase/bytebase/backend/resources/mysql"+ "github.com/bytebase/bytebase/backend/resources/mysqlutil"+ "github.com/bytebase/bytebase/backend/tests/fake")func TestRollback(t *testing.T) {diff --git a/tests/schema_update_test.go b/backend/tests/schema_update_test.gosimilarity index 99%rename from tests/schema_update_test.gorename to backend/tests/schema_update_test.goindex 8d693f39cd..7567bfc7be 100644--- a/tests/schema_update_test.go+++ b/backend/tests/schema_update_test.go@@ -21,15 +21,15 @@ import ("google.golang.org/protobuf/encoding/protojson""google.golang.org/protobuf/testing/protocmp"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/vcs"- "github.com/bytebase/bytebase/plugin/vcs/github"- "github.com/bytebase/bytebase/plugin/vcs/gitlab"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/vcs"+ "github.com/bytebase/bytebase/backend/plugin/vcs/github"+ "github.com/bytebase/bytebase/backend/plugin/vcs/gitlab"+ "github.com/bytebase/bytebase/backend/resources/postgres"+ "github.com/bytebase/bytebase/backend/tests/fake"storepb "github.com/bytebase/bytebase/proto/generated-go/store"- "github.com/bytebase/bytebase/resources/postgres"- "github.com/bytebase/bytebase/tests/fake")func TestSchemaAndDataUpdate(t *testing.T) {diff --git a/tests/sensitive_data_test.go b/backend/tests/sensitive_data_test.gosimilarity index 96%rename from tests/sensitive_data_test.gorename to backend/tests/sensitive_data_test.goindex 6df20a4ea0..1ce35d7b48 100644--- a/tests/sensitive_data_test.go+++ b/backend/tests/sensitive_data_test.go@@ -10,10 +10,10 @@ import ("github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/resources/mysql"- "github.com/bytebase/bytebase/tests/fake"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/resources/mysql"+ "github.com/bytebase/bytebase/backend/tests/fake")func TestSensitiveData(t *testing.T) {diff --git a/tests/sheet.go b/backend/tests/sheet.gosimilarity index 96%rename from tests/sheet.gorename to backend/tests/sheet.goindex fe0f7a0be8..f90b085b38 100644--- a/tests/sheet.go+++ b/backend/tests/sheet.go@@ -8,7 +8,7 @@ import ("github.com/google/jsonapi""github.com/pkg/errors"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")// createSheet creates a sheet.diff --git a/tests/sheet_vcs_test.go b/backend/tests/sheet_vcs_test.gosimilarity index 95%rename from tests/sheet_vcs_test.gorename to backend/tests/sheet_vcs_test.goindex 101ebbbed9..022111ce3b 100644--- a/tests/sheet_vcs_test.go+++ b/backend/tests/sheet_vcs_test.go@@ -7,9 +7,9 @@ import ("github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/plugin/vcs"- "github.com/bytebase/bytebase/tests/fake"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/plugin/vcs"+ "github.com/bytebase/bytebase/backend/tests/fake")func TestSheetVCS(t *testing.T) {diff --git a/tests/sql.go b/backend/tests/sql.gosimilarity index 99%rename from tests/sql.gorename to backend/tests/sql.goindex 7c6dfd90c6..1b797a41a0 100644--- a/tests/sql.go+++ b/backend/tests/sql.go@@ -10,9 +10,9 @@ import ("github.com/google/jsonapi""github.com/pkg/errors"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/plugin/advisor"- "github.com/bytebase/bytebase/plugin/parser"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/plugin/advisor"+ "github.com/bytebase/bytebase/backend/plugin/parser")// executeSQL executes a SQL query on the database.diff --git a/tests/sql_editor_test.go b/backend/tests/sql_editor_test.gosimilarity index 94%rename from tests/sql_editor_test.gorename to backend/tests/sql_editor_test.goindex f77cb650af..b2ba82263a 100644--- a/tests/sql_editor_test.go+++ b/backend/tests/sql_editor_test.go@@ -9,11 +9,11 @@ import ("github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/plugin/db"- resourcemysql "github.com/bytebase/bytebase/resources/mysql"- "github.com/bytebase/bytebase/resources/postgres"- "github.com/bytebase/bytebase/tests/fake"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/plugin/db"+ resourcemysql "github.com/bytebase/bytebase/backend/resources/mysql"+ "github.com/bytebase/bytebase/backend/resources/postgres"+ "github.com/bytebase/bytebase/backend/tests/fake")func TestAdminQueryAffectedRows(t *testing.T) {diff --git a/tests/sql_review_test.go b/backend/tests/sql_review_test.gosimilarity index 97%rename from tests/sql_review_test.gorename to backend/tests/sql_review_test.goindex a65ff8ad19..e4040f7b2f 100644--- a/tests/sql_review_test.go+++ b/backend/tests/sql_review_test.go@@ -20,12 +20,12 @@ import ("github.com/stretchr/testify/require""gopkg.in/yaml.v3"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/resources/mysql"- "github.com/bytebase/bytebase/resources/postgres"- "github.com/bytebase/bytebase/tests/fake"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/resources/mysql"+ "github.com/bytebase/bytebase/backend/resources/postgres"+ "github.com/bytebase/bytebase/backend/tests/fake")var noSQLReviewPolicy = []api.TaskCheckResult{diff --git a/tests/start_test.go b/backend/tests/start_test.gosimilarity index 88%rename from tests/start_test.gorename to backend/tests/start_test.goindex 48a5c651a3..263e7928e5 100644--- a/tests/start_test.go+++ b/backend/tests/start_test.go@@ -8,12 +8,12 @@ import ("github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/resources/mongoutil"- resourcemysql "github.com/bytebase/bytebase/resources/mysql"- "github.com/bytebase/bytebase/resources/mysqlutil"+ "github.com/bytebase/bytebase/backend/resources/mongoutil"+ resourcemysql "github.com/bytebase/bytebase/backend/resources/mysql"+ "github.com/bytebase/bytebase/backend/resources/mysqlutil"- "github.com/bytebase/bytebase/resources/postgres"- "github.com/bytebase/bytebase/tests/fake"+ "github.com/bytebase/bytebase/backend/resources/postgres"+ "github.com/bytebase/bytebase/backend/tests/fake")func startStopServer(ctx context.Context, a *require.Assertions, ctl *controller, dataDir string, readOnly bool) {diff --git a/tests/subscription.go b/backend/tests/subscription.gosimilarity index 92%rename from tests/subscription.gorename to backend/tests/subscription.goindex 176f63d4b4..ebfa5440fd 100644--- a/tests/subscription.go+++ b/backend/tests/subscription.go@@ -6,9 +6,9 @@ import ("github.com/google/jsonapi""github.com/pkg/errors"- enterpriseAPI "github.com/bytebase/bytebase/enterprise/api"+ enterpriseAPI "github.com/bytebase/bytebase/backend/enterprise/api"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")func (ctl *controller) setLicense() error {diff --git a/tests/subscription_test.go b/backend/tests/subscription_test.gosimilarity index 92%rename from tests/subscription_test.gorename to backend/tests/subscription_test.goindex ab3f00db90..bfb278a49b 100644--- a/tests/subscription_test.go+++ b/backend/tests/subscription_test.go@@ -7,9 +7,9 @@ import ("github.com/stretchr/testify/require""go.uber.org/zap/zapcore"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/tests/fake"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/tests/fake")type trial struct {diff --git a/tests/sync_schema_test.go b/backend/tests/sync_schema_test.gosimilarity index 94%rename from tests/sync_schema_test.gorename to backend/tests/sync_schema_test.goindex 089c0295cb..1afc61f700 100644--- a/tests/sync_schema_test.go+++ b/backend/tests/sync_schema_test.go@@ -10,11 +10,11 @@ import ("github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/parser"- "github.com/bytebase/bytebase/resources/postgres"- "github.com/bytebase/bytebase/tests/fake"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/parser"+ "github.com/bytebase/bytebase/backend/resources/postgres"+ "github.com/bytebase/bytebase/backend/tests/fake")func TestSyncSchema(t *testing.T) {diff --git a/tests/syncer_test.go b/backend/tests/syncer_test.gosimilarity index 97%rename from tests/syncer_test.gorename to backend/tests/syncer_test.goindex b3564ec1e1..b064c1c653 100644--- a/tests/syncer_test.go+++ b/backend/tests/syncer_test.go@@ -13,12 +13,12 @@ import ("google.golang.org/protobuf/encoding/protojson""google.golang.org/protobuf/testing/protocmp"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/plugin/db"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/resources/mysql"+ "github.com/bytebase/bytebase/backend/resources/postgres"+ "github.com/bytebase/bytebase/backend/tests/fake"storepb "github.com/bytebase/bytebase/proto/generated-go/store"- "github.com/bytebase/bytebase/resources/mysql"- "github.com/bytebase/bytebase/resources/postgres"- "github.com/bytebase/bytebase/tests/fake")func TestSyncerForPostgreSQL(t *testing.T) {diff --git a/tests/tags_dev.go b/backend/tests/tags_dev.gosimilarity index 65%rename from tests/tags_dev.gorename to backend/tests/tags_dev.goindex bee174be20..778e03c662 100644--- a/tests/tags_dev.go+++ b/backend/tests/tags_dev.go@@ -3,6 +3,6 @@package tests-import "github.com/bytebase/bytebase/common"+import "github.com/bytebase/bytebase/backend/common"const testReleaseMode = common.ReleaseModeDevdiff --git a/tests/tags_prod.go b/backend/tests/tags_prod.gosimilarity index 65%rename from tests/tags_prod.gorename to backend/tests/tags_prod.goindex d02bcdf3e0..be8b989f69 100644--- a/tests/tags_prod.go+++ b/backend/tests/tags_prod.go@@ -3,6 +3,6 @@package tests-import "github.com/bytebase/bytebase/common"+import "github.com/bytebase/bytebase/backend/common"const testReleaseMode = common.ReleaseModeProddiff --git a/tests/tenant_test.go b/backend/tests/tenant_test.gosimilarity index 99%rename from tests/tenant_test.gorename to backend/tests/tenant_test.goindex ea51ee7e68..ac36444f01 100644--- a/tests/tenant_test.go+++ b/backend/tests/tenant_test.go@@ -9,12 +9,12 @@ import ("github.com/stretchr/testify/require"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/plugin/db"- "github.com/bytebase/bytebase/plugin/vcs"- "github.com/bytebase/bytebase/plugin/vcs/github"- "github.com/bytebase/bytebase/plugin/vcs/gitlab"- "github.com/bytebase/bytebase/tests/fake"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/plugin/db"+ "github.com/bytebase/bytebase/backend/plugin/vcs"+ "github.com/bytebase/bytebase/backend/plugin/vcs/github"+ "github.com/bytebase/bytebase/backend/plugin/vcs/gitlab"+ "github.com/bytebase/bytebase/backend/tests/fake")var (diff --git a/tests/test-data/sql_review_mysql.yaml b/backend/tests/test-data/sql_review_mysql.yamlsimilarity index 100%rename from tests/test-data/sql_review_mysql.yamlrename to backend/tests/test-data/sql_review_mysql.yamldiff --git a/tests/test-data/sql_review_pg.yaml b/backend/tests/test-data/sql_review_pg.yamlsimilarity index 100%rename from tests/test-data/sql_review_pg.yamlrename to backend/tests/test-data/sql_review_pg.yamldiff --git a/tests/tests.go b/backend/tests/tests.gosimilarity index 98%rename from tests/tests.gorename to backend/tests/tests.goindex 3256a55ec7..942cbbc81f 100644--- a/tests/tests.go+++ b/backend/tests/tests.go@@ -23,12 +23,12 @@ import (// init() in pgx/v5/stdlib will register it's pgx driver._ "github.com/jackc/pgx/v5/stdlib"- "github.com/bytebase/bytebase/api"- "github.com/bytebase/bytebase/common"- "github.com/bytebase/bytebase/common/log"- "github.com/bytebase/bytebase/server"- componentConfig "github.com/bytebase/bytebase/server/component/config"- "github.com/bytebase/bytebase/tests/fake"+ "github.com/bytebase/bytebase/backend/api"+ "github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log"+ "github.com/bytebase/bytebase/backend/server"+ componentConfig "github.com/bytebase/bytebase/backend/server/component/config"+ "github.com/bytebase/bytebase/backend/tests/fake")var (diff --git a/tests/vcs.go b/backend/tests/vcs.gosimilarity index 98%rename from tests/vcs.gorename to backend/tests/vcs.goindex 125c1ad240..4e3d4ddcad 100644--- a/tests/vcs.go+++ b/backend/tests/vcs.go@@ -8,7 +8,7 @@ import ("github.com/google/jsonapi""github.com/pkg/errors"- "github.com/bytebase/bytebase/api"+ "github.com/bytebase/bytebase/backend/api")// createVCS creates a VCS.diff --git a/docs/design/db-plugin-development-guide.md b/docs/design/db-plugin-development-guide.mdindex aaeefba504..e65c904bfd 100644--- a/docs/design/db-plugin-development-guide.md+++ b/docs/design/db-plugin-development-guide.md@@ -8,8 +8,8 @@ Internally, Bytebase creates a table in database to record migration history.## Develop a plugin1. Under `plugin/db`, create a go package named driver's name.-1. Implement `github.com/bytebase/bytebase/plugin/db#Driver` interface.-1. \[Optional\] There are some common implementations in package `github.com/bytebase/bytebase/plugin/db/util`. To use these utils, additional adapters are needed usually.+1. Implement `github.com/bytebase/bytebase/backend/plugin/db#Driver` interface.+1. \[Optional\] There are some common implementations in package `github.com/bytebase/bytebase/backend/plugin/db/util`. To use these utils, additional adapters are needed usually.For instance, `util#ExecuteMigration` is a helper function to implement `db.Driver#ExecuteMigration`. And this function needs a `util.MigrationExecutor` adapter.-1. Register plugin. In `init()` function, call `github.com/bytebase/bytebase/plugin/db#Register` to register plugin factory with specific db type.+1. Register plugin. In `init()` function, call `github.com/bytebase/bytebase/backend/plugin/db#Register` to register plugin factory with specific db type.diff --git a/docs/openapi.md b/docs/openapi.mdindex 89bb82e364..a07e3c0fa4 100644--- a/docs/openapi.md+++ b/docs/openapi.md@@ -11,7 +11,7 @@ Bytebase OpenAPI implements the OpenAPI specification with Swagger.### Comment for OpenAPIs-1. Add general API annotations in `./server/server.go`.+1. Add general API annotations in `./backend/server/server.go`.2. Add API operation annotations in your controller code.> **Note**@@ -52,7 +52,7 @@ Every time you changed the comments, you need to re-run the following command to```bashcd bytebase# generate swagger doc-swag init -g ./server.go -d ./server --output docs/openapi --parseDependency+swag init -g ./backend/server.go -d ./backend/server --output docs/openapi --parseDependency```This should generate new docs under `./docs/openapi` folder based on your comments.diff --git a/frontend/package.json b/frontend/package.jsonindex 267dbfd7f9..fad851656f 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -3,7 +3,7 @@"license": "SEE LICENSE IN LICENSE","scripts": {"dev": "npm run copy-sql-review-file && vite --mode dev",- "release": "export NODE_OPTIONS=--max_old_space_size=4096 && npm run copy-sql-review-file && vite build --mode release --outDir=../server/dist --emptyOutDir",+ "release": "export NODE_OPTIONS=--max_old_space_size=4096 && npm run copy-sql-review-file && vite build --mode release --outDir=../backend/server/dist --emptyOutDir","dev-docker": "export NODE_OPTIONS=--max_old_space_size=4096 && vite build --mode dev","release-docker": "export NODE_OPTIONS=--max_old_space_size=4096 && vite build --mode release","lint": "eslint --cache --ext .js,.ts,.tsx,.vue src",diff --git a/frontend/scripts/copy_sql_review_files.sh b/frontend/scripts/copy_sql_review_files.shindex 40d22e344d..5eb3b2fd70 100644--- a/frontend/scripts/copy_sql_review_files.sh+++ b/frontend/scripts/copy_sql_review_files.sh@@ -1,2 +1,2 @@#!/bin/sh-cp ../plugin/advisor/config/* ./src/types/\ No newline at end of file+cp ../backend/plugin/advisor/config/* ./src/types/\ No newline at end of filediff --git a/scripts/.air.toml b/scripts/.air.tomlindex 1eb85131db..4ba5240e51 100644--- a/scripts/.air.toml+++ b/scripts/.air.toml@@ -9,13 +9,13 @@ tmp_dir = ".air"--tags "" \-gcflags=all=\"-N -l\" \-ldflags " \- -X 'github.com/bytebase/bytebase/bin/server/cmd.version=development' \- -X 'github.com/bytebase/bytebase/bin/server/cmd.goversion=$(go version)' \- -X 'github.com/bytebase/bytebase/bin/server/cmd.gitcommit=$(git rev-parse HEAD)' \- -X 'github.com/bytebase/bytebase/bin/server/cmd.buildtime=$(date -u +"%Y-%m-%dT%H:%M:%SZ")' \- -X 'github.com/bytebase/bytebase/bin/server/cmd.builduser=$(id -u -n)' \+ -X 'github.com/bytebase/bytebase/backend/bin/server/cmd.version=development' \+ -X 'github.com/bytebase/bytebase/backend/bin/server/cmd.goversion=$(go version)' \+ -X 'github.com/bytebase/bytebase/backend/bin/server/cmd.gitcommit=$(git rev-parse HEAD)' \+ -X 'github.com/bytebase/bytebase/backend/bin/server/cmd.buildtime=$(date -u +"%Y-%m-%dT%H:%M:%SZ")' \+ -X 'github.com/bytebase/bytebase/backend/bin/server/cmd.builduser=$(id -u -n)' \" \- -o ./.air/bytebase ./bin/server/main.go"""+ -o ./.air/bytebase ./backend/bin/server/main.go"""delay = 1000exclude_dir = [".air", "vendor", "frontend", "docs"]exclude_file = []diff --git a/scripts/.air_bb.toml b/scripts/.air_bb.tomlindex 0b97184250..21c903fa32 100644--- a/scripts/.air_bb.toml+++ b/scripts/.air_bb.toml@@ -6,13 +6,13 @@ tmp_dir = ".air"cmd = """go build \-ldflags " \- -X 'github.com/bytebase/bytebase/bin/bb/cmd.version=development' \- -X 'github.com/bytebase/bytebase/bin/bb/cmd.goversion=$(go version)' \- -X 'github.com/bytebase/bytebase/bin/bb/cmd.gitcommit=$(git rev-parse HEAD)' \- -X 'github.com/bytebase/bytebase/bin/bb/cmd.buildtime=$(date -u +"%Y-%m-%dT%H:%M:%SZ")' \- -X 'github.com/bytebase/bytebase/bin/bb/cmd.builduser=$(id -u -n)' \+ -X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.version=development' \+ -X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.goversion=$(go version)' \+ -X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.gitcommit=$(git rev-parse HEAD)' \+ -X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.buildtime=$(date -u +"%Y-%m-%dT%H:%M:%SZ")' \+ -X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.builduser=$(id -u -n)' \" \- -o ./.air/bb ./bin/bb/main.go"""+ -o ./.air/bb ./backend/bin/bb/main.go"""delay = 1000exclude_dir = [".air", "vendor", "frontend", "docs"]exclude_file = []diff --git a/scripts/.air_sql_service.toml b/scripts/.air_sql_service.tomlindex 4fec81936a..30dd227bbf 100644--- a/scripts/.air_sql_service.toml+++ b/scripts/.air_sql_service.toml@@ -6,13 +6,13 @@ tmp_dir = ".air"cmd = """go build -gcflags=all=\"-N -l\" \-ldflags " \- -X 'github.com/bytebase/bytebase/bin/sql-service/cmd.version=development' \- -X 'github.com/bytebase/bytebase/bin/sql-service/cmd.goversion=$(go version)' \- -X 'github.com/bytebase/bytebase/bin/sql-service/cmd.gitcommit=$(git rev-parse HEAD)' \- -X 'github.com/bytebase/bytebase/bin/sql-service/cmd.buildtime=$(date -u +"%Y-%m-%dT%H:%M:%SZ")' \- -X 'github.com/bytebase/bytebase/bin/sql-service/cmd.builduser=$(id -u -n)' \+ -X 'github.com/bytebase/bytebase/backend/bin/sql-service/cmd.version=development' \+ -X 'github.com/bytebase/bytebase/backend/bin/sql-service/cmd.goversion=$(go version)' \+ -X 'github.com/bytebase/bytebase/backend/bin/sql-service/cmd.gitcommit=$(git rev-parse HEAD)' \+ -X 'github.com/bytebase/bytebase/backend/bin/sql-service/cmd.buildtime=$(date -u +"%Y-%m-%dT%H:%M:%SZ")' \+ -X 'github.com/bytebase/bytebase/backend/bin/sql-service/cmd.builduser=$(id -u -n)' \" \- -o ./.air/sql-service ./bin/sql-service/main.go"""+ -o ./.air/sql-service ./backend/bin/sql-service/main.go"""delay = 1000exclude_dir = [".air", "vendor", "frontend", "docs"]exclude_file = []diff --git a/scripts/.goreleaser-for-darwin.yaml b/scripts/.goreleaser-for-darwin.yamlindex 0b84d317c2..8041e15380 100644--- a/scripts/.goreleaser-for-darwin.yaml+++ b/scripts/.goreleaser-for-darwin.yaml@@ -3,15 +3,15 @@ before:- go mod tidybuilds:- id: server- main: ./bin/server+ main: ./backend/bin/serverbinary: bytebaseldflags:- -w -s- - -X github.com/bytebase/bytebase/bin/server/cmd.version={{.Version}}- - -X github.com/bytebase/bytebase/bin/server/cmd.goversion=${GO_VERSION}- - -X github.com/bytebase/bytebase/bin/server/cmd.gitcommit={{.Commit}}- - -X github.com/bytebase/bytebase/bin/server/cmd.buildtime={{.Timestamp}}- - -X github.com/bytebase/bytebase/bin/server/cmd.builduser=goreleaser+ - -X github.com/bytebase/bytebase/backend/bin/server/cmd.version={{.Version}}+ - -X github.com/bytebase/bytebase/backend/bin/server/cmd.goversion=${GO_VERSION}+ - -X github.com/bytebase/bytebase/backend/bin/server/cmd.gitcommit={{.Commit}}+ - -X github.com/bytebase/bytebase/backend/bin/server/cmd.buildtime={{.Timestamp}}+ - -X github.com/bytebase/bytebase/backend/bin/server/cmd.builduser=goreleasertags:- release- embed_frontend@@ -28,15 +28,15 @@ builds:- amd64- arm64- id: cli- main: ./bin/bb+ main: ./backend/bin/bbbinary: bbldflags:- -w -s- - -X github.com/bytebase/bytebase/bin/bb/cmd.version={{.Version}}- - -X github.com/bytebase/bytebase/bin/bb/cmd.goversion=${GO_VERSION}- - -X github.com/bytebase/bytebase/bin/bb/cmd.gitcommit={{.Commit}}- - -X github.com/bytebase/bytebase/bin/bb/cmd.buildtime={{.Timestamp}}- - -X github.com/bytebase/bytebase/bin/bb/cmd.builduser=goreleaser+ - -X github.com/bytebase/bytebase/backend/bin/bb/cmd.version={{.Version}}+ - -X github.com/bytebase/bytebase/backend/bin/bb/cmd.goversion=${GO_VERSION}+ - -X github.com/bytebase/bytebase/backend/bin/bb/cmd.gitcommit={{.Commit}}+ - -X github.com/bytebase/bytebase/backend/bin/bb/cmd.buildtime={{.Timestamp}}+ - -X github.com/bytebase/bytebase/backend/bin/bb/cmd.builduser=goreleasertags:- releaseenv:diff --git a/scripts/.goreleaser-for-linux.yaml b/scripts/.goreleaser-for-linux.yamlindex 830d3a8dc1..1348141ed7 100644--- a/scripts/.goreleaser-for-linux.yaml+++ b/scripts/.goreleaser-for-linux.yaml@@ -3,15 +3,15 @@ before:- go mod tidybuilds:- id: server- main: ./bin/server+ main: ./backend/bin/serverbinary: bytebaseldflags:- -w -s- - -X github.com/bytebase/bytebase/bin/server/cmd.version={{.Version}}- - -X github.com/bytebase/bytebase/bin/server/cmd.goversion=${GO_VERSION}- - -X github.com/bytebase/bytebase/bin/server/cmd.gitcommit={{.Commit}}- - -X github.com/bytebase/bytebase/bin/server/cmd.buildtime={{.Timestamp}}- - -X github.com/bytebase/bytebase/bin/server/cmd.builduser=goreleaser+ - -X github.com/bytebase/bytebase/backend/bin/server/cmd.version={{.Version}}+ - -X github.com/bytebase/bytebase/backend/bin/server/cmd.goversion=${GO_VERSION}+ - -X github.com/bytebase/bytebase/backend/bin/server/cmd.gitcommit={{.Commit}}+ - -X github.com/bytebase/bytebase/backend/bin/server/cmd.buildtime={{.Timestamp}}+ - -X github.com/bytebase/bytebase/backend/bin/server/cmd.builduser=goreleasertags:- release- embed_frontend@@ -33,15 +33,15 @@ builds:env:- CC=gcc- id: cli- main: ./bin/bb+ main: ./backend/bin/bbbinary: bbldflags:- -w -s- - -X github.com/bytebase/bytebase/bin/bb/cmd.version={{.Version}}- - -X github.com/bytebase/bytebase/bin/bb/cmd.goversion=${GO_VERSION}- - -X github.com/bytebase/bytebase/bin/bb/cmd.gitcommit={{.Commit}}- - -X github.com/bytebase/bytebase/bin/bb/cmd.buildtime={{.Timestamp}}- - -X github.com/bytebase/bytebase/bin/bb/cmd.builduser=goreleaser+ - -X github.com/bytebase/bytebase/backend/bin/bb/cmd.version={{.Version}}+ - -X github.com/bytebase/bytebase/backend/bin/bb/cmd.goversion=${GO_VERSION}+ - -X github.com/bytebase/bytebase/backend/bin/bb/cmd.gitcommit={{.Commit}}+ - -X github.com/bytebase/bytebase/backend/bin/bb/cmd.buildtime={{.Timestamp}}+ - -X github.com/bytebase/bytebase/backend/bin/bb/cmd.builduser=goreleasertags:- releaseenv:diff --git a/scripts/build_bb.sh b/scripts/build_bb.shindex c521453fbe..f96614dabb 100755--- a/scripts/build_bb.sh+++ b/scripts/build_bb.sh@@ -15,14 +15,14 @@ OUTPUT_BINARY=$OUTPUT_DIR/bbecho "Start building bb ${VERSION}..."-flags="-X 'github.com/bytebase/bytebase/bin/bb/cmd.version=${VERSION}'--X 'github.com/bytebase/bytebase/bin/bb/cmd.goversion=$(go version)'--X 'github.com/bytebase/bytebase/bin/bb/cmd.gitcommit=$(git rev-parse HEAD)'--X 'github.com/bytebase/bytebase/bin/bb/cmd.buildtime=$(date -u +"%Y-%m-%dT%H:%M:%SZ")'--X 'github.com/bytebase/bytebase/bin/bb/cmd.builduser=$(id -u -n)'"+flags="-X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.version=${VERSION}'+-X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.goversion=$(go version)'+-X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.gitcommit=$(git rev-parse HEAD)'+-X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.buildtime=$(date -u +"%Y-%m-%dT%H:%M:%SZ")'+-X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.builduser=$(id -u -n)'"# -ldflags="-w -s" means omit DWARF symbol table and the symbol table and debug information-go build --tags "release" -ldflags "-w -s $flags" -o ${OUTPUT_BINARY} ./bin/bb/main.go+go build --tags "release" -ldflags "-w -s $flags" -o ${OUTPUT_BINARY} ./backend/bin/bb/main.goecho "Completed building bb."diff --git a/scripts/build_bytebase.sh b/scripts/build_bytebase.shindex 550094a6e8..b181484a72 100755--- a/scripts/build_bytebase.sh+++ b/scripts/build_bytebase.sh@@ -49,14 +49,14 @@ echo "Completed building Bytebase frontend."echo ""echo "Step 2 - building Bytebase backend..."-flags="-X 'github.com/bytebase/bytebase/bin/server/cmd.version=${VERSION}'--X 'github.com/bytebase/bytebase/bin/server/cmd.goversion=$(go version)'--X 'github.com/bytebase/bytebase/bin/server/cmd.gitcommit=$(git rev-parse HEAD)'--X 'github.com/bytebase/bytebase/bin/server/cmd.buildtime=$(date -u +"%Y-%m-%dT%H:%M:%SZ")'--X 'github.com/bytebase/bytebase/bin/server/cmd.builduser=$(id -u -n)'"+flags="-X 'github.com/bytebase/bytebase/backend/bin/server/cmd.version=${VERSION}'+-X 'github.com/bytebase/bytebase/backend/bin/server/cmd.goversion=$(go version)'+-X 'github.com/bytebase/bytebase/backend/bin/server/cmd.gitcommit=$(git rev-parse HEAD)'+-X 'github.com/bytebase/bytebase/backend/bin/server/cmd.buildtime=$(date -u +"%Y-%m-%dT%H:%M:%SZ")'+-X 'github.com/bytebase/bytebase/backend/bin/server/cmd.builduser=$(id -u -n)'"# -ldflags="-w -s" means omit DWARF symbol table and the symbol table and debug information-go build --tags "release,embed_frontend" -ldflags "-w -s $flags" -o ${OUTPUT_BINARY} ./bin/server/main.go+go build --tags "release,embed_frontend" -ldflags "-w -s $flags" -o ${OUTPUT_BINARY} ./backend/bin/server/main.goecho "Completed building Bytebase backend."