Skip to content

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

chore: run pre-commit against all files fix end of files trim trailing whitespace

p0nyfa308346ed3b
diff --git a/.dockerignore b/.dockerignore
index 75bf68a825..2aeadfc9a6 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1,3 +1,3 @@
frontend/node_modules
server/dist
-bytebase-build
\ No newline at end of file
+bytebase-build
diff --git a/.gitpod.yml b/.gitpod.yml
index a12da80e17..62e66d2a8f 100644
--- a/.gitpod.yml
+++ b/.gitpod.yml
@@ -3,7 +3,7 @@ tasks:
init: cd ./frontend && yarn
command: yarn dev
- name: Init Backend
- init: curl -sSfL https://raw.githubusercontent.com/cosmtrek/air/master/install.sh | sh -s
+ init: curl -sSfL https://raw.githubusercontent.com/cosmtrek/air/master/install.sh | sh -s
command: ./bin/air -c scripts/.air.toml
# List the ports to expose. Learn more https://www.gitpod.io/docs/config-ports/
diff --git a/Dockerfile b/Dockerfile
index fefec707ad..282d3c8ff1 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -29,7 +29,7 @@ ARG BUILD_USER="unknown"
# Need gcc musl-dev for CGO_ENABLED=1
RUN apk --no-cache add gcc musl-dev
-WORKDIR /backend-build
+WORKDIR /backend-build
COPY . .
@@ -65,4 +65,4 @@ RUN mkdir -p /var/opt/bytebase
CMD ["--host", "http://localhost", "--port", "80", "--data", "/var/opt/bytebase"]
-ENTRYPOINT ["bytebase"]
\ No newline at end of file
+ENTRYPOINT ["bytebase"]
diff --git a/Dockerfile.bb b/Dockerfile.bb
index a8713c1e71..282172d11c 100644
--- a/Dockerfile.bb
+++ b/Dockerfile.bb
@@ -13,7 +13,7 @@ ARG GIT_COMMIT="unknown"
ARG BUILD_TIME="unknown"
ARG BUILD_USER="unknown"
-WORKDIR /bb-build
+WORKDIR /bb-build
COPY . .
@@ -42,4 +42,4 @@ COPY --from=bb /bb-build/bb /usr/local/bin/
CMD ["version"]
-ENTRYPOINT ["bb"]
\ No newline at end of file
+ENTRYPOINT ["bb"]
diff --git a/bin/server/cmd/root.go b/bin/server/cmd/root.go
index e5324dc054..f86ad97dc9 100644
--- a/bin/server/cmd/root.go
+++ b/bin/server/cmd/root.go
@@ -27,11 +27,11 @@ const (
GREETING_BANNER = `
██████╗ ██╗ ██╗████████╗███████╗██████╗ █████╗ ███████╗███████╗
██╔══██╗╚██╗ ██╔╝╚══██╔══╝██╔════╝██╔══██╗██╔══██╗██╔════╝██╔════╝
-██████╔╝ ╚████╔╝ ██║ █████╗ ██████╔╝███████║███████╗█████╗
-██╔══██╗ ╚██╔╝ ██║ ██╔══╝ ██╔══██╗██╔══██║╚════██║██╔══╝
+██████╔╝ ╚████╔╝ ██║ █████╗ ██████╔╝███████║███████╗█████╗
+██╔══██╗ ╚██╔╝ ██║ ██╔══╝ ██╔══██╗██╔══██║╚════██║██╔══╝
██████╔╝ ██║ ██║ ███████╗██████╔╝██║ ██║███████║███████╗
╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚═════╝ ╚═╝ ╚═╝╚══════╝╚══════╝
-
+
%s
___________________________________________________________________________________________
@@ -40,11 +40,11 @@ ________________________________________________________________________________
BYE_BANNER = `
██████╗ ██╗ ██╗███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝
-██████╔╝ ╚████╔╝ █████╗
-██╔══██╗ ╚██╔╝ ██╔══╝
+██████╔╝ ╚████╔╝ █████╗
+██╔══██╗ ╚██╔╝ ██╔══╝
██████╔╝ ██║ ███████╗
╚═════╝ ╚═╝ ╚══════╝
-
+
`
)
diff --git a/docs/coding-guide.md b/docs/coding-guide.md
index 57582f208e..690fc89c71 100644
--- a/docs/coding-guide.md
+++ b/docs/coding-guide.md
@@ -44,4 +44,4 @@ You can install [Neat](https://neat.run/) to subscribe GitHub notification, make
## Common author term
-* PTAL (Please Take Another Look): request the reviewer to take another look after addressing the review comments.
\ No newline at end of file
+* PTAL (Please Take Another Look): request the reviewer to take another look after addressing the review comments.
diff --git a/frontend/.env.dev b/frontend/.env.dev
index 083c815f94..c0d6652113 100644
--- a/frontend/.env.dev
+++ b/frontend/.env.dev
@@ -1 +1 @@
-NODE_ENV=development
\ No newline at end of file
+NODE_ENV=development
diff --git a/frontend/.env.release b/frontend/.env.release
index 995fca4af2..cbde1ccac5 100644
--- a/frontend/.env.release
+++ b/frontend/.env.release
@@ -1 +1 @@
-NODE_ENV=production
\ No newline at end of file
+NODE_ENV=production
diff --git a/frontend/index.html b/frontend/index.html
index 9619c3e9a2..2389bcc70a 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -13,4 +13,4 @@
<script type="module" src="/src/main.ts"></script>
</body>
-</html>
\ No newline at end of file
+</html>
diff --git a/frontend/src/assets/gitlab-logo.svg b/frontend/src/assets/gitlab-logo.svg
index e0e22ac32e..69b3fe6e2d 100644
--- a/frontend/src/assets/gitlab-logo.svg
+++ b/frontend/src/assets/gitlab-logo.svg
@@ -22,4 +22,4 @@
</g>
</g>
</g>
-</svg>
\ No newline at end of file
+</svg>
diff --git a/frontend/src/components/DatabaseBackupPanel.vue b/frontend/src/components/DatabaseBackupPanel.vue
index e9b8c55d5f..92108a1ed4 100644
--- a/frontend/src/components/DatabaseBackupPanel.vue
+++ b/frontend/src/components/DatabaseBackupPanel.vue
@@ -35,9 +35,9 @@
Webhook URL
</label>
<div class="mt-1 textinfolabel">
- An HTTP POST request will be sent to it after a successful backup.
+ An HTTP POST request will be sent to it after a successful backup.
<a
- href="https://docs.bytebase.com/use-bytebase/webhook-integration/database-webhook"
+ href="https://docs.bytebase.com/use-bytebase/webhook-integration/database-webhook"
class="normal-link inline-flex flex-row items-center"
>
Learn more.
diff --git a/frontend/src/components/InstanceForm.vue b/frontend/src/components/InstanceForm.vue
index 47ba9397ea..cf07eb3f83 100644
--- a/frontend/src/components/InstanceForm.vue
+++ b/frontend/src/components/InstanceForm.vue
@@ -357,7 +357,7 @@
<div class="pt-4 grid grid-cols-1 gap-y-4 gap-x-4 sm:grid-cols-3">
<div class="sm:col-span-1 sm:col-start-1">
<label for="username" class="textlabel block"> Username </label>
- <!-- For mysql, username can be empty indicating anonymous user.
+ <!-- For mysql, username can be empty indicating anonymous user.
But it's a very bad practice to use anonymous user for admin operation,
thus we make it REQUIRED here. -->
<input
diff --git a/frontend/src/types/pipeline/pipeline.ts b/frontend/src/types/pipeline/pipeline.ts
index e335984eb8..de20d73804 100644
--- a/frontend/src/types/pipeline/pipeline.ts
+++ b/frontend/src/types/pipeline/pipeline.ts
@@ -4,11 +4,11 @@ import { Stage, StageCreate } from "./stage";
/*
An example
-
+
An alter schema PIPELINE
Dev STAGE (db_dev, env_dev)
Change dev database schema
-
+
Testing STAGE (db_test, env_test)
Change testing database schema
Verify integration test pass
diff --git a/frontend/src/views/IssueDetail.vue b/frontend/src/views/IssueDetail.vue
index ce158b3351..97fa66da14 100644
--- a/frontend/src/views/IssueDetail.vue
+++ b/frontend/src/views/IssueDetail.vue
@@ -145,7 +145,7 @@
@run-checks="runTaskChecks"
/>
</div>
- <!-- The way this is written is awkward and is to workaround an issue in IssueTaskStatementPanel.
+ <!-- The way this is written is awkward and is to workaround an issue in IssueTaskStatementPanel.
The statement panel is in non-edit mode when not creating the issue, and we use v-highlight
to apply syntax highlighting when the panel is in non-edit mode. However, the v-highlight
doesn't seem to work well with the reactivity. So for non-edit mode when !state.create, we
diff --git a/plugin/db/clickhouse/clickhouse.go b/plugin/db/clickhouse/clickhouse.go
index c0833afa07..601c4cfa57 100644
--- a/plugin/db/clickhouse/clickhouse.go
+++ b/plugin/db/clickhouse/clickhouse.go
@@ -155,7 +155,7 @@ func (driver *Driver) SyncSchema(ctx context.Context) ([]*db.DBUser, []*db.DBSch
SELECT
database,
table,
- name,
+ name,
position,
default_expression,
type,
@@ -200,7 +200,7 @@ func (driver *Driver) SyncSchema(ctx context.Context) ([]*db.DBUser, []*db.DBSch
tableWhere := fmt.Sprintf("LOWER(database) NOT IN (%s)", strings.Join(excludedDatabaseList, ", "))
query = `
SELECT
- database,
+ database,
name,
engine,
total_rows,
diff --git a/plugin/db/mysql/mysql.go b/plugin/db/mysql/mysql.go
index 0c9dc549ba..2d3364f876 100644
--- a/plugin/db/mysql/mysql.go
+++ b/plugin/db/mysql/mysql.go
@@ -238,7 +238,7 @@ func (driver *Driver) SyncSchema(ctx context.Context) ([]*db.DBUser, []*db.DBSch
SELECT
TABLE_SCHEMA,
TABLE_NAME,
- IFNULL(COLUMN_NAME, ''),
+ IFNULL(COLUMN_NAME, ''),
ORDINAL_POSITION,
COLUMN_DEFAULT,
IS_NULLABLE,
@@ -295,7 +295,7 @@ func (driver *Driver) SyncSchema(ctx context.Context) ([]*db.DBUser, []*db.DBSch
tableWhere := fmt.Sprintf("LOWER(TABLE_SCHEMA) NOT IN (%s)", strings.Join(excludedDatabaseList, ", "))
query = `
SELECT
- TABLE_SCHEMA,
+ TABLE_SCHEMA,
TABLE_NAME,
IFNULL(UNIX_TIMESTAMP(CREATE_TIME), 0),
IFNULL(UNIX_TIMESTAMP(UPDATE_TIME), 0),
@@ -377,7 +377,7 @@ func (driver *Driver) SyncSchema(ctx context.Context) ([]*db.DBUser, []*db.DBSch
viewWhere := fmt.Sprintf("LOWER(TABLE_SCHEMA) NOT IN (%s)", strings.Join(excludedDatabaseList, ", "))
query = `
SELECT
- TABLE_SCHEMA,
+ TABLE_SCHEMA,
TABLE_NAME,
VIEW_DEFINITION
FROM information_schema.VIEWS
@@ -418,7 +418,7 @@ func (driver *Driver) SyncSchema(ctx context.Context) ([]*db.DBUser, []*db.DBSch
// Query db info
where := fmt.Sprintf("LOWER(SCHEMA_NAME) NOT IN (%s)", strings.Join(excludedDatabaseList, ", "))
query = `
- SELECT
+ SELECT
SCHEMA_NAME,
DEFAULT_CHARACTER_SET_NAME,
DEFAULT_COLLATION_NAME
@@ -531,7 +531,7 @@ func (driver *Driver) Execute(ctx context.Context, statement string) error {
// Migration related
func (driver *Driver) NeedsSetupMigration(ctx context.Context) (bool, error) {
const query = `
- SELECT
+ SELECT
1
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = 'bytebase' AND TABLE_NAME = 'migration_history'
diff --git a/plugin/db/mysql/mysql_migration_schema.sql b/plugin/db/mysql/mysql_migration_schema.sql
index 4f63729e6f..def1fa088a 100644
--- a/plugin/db/mysql/mysql_migration_schema.sql
+++ b/plugin/db/mysql/mysql_migration_schema.sql
@@ -46,4 +46,4 @@ CREATE UNIQUE INDEX bytebase_idx_unique_migration_history_namespace_engine_versi
CREATE INDEX bytebase_idx_migration_history_namespace_engine_type ON bytebase.migration_history(namespace(256), `engine`, `type`);
-CREATE INDEX bytebase_idx_migration_history_namespace_created ON bytebase.migration_history(namespace(256), `created_ts`);
\ No newline at end of file
+CREATE INDEX bytebase_idx_migration_history_namespace_created ON bytebase.migration_history(namespace(256), `created_ts`);
diff --git a/plugin/db/pg/pg.go b/plugin/db/pg/pg.go
index 09e1e1adfd..d1cbc90ac2 100644
--- a/plugin/db/pg/pg.go
+++ b/plugin/db/pg/pg.go
@@ -454,14 +454,14 @@ func (driver *Driver) getUserList(ctx context.Context) ([]*db.DBUser, error) {
// Query user info
query := `
SELECT usename AS role_name,
- CASE
- WHEN usesuper AND usecreatedb THEN
+ CASE
+ WHEN usesuper AND usecreatedb THEN
CAST('superuser, create database' AS pg_catalog.text)
- WHEN usesuper THEN
+ WHEN usesuper THEN
CAST('superuser' AS pg_catalog.text)
- WHEN usecreatedb THEN
+ WHEN usecreatedb THEN
CAST('create database' AS pg_catalog.text)
- ELSE
+ ELSE
CAST('' AS pg_catalog.text)
END role_attributes
FROM pg_catalog.pg_user
@@ -524,7 +524,7 @@ func (driver *Driver) NeedsSetupMigration(ctx context.Context) (bool, error) {
}
const query = `
- SELECT
+ SELECT
1
FROM information_schema.tables
WHERE table_name = 'migration_history'
@@ -1325,7 +1325,7 @@ func getTableColumns(txn *sql.Tx, schemaName, tableName string) ([]*columnSchema
FROM pg_catalog.pg_class c
WHERE
c.oid = (SELECT cols.table_name::regclass::oid) AND
- cols.table_schema=c.relnamespace::regnamespace::text AND
+ cols.table_schema=c.relnamespace::regnamespace::text AND
cols.table_name = c.relname
) as column_comment
FROM INFORMATION_SCHEMA.COLUMNS AS cols
diff --git a/plugin/db/pg/pg_migration_schema.sql b/plugin/db/pg/pg_migration_schema.sql
index d9dd0db0ea..7b95657211 100644
--- a/plugin/db/pg/pg_migration_schema.sql
+++ b/plugin/db/pg/pg_migration_schema.sql
@@ -46,4 +46,4 @@ CREATE UNIQUE INDEX bytebase_idx_unique_migration_history_namespace_engine_versi
CREATE INDEX bytebase_idx_migration_history_namespace_engine_type ON migration_history(namespace, engine, type);
-CREATE INDEX bytebase_idx_migration_history_namespace_created ON migration_history(namespace, created_ts);
\ No newline at end of file
+CREATE INDEX bytebase_idx_migration_history_namespace_created ON migration_history(namespace, created_ts);
diff --git a/scripts/.air_bb.toml b/scripts/.air_bb.toml
index a3ace63f92..6c38b78817 100644
--- a/scripts/.air_bb.toml
+++ b/scripts/.air_bb.toml
@@ -10,4 +10,4 @@ tmp_dir = ".air"
exclude_regex = []
exclude_unchanged = false
follow_symlink = false
- full_bin = ""
\ No newline at end of file
+ full_bin = ""
diff --git a/scripts/.air_debug.toml b/scripts/.air_debug.toml
index 5ea699676e..c3fd284855 100644
--- a/scripts/.air_debug.toml
+++ b/scripts/.air_debug.toml
@@ -10,4 +10,4 @@ tmp_dir = ".air"
exclude_regex = []
exclude_unchanged = false
follow_symlink = false
- full_bin = ""
\ No newline at end of file
+ full_bin = ""
diff --git a/scripts/.air_demo.toml b/scripts/.air_demo.toml
index ae0b9f849e..628d5415c2 100644
--- a/scripts/.air_demo.toml
+++ b/scripts/.air_demo.toml
@@ -10,4 +10,4 @@ tmp_dir = ".air"
exclude_regex = []
exclude_unchanged = false
follow_symlink = false
- full_bin = ""
\ No newline at end of file
+ full_bin = ""
diff --git a/scripts/VERSION b/scripts/VERSION
index c18d72be30..6f4eebdf6f 100644
--- a/scripts/VERSION
+++ b/scripts/VERSION
@@ -1 +1 @@
-0.8.1
\ No newline at end of file
+0.8.1
diff --git a/scripts/build.sh b/scripts/build.sh
index 507160bbb6..c531d69998 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -78,4 +78,4 @@ echo ""
echo "Command to start Bytebase on http://localhost:8080"
echo ""
echo "$ ${OUTPUT_BINARY} --host http://localhost --port 8080${NC}"
-echo ""
\ No newline at end of file
+echo ""
diff --git a/scripts/build_bb.sh b/scripts/build_bb.sh
index 826c3f1eba..59f5183a2f 100644
--- a/scripts/build_bb.sh
+++ b/scripts/build_bb.sh
@@ -42,4 +42,4 @@ echo "Completed building bb."
echo ""
echo "Printing version..."
-${OUTPUT_BINARY} version
\ No newline at end of file
+${OUTPUT_BINARY} version
diff --git a/scripts/build_docker.sh b/scripts/build_docker.sh
index 878a533156..acdf614624 100644
--- a/scripts/build_docker.sh
+++ b/scripts/build_docker.sh
@@ -43,4 +43,4 @@ echo ""
echo "Command to start Bytebase in readonly mode on http://example.com"
echo ""
echo "$ docker run --init --name bytebase --restart always --publish 80:80 --volume ~/.bytebase/data:/var/opt/bytebase bytebase/bytebase:${VERSION} --data /var/opt/bytebase --host http://example.com --port 80 --readonly"
-echo ""
\ No newline at end of file
+echo ""
diff --git a/scripts/build_docker_bb.sh b/scripts/build_docker_bb.sh
index e48868d235..9d6eea47d1 100644
--- a/scripts/build_docker_bb.sh
+++ b/scripts/build_docker_bb.sh
@@ -35,4 +35,4 @@ echo ""
echo "Command to run bb"
echo ""
echo "$ docker run --rm --name bb bytebase/bb"
-echo ""
\ No newline at end of file
+echo ""
diff --git a/server/acl_casbin_model.conf b/server/acl_casbin_model.conf
index 14a6186d63..def33bdb38 100644
--- a/server/acl_casbin_model.conf
+++ b/server/acl_casbin_model.conf
@@ -8,4 +8,4 @@ p = sub, obj, act
e = some(where (p.eft == allow)) # Passes auth if any of the policies allows
[matchers]
-m = r.sub == p.sub && keyMatch4(r.obj, p.obj) && r.act == p.act
\ No newline at end of file
+m = r.sub == p.sub && keyMatch4(r.obj, p.obj) && r.act == p.act
diff --git a/server/acl_casbin_policy_dba.csv b/server/acl_casbin_policy_dba.csv
index eeb09107b3..b96e755555 100644
--- a/server/acl_casbin_policy_dba.csv
+++ b/server/acl_casbin_policy_dba.csv
@@ -74,4 +74,4 @@ p, DBA, /vcs/{id}, DELETE
p, DBA, /vcs/{id}/repository, GET
p, DBA, /plan, GET
p, DBA, /plan, PATCH
-p, DBA, /setting, GET
\ No newline at end of file
+p, DBA, /setting, GET
diff --git a/server/acl_casbin_policy_developer.csv b/server/acl_casbin_policy_developer.csv
index df1bdf7dcb..1768bb2b12 100644
--- a/server/acl_casbin_policy_developer.csv
+++ b/server/acl_casbin_policy_developer.csv
@@ -65,4 +65,4 @@ p, DEVELOPER, /vcs, GET
p, DEVELOPER, /vcs/{id}, GET
p, DEVELOPER, /plan, GET
p, DEVELOPER, /plan, PATCH
-p, DEVELOPER, /setting, GET
\ No newline at end of file
+p, DEVELOPER, /setting, GET
diff --git a/server/acl_casbin_policy_owner.csv b/server/acl_casbin_policy_owner.csv
index a98819aac0..f71828d137 100644
--- a/server/acl_casbin_policy_owner.csv
+++ b/server/acl_casbin_policy_owner.csv
@@ -80,4 +80,4 @@ p, OWNER, /vcs/{id}/repository, GET
p, OWNER, /plan, GET
p, OWNER, /plan, PATCH
p, OWNER, /setting, GET
-p, OWNER, /setting/{name}, PATCH
\ No newline at end of file
+p, OWNER, /setting/{name}, PATCH
diff --git a/store/activity.go b/store/activity.go
index 884c727b8e..3f9da01409 100644
--- a/store/activity.go
+++ b/store/activity.go
@@ -185,7 +185,7 @@ func findActivityList(ctx context.Context, tx *Tx, find *api.ActivityFind) (_ []
}
var query = `
- SELECT
+ SELECT
id,
creator_id,
created_ts,
diff --git a/store/anomaly.go b/store/anomaly.go
index f41f1a2a21..fdf64fc483 100644
--- a/store/anomaly.go
+++ b/store/anomaly.go
@@ -187,7 +187,7 @@ func findAnomalyList(ctx context.Context, tx *Tx, find *api.AnomalyFind) (_ []*a
}
rows, err := tx.QueryContext(ctx, `
- SELECT
+ SELECT
id,
creator_id,
created_ts,
diff --git a/store/bookmark.go b/store/bookmark.go
index 70629f7894..9df37e6f11 100644
--- a/store/bookmark.go
+++ b/store/bookmark.go
@@ -155,7 +155,7 @@ func findBookmarkList(ctx context.Context, tx *Tx, find *api.BookmarkFind) (_ []
}
rows, err := tx.QueryContext(ctx, `
- SELECT
+ SELECT
id,
creator_id,
created_ts,
diff --git a/store/data_source.go b/store/data_source.go
index c36c7bbc70..f45ef8da01 100644
--- a/store/data_source.go
+++ b/store/data_source.go
@@ -175,7 +175,7 @@ func (s *DataSourceService) findDataSourceList(ctx context.Context, tx *Tx, find
}
rows, err := tx.QueryContext(ctx, `
- SELECT
+ SELECT
id,
creator_id,
created_ts,
diff --git a/store/database.go b/store/database.go
index cc367b70c2..7d90057a8b 100644
--- a/store/database.go
+++ b/store/database.go
@@ -255,7 +255,7 @@ func (s *DatabaseService) findDatabaseList(ctx context.Context, tx *Tx, find *ap
}
rows, err := tx.QueryContext(ctx, `
- SELECT
+ SELECT
id,
creator_id,
created_ts,
diff --git a/store/environment.go b/store/environment.go
index 7af39bda54..025fab15e2 100644
--- a/store/environment.go
+++ b/store/environment.go
@@ -211,7 +211,7 @@ func (s *EnvironmentService) findEnvironmentList(ctx context.Context, tx *Tx, fi
}
rows, err := tx.QueryContext(ctx, `
- SELECT
+ SELECT
id,
row_status,
creator_id,
diff --git a/store/inbox.go b/store/inbox.go
index f88a036ac3..764172725d 100644
--- a/store/inbox.go
+++ b/store/inbox.go
@@ -216,7 +216,7 @@ func findInboxList(ctx context.Context, tx *Tx, find *api.InboxFind) (_ []*api.I
}
rows, err := tx.QueryContext(ctx, `
- SELECT
+ SELECT
inbox.id,
receiver_id,
`+"`status`,"+`
diff --git a/store/instance.go b/store/instance.go
index 1667dd123c..37ab9fc6fa 100644
--- a/store/instance.go
+++ b/store/instance.go
@@ -236,7 +236,7 @@ func findInstanceList(ctx context.Context, tx *Tx, find *api.InstanceFind) (_ []
}
rows, err := tx.QueryContext(ctx, `
- SELECT
+ SELECT
id,
row_status,
creator_id,
diff --git a/store/instance_user.go b/store/instance_user.go
index 1fe1823f6b..e8b7640acd 100644
--- a/store/instance_user.go
+++ b/store/instance_user.go
@@ -131,7 +131,7 @@ func findInstanceUserList(ctx context.Context, tx *Tx, find *api.InstanceUserFin
where, args = append(where, "instance_id = ?"), append(args, find.InstanceID)
rows, err := tx.QueryContext(ctx, `
- SELECT
+ SELECT
id,
instance_id,
name,
diff --git a/store/issue.go b/store/issue.go
index 7d4fc3f937..1a2cac534d 100644
--- a/store/issue.go
+++ b/store/issue.go
@@ -212,7 +212,7 @@ func (s *IssueService) findIssueList(ctx context.Context, tx *Tx, find *api.Issu
}
var query = `
- SELECT
+ SELECT
id,
creator_id,
created_ts,
diff --git a/store/issue_subscriber.go b/store/issue_subscriber.go
index 4bc43fa3a8..4a34117765 100644
--- a/store/issue_subscriber.go
+++ b/store/issue_subscriber.go
@@ -125,7 +125,7 @@ func findIssueSubscriberList(ctx context.Context, tx *Tx, find *api.IssueSubscri
}
rows, err := tx.QueryContext(ctx, `
- SELECT
+ SELECT
issue_id,
subscriber_id
FROM issue_subscriber
diff --git a/store/member.go b/store/member.go
index 6749efd8fc..fa29ec2b51 100644
--- a/store/member.go
+++ b/store/member.go
@@ -196,7 +196,7 @@ func findMemberList(ctx context.Context, tx *Tx, find *api.MemberFind) (_ []*api
}
rows, err := tx.QueryContext(ctx, `
- SELECT
+ SELECT
id,
row_status,
creator_id,
diff --git a/store/migration/10001__init_schema.sql b/store/migration/10001__init_schema.sql
index 91a938e5b3..ce1afcf43d 100644
--- a/store/migration/10001__init_schema.sql
+++ b/store/migration/10001__init_schema.sql
@@ -161,7 +161,7 @@ END;
-- Policy
-- policy stores the policies for each environment.
--- Policies are associated with environments. Since we may have policies not associated with environment later, we name the table policy.
+-- Policies are associated with environments. Since we may have policies not associated with environment later, we name the table policy.
CREATE TABLE policy (
id INTEGER PRIMARY KEY AUTOINCREMENT,
row_status TEXT NOT NULL CHECK (
diff --git a/store/pipeline.go b/store/pipeline.go
index 1f1ecd34b5..5e0ca0d8e8 100644
--- a/store/pipeline.go
+++ b/store/pipeline.go
@@ -144,7 +144,7 @@ func (s *PipelineService) createPipeline(ctx context.Context, tx *Tx, create *ap
creator_id,
updater_id,
name,
- `+"`status`"+`
+ `+"`status`"+`
)
VALUES (?, ?, ?, 'OPEN')
RETURNING id, creator_id, created_ts, updater_id, updated_ts, name, `+"`status`"+`
@@ -187,7 +187,7 @@ func (s *PipelineService) findPipelineList(ctx context.Context, tx *Tx, find *ap
}
rows, err := tx.QueryContext(ctx, `
- SELECT
+ SELECT
id,
creator_id,
created_ts,
diff --git a/store/principal.go b/store/principal.go
index bb46846f90..644cfe2bd8 100644
--- a/store/principal.go
+++ b/store/principal.go
@@ -195,7 +195,7 @@ func findPrincipalList(ctx context.Context, tx *Tx, find *api.PrincipalFind) (_
}
rows, err := tx.QueryContext(ctx, `
- SELECT
+ SELECT
id,
creator_id,
created_ts,
diff --git a/store/project.go b/store/project.go
index a771c1c4ff..27bc10b080 100644
--- a/store/project.go
+++ b/store/project.go
@@ -214,7 +214,7 @@ func findProjectList(ctx context.Context, tx *Tx, find *api.ProjectFind) (_ []*a
}
rows, err := tx.QueryContext(ctx, `
- SELECT
+ SELECT
id,
row_status,
creator_id,
diff --git a/store/project_member.go b/store/project_member.go
index 4ff9eb1af7..69438d3412 100644
--- a/store/project_member.go
+++ b/store/project_member.go
@@ -176,7 +176,7 @@ func findProjectMemberList(ctx context.Context, tx *Tx, find *api.ProjectMemberF
}
rows, err := tx.QueryContext(ctx, `
- SELECT
+ SELECT
id,
creator_id,
created_ts,
diff --git a/store/project_webhook.go b/store/project_webhook.go
index ccc67c6ab6..024bed7bd0 100644
--- a/store/project_webhook.go
+++ b/store/project_webhook.go
@@ -187,7 +187,7 @@ func findProjectWebhookList(ctx context.Context, tx *Tx, find *api.ProjectWebhoo
}
rows, err := tx.QueryContext(ctx, `
- SELECT
+ SELECT
id,
creator_id,
created_ts,
diff --git a/store/repository.go b/store/repository.go
index 3f4c463976..f154ed1fca 100644
--- a/store/repository.go
+++ b/store/repository.go
@@ -240,7 +240,7 @@ func findRepositoryList(ctx context.Context, tx *Tx, find *api.RepositoryFind) (
}
rows, err := tx.QueryContext(ctx, `
- SELECT
+ SELECT
id,
creator_id,
created_ts,
diff --git a/store/seed/release/10001__init_seed.sql b/store/seed/release/10001__init_seed.sql
index f522583b73..5471b5c277 100644
--- a/store/seed/release/10001__init_seed.sql
+++ b/store/seed/release/10001__init_seed.sql
@@ -480,4 +480,4 @@ VALUES
'bb.issue.comment.create',
'INFO',
'Go fish!'
- );
\ No newline at end of file
+ );
diff --git a/store/seed/test/10000__reset.sql b/store/seed/test/10000__reset.sql
index 1d7152301a..48c6a2f077 100644
--- a/store/seed/test/10000__reset.sql
+++ b/store/seed/test/10000__reset.sql
@@ -76,7 +76,7 @@ DELETE FROM
DELETE FROM
policy;
-
+
DELETE FROM
environment;
@@ -105,4 +105,4 @@ WHERE
UPDATE
sqlite_sequence
SET
- seq = 100;
\ No newline at end of file
+ seq = 100;
diff --git a/store/seed/test/10001__principal.sql b/store/seed/test/10001__principal.sql
index 4d3eea3935..f298f35088 100644
--- a/store/seed/test/10001__principal.sql
+++ b/store/seed/test/10001__principal.sql
@@ -82,4 +82,4 @@ VALUES
-- 8192
'$2a$10$2QTgsuKDTGYe68lpeqRqouw1dQTRhssrYSnwQVzQUctQvhnVIccRa'
- );
\ No newline at end of file
+ );
diff --git a/store/seed/test/10010__workspace.sql b/store/seed/test/10010__workspace.sql
index e2c27b7230..026f1d2de6 100644
--- a/store/seed/test/10010__workspace.sql
+++ b/store/seed/test/10010__workspace.sql
@@ -1 +1 @@
--- 0010 is reserved for workspace, but is not implemented yet.
\ No newline at end of file
+-- 0010 is reserved for workspace, but is not implemented yet.
diff --git a/store/seed/test/10020__member.sql b/store/seed/test/10020__member.sql
index 697e4842ca..15f5ee8191 100644
--- a/store/seed/test/10020__member.sql
+++ b/store/seed/test/10020__member.sql
@@ -44,4 +44,4 @@ INSERT INTO
principal_id
)
VALUES
- (2004, 101, 101, 'ACTIVE', 'DEVELOPER', 104);
\ No newline at end of file
+ (2004, 101, 101, 'ACTIVE', 'DEVELOPER', 104);
diff --git a/store/seed/test/10030__project.sql b/store/seed/test/10030__project.sql
index 094b9d564f..33f2e64d72 100644
--- a/store/seed/test/10030__project.sql
+++ b/store/seed/test/10030__project.sql
@@ -82,4 +82,4 @@ VALUES
'RTR',
'UI',
'PUBLIC'
- );
\ No newline at end of file
+ );
diff --git a/store/seed/test/10040__project_member.sql b/store/seed/test/10040__project_member.sql
index 9604a49cc6..782c23f520 100644
--- a/store/seed/test/10040__project_member.sql
+++ b/store/seed/test/10040__project_member.sql
@@ -172,4 +172,4 @@ VALUES
3004,
'DEVELOPER',
103
- );
\ No newline at end of file
+ );
diff --git a/store/seed/test/10041__project_webhook.sql b/store/seed/test/10041__project_webhook.sql
index 41c6a60c4f..6598736a84 100644
--- a/store/seed/test/10041__project_webhook.sql
+++ b/store/seed/test/10041__project_webhook.sql
@@ -127,4 +127,4 @@ VALUES
'Teams',
'https://foo.webhook.office.com/webhookb2/12345',
'bb.issue.create,bb.issue.status.update,bb.pipeline.task.status.update,bb.issue.field.update,bb.issue.comment.create'
- );
\ No newline at end of file
+ );
diff --git a/store/seed/test/10060__instance.sql b/store/seed/test/10060__instance.sql
index be15b73001..e579f5638c 100644
--- a/store/seed/test/10060__instance.sql
+++ b/store/seed/test/10060__instance.sql
@@ -241,4 +241,4 @@ VALUES
'mysql.retired.example.com',
'3306',
"bytebase.com/database/mysql"
- );
\ No newline at end of file
+ );
diff --git a/store/seed/test/10061__instance_user.sql b/store/seed/test/10061__instance_user.sql
index 79525bd8b6..9b43148802 100644
--- a/store/seed/test/10061__instance_user.sql
+++ b/store/seed/test/10061__instance_user.sql
@@ -83,4 +83,4 @@ VALUES
6005,
'`root`@`%`',
'GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, CREATE ROLE, DROP ROLE ON *.* TO `root`@`localhost` WITH GRANT OPTION'
- );
\ No newline at end of file
+ );
diff --git a/store/seed/test/10070__db.sql b/store/seed/test/10070__db.sql
index 550f823c47..9857629624 100644
--- a/store/seed/test/10070__db.sql
+++ b/store/seed/test/10070__db.sql
@@ -1,4 +1,4 @@
--- Database for sandbox environment instance 6001
+-- Database for sandbox environment instance 6001
INSERT INTO
db (
id,
@@ -572,4 +572,4 @@ VALUES
'utf8mb4_general_ci',
'OK',
0
- );
\ No newline at end of file
+ );
diff --git a/store/seed/test/10071__tbl.sql b/store/seed/test/10071__tbl.sql
index e82752cf2f..75894c9d5e 100644
--- a/store/seed/test/10071__tbl.sql
+++ b/store/seed/test/10071__tbl.sql
@@ -1,4 +1,4 @@
--- Table for database 7002 testdb_dev
+-- Table for database 7002 testdb_dev
INSERT INTO
tbl (
id,
@@ -34,7 +34,7 @@ VALUES
''
);
--- Table for database 7006 testdb_integration
+-- Table for database 7006 testdb_integration
INSERT INTO
tbl (
creator_id,
@@ -68,7 +68,7 @@ VALUES
''
);
--- Table for database 7010 testdb_staging
+-- Table for database 7010 testdb_staging
INSERT INTO
tbl (
creator_id,
@@ -602,4 +602,4 @@ VALUES
8192,
'',
''
- );
\ No newline at end of file
+ );
diff --git a/store/seed/test/10072__col.sql b/store/seed/test/10072__col.sql
index 20538b7af6..b5026437a8 100644
--- a/store/seed/test/10072__col.sql
+++ b/store/seed/test/10072__col.sql
@@ -1,4 +1,4 @@
--- Column for database 7002 testdb_dev, table 7101 tbl1
+-- Column for database 7002 testdb_dev, table 7101 tbl1
INSERT INTO
col (
id,
@@ -32,7 +32,7 @@ VALUES
'I am a comment'
);
--- Column for database 7006 testdb_integration, table 7102 tbl1
+-- Column for database 7006 testdb_integration, table 7102 tbl1
INSERT INTO
col (
creator_id,
@@ -64,7 +64,7 @@ VALUES
'I am a comment'
);
--- Column for database 7010 testdb_staging, table 7103 tbl1
+-- Column for database 7010 testdb_staging, table 7103 tbl1
INSERT INTO
col (
creator_id,
@@ -96,7 +96,7 @@ VALUES
'I am a comment'
);
--- Column for database 7014 testdb_prod, table 7104 tbl1
+-- Column for database 7014 testdb_prod, table 7104 tbl1
INSERT INTO
col (
creator_id,
@@ -128,7 +128,7 @@ VALUES
'I am a comment'
);
--- Column for database 7003 shop, table 7105 product
+-- Column for database 7003 shop, table 7105 product
INSERT INTO
col (
creator_id,
@@ -222,7 +222,7 @@ VALUES
''
);
--- Column for database 7007 shop, table 7106 product
+-- Column for database 7007 shop, table 7106 product
INSERT INTO
col (
creator_id,
@@ -316,7 +316,7 @@ VALUES
''
);
--- Column for database 7004 blog, table 7107 user
+-- Column for database 7004 blog, table 7107 user
INSERT INTO
col (
creator_id,
@@ -410,7 +410,7 @@ VALUES
''
);
--- Column for database 7004 blog, table 7108 post
+-- Column for database 7004 blog, table 7108 post
INSERT INTO
col (
creator_id,
@@ -535,7 +535,7 @@ VALUES
''
);
--- Column for database 7004 blog, table 7109 comment
+-- Column for database 7004 blog, table 7109 comment
INSERT INTO
col (
creator_id,
@@ -660,7 +660,7 @@ VALUES
''
);
--- Column for database 7008 blog, table 7110 user
+-- Column for database 7008 blog, table 7110 user
INSERT INTO
col (
creator_id,
@@ -754,7 +754,7 @@ VALUES
''
);
--- Column for database 7008 blog, table 7111 post
+-- Column for database 7008 blog, table 7111 post
INSERT INTO
col (
creator_id,
@@ -879,7 +879,7 @@ VALUES
''
);
--- Column for database 7008 blog, table 7112 comment
+-- Column for database 7008 blog, table 7112 comment
INSERT INTO
col (
creator_id,
@@ -1004,7 +1004,7 @@ VALUES
''
);
--- Column for database 7012 blog, table 7113 user
+-- Column for database 7012 blog, table 7113 user
INSERT INTO
col (
creator_id,
@@ -1098,7 +1098,7 @@ VALUES
''
);
--- Column for database 7012 blog, table 7114 post
+-- Column for database 7012 blog, table 7114 post
INSERT INTO
col (
creator_id,
@@ -1223,7 +1223,7 @@ VALUES
''
);
--- Column for database 7012 blog, table 7115 comment
+-- Column for database 7012 blog, table 7115 comment
INSERT INTO
col (
creator_id,
@@ -1348,7 +1348,7 @@ VALUES
''
);
--- Column for database 7016 blog, table 7116 user
+-- Column for database 7016 blog, table 7116 user
INSERT INTO
col (
creator_id,
@@ -1442,7 +1442,7 @@ VALUES
''
);
--- Column for database 7008 blog, table 7117 post
+-- Column for database 7008 blog, table 7117 post
INSERT INTO
col (
creator_id,
@@ -1567,7 +1567,7 @@ VALUES
''
);
--- Column for database 7016 blog, table 7118 comment
+-- Column for database 7016 blog, table 7118 comment
INSERT INTO
col (
creator_id,
@@ -1690,4 +1690,4 @@ VALUES
'',
'',
''
- );
\ No newline at end of file
+ );
diff --git a/store/seed/test/10073__idx.sql b/store/seed/test/10073__idx.sql
index 14e8d78083..756aa8c664 100644
--- a/store/seed/test/10073__idx.sql
+++ b/store/seed/test/10073__idx.sql
@@ -180,7 +180,7 @@ VALUES
''
);
--- Index for database 7004 blog, table 7107 user
+-- Index for database 7004 blog, table 7107 user
INSERT INTO
idx (
creator_id,
@@ -210,7 +210,7 @@ VALUES
''
);
--- Index for database 7004 blog, table 7108 post
+-- Index for database 7004 blog, table 7108 post
INSERT INTO
idx (
creator_id,
@@ -240,7 +240,7 @@ VALUES
''
);
--- Index for database 7004 blog, table 7109 comment
+-- Index for database 7004 blog, table 7109 comment
INSERT INTO
idx (
creator_id,
@@ -270,7 +270,7 @@ VALUES
''
);
--- Index for database 7008 blog, table 7110 user
+-- Index for database 7008 blog, table 7110 user
INSERT INTO
idx (
creator_id,
@@ -300,7 +300,7 @@ VALUES
''
);
--- Index for database 7008 blog, table 7111 post
+-- Index for database 7008 blog, table 7111 post
INSERT INTO
idx (
creator_id,
@@ -330,7 +330,7 @@ VALUES
''
);
--- Index for database 7008 blog, table 7112 comment
+-- Index for database 7008 blog, table 7112 comment
INSERT INTO
idx (
creator_id,
@@ -360,7 +360,7 @@ VALUES
''
);
--- Index for database 7012 blog, table 7113 user
+-- Index for database 7012 blog, table 7113 user
INSERT INTO
idx (
creator_id,
@@ -390,7 +390,7 @@ VALUES
''
);
--- Index for database 7012 blog, table 7114 post
+-- Index for database 7012 blog, table 7114 post
INSERT INTO
idx (
creator_id,
@@ -420,7 +420,7 @@ VALUES
''
);
--- Index for database 7012 blog, table 7115 comment
+-- Index for database 7012 blog, table 7115 comment
INSERT INTO
idx (
creator_id,
@@ -450,7 +450,7 @@ VALUES
''
);
--- Index for database 7016 blog, table 7116 user
+-- Index for database 7016 blog, table 7116 user
INSERT INTO
idx (
creator_id,
@@ -480,7 +480,7 @@ VALUES
''
);
--- Index for database 7016 blog, table 7117 post
+-- Index for database 7016 blog, table 7117 post
INSERT INTO
idx (
creator_id,
@@ -510,7 +510,7 @@ VALUES
''
);
--- Index for database 7016 blog, table 7118 comment
+-- Index for database 7016 blog, table 7118 comment
INSERT INTO
idx (
creator_id,
@@ -538,4 +538,4 @@ VALUES
1,
1,
''
- );
\ No newline at end of file
+ );
diff --git a/store/seed/test/10074__backup.sql b/store/seed/test/10074__backup.sql
index eb8663e119..ce806e4d32 100644
--- a/store/seed/test/10074__backup.sql
+++ b/store/seed/test/10074__backup.sql
@@ -248,4 +248,4 @@ VALUES
'v3_20210808020000',
'data/backup/db/7016/blog-prod-20210808T020000-autobackup.sql',
''
- );
\ No newline at end of file
+ );
diff --git a/store/seed/test/10080__data_source.sql b/store/seed/test/10080__data_source.sql
index 27d304aaa8..03abdbebc2 100644
--- a/store/seed/test/10080__data_source.sql
+++ b/store/seed/test/10080__data_source.sql
@@ -221,4 +221,4 @@ VALUES
'ADMIN',
'admin',
'Prod12345'
- );
\ No newline at end of file
+ );
diff --git a/store/seed/test/10090__pipeline.sql b/store/seed/test/10090__pipeline.sql
index 1996f0fcbb..82d16ff1e6 100644
--- a/store/seed/test/10090__pipeline.sql
+++ b/store/seed/test/10090__pipeline.sql
@@ -1,4 +1,4 @@
--- A single stage, single task "hello world"
+-- A single stage, single task "hello world"
INSERT INTO
pipeline (
id,
@@ -186,4 +186,4 @@ VALUES
1624879944,
'Pipeline - Create a new table tbl2',
'OPEN'
- );
\ No newline at end of file
+ );
diff --git a/store/seed/test/10100__stage.sql b/store/seed/test/10100__stage.sql
index c5b5a57c24..a6824219f3 100644
--- a/store/seed/test/10100__stage.sql
+++ b/store/seed/test/10100__stage.sql
@@ -361,4 +361,4 @@ VALUES
9009,
5004,
'Prod'
- );
\ No newline at end of file
+ );
diff --git a/store/seed/test/10110__task.sql b/store/seed/test/10110__task.sql
index c4ae68fa01..ae94c76c75 100644
--- a/store/seed/test/10110__task.sql
+++ b/store/seed/test/10110__task.sql
@@ -516,4 +516,4 @@ VALUES
'bb.task.database.schema.update',
'PENDING_APPROVAL',
'{"migrationType":"MIGRATE","statement":"CREATE TABLE testdb_prod.tbl2 (name TEXT);", "rollbackStatement":"DROP TABLE testdb_prod.tbl2;"}'
- );
\ No newline at end of file
+ );
diff --git a/store/seed/test/10120__task_run.sql b/store/seed/test/10120__task_run.sql
index 0934103499..e0ddc54f78 100644
--- a/store/seed/test/10120__task_run.sql
+++ b/store/seed/test/10120__task_run.sql
@@ -320,4 +320,4 @@ VALUES
103,
'{"detail":"table \"tbl2\" already exists"}',
'{"migrationType":"MIGRATE","statement":"CREATE TABLE testdb_staging.tbl2 (name TEXT)"}'
- );
\ No newline at end of file
+ );
diff --git a/store/seed/test/10121__task_check_run.sql b/store/seed/test/10121__task_check_run.sql
index 26dc81682e..086ae1d28c 100644
--- a/store/seed/test/10121__task_check_run.sql
+++ b/store/seed/test/10121__task_check_run.sql
@@ -47,4 +47,4 @@ VALUES
'',
'{"resultList":[{"status":"SUCCESS","code":0,"title":"Syntax OK","content":"OK"}]}',
'{"statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","dbType":"MYSQL","charset":"utf8mb4","collation":"utf8mb4_general_ci"}'
- );
\ No newline at end of file
+ );
diff --git a/store/seed/test/10131__issue_subscriber.sql b/store/seed/test/10131__issue_subscriber.sql
index 4f04a2d1bb..4c2735ed8b 100644
--- a/store/seed/test/10131__issue_subscriber.sql
+++ b/store/seed/test/10131__issue_subscriber.sql
@@ -120,4 +120,4 @@ VALUES
INSERT INTO
issue_subscriber (issue_id, subscriber_id)
VALUES
- (13009, 103);
\ No newline at end of file
+ (13009, 103);
diff --git a/store/seed/test/10140__activity.sql b/store/seed/test/10140__activity.sql
index 0a8df52808..862d8201ae 100644
--- a/store/seed/test/10140__activity.sql
+++ b/store/seed/test/10140__activity.sql
@@ -924,7 +924,7 @@ VALUES
'Applied migration version 20210830011437.11014 to database "testdb_integration"',
'{"taskID":11014,"oldStatus":"RUNNING","newStatus":"DONE","issueName":"Create a new table ''tbl2'' using multi-stage SQL review workflow","taskName":"Update testdb_integration"}'
);
-
+
INSERT INTO
activity (
creator_id,
@@ -1201,4 +1201,4 @@ VALUES
'INFO',
'Created issue "Create user, post, comment table for prod environment".',
'{"pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryID":"13","repositoryURL":"http://gitlab.bytebase.com/bytebase-demo/blog","repositoryFullPath":"bytebase-demo/blog","authorName":"tianzhou","fileCommit":{"id":"ec17d38d6581015feb49b341cc3da56cb0e354fb","title":"Create user, post, comment table for prod environment","message":"Create user, post, comment table for prod environment","createdTs": 1630941711,"url":"https://gitlab.bytebase.com/bytebase-demo/blog/-/commit/ec17d38d6581015feb49b341cc3da56cb0e354fb","authorName":"tianzhou","added":"bytebase/prod/blog__202106280000__baseline__add_initial_schema.sql"}},"issueID":13006,"issueName":"Create user, post, comment table for prod environment"}'
- );
\ No newline at end of file
+ );
diff --git a/store/seed/test/10150__inbox.sql b/store/seed/test/10150__inbox.sql
index 28f2d29c47..79fc4ab7b6 100644
--- a/store/seed/test/10150__inbox.sql
+++ b/store/seed/test/10150__inbox.sql
@@ -176,4 +176,4 @@ INSERT INTO
`status`
)
VALUES
- (103, 14013, 'UNREAD');
\ No newline at end of file
+ (103, 14013, 'UNREAD');
diff --git a/store/seed/test/10160__bookmark.sql b/store/seed/test/10160__bookmark.sql
index 383d9c306a..9832892f65 100644
--- a/store/seed/test/10160__bookmark.sql
+++ b/store/seed/test/10160__bookmark.sql
@@ -14,4 +14,4 @@ VALUES
101,
'Hello world!',
'/issue/hello-world-13001'
- );
\ No newline at end of file
+ );
diff --git a/store/seed/test/10170__vcs.sql b/store/seed/test/10170__vcs.sql
index a2b5321947..c3c0f3255e 100644
--- a/store/seed/test/10170__vcs.sql
+++ b/store/seed/test/10170__vcs.sql
@@ -22,4 +22,4 @@ VALUES
'https://gitlab.bytebase.com/api/v4',
'fda62e44b5388b1ca6e72d5a7028a3c2c47157fc13fd98328e2bd446fae98fd8',
'4ac5cf6f2e400398e34f753a5222432838e84349e8d5120c4adaa6a65278b765'
- );
\ No newline at end of file
+ );
diff --git a/store/seed/test/10180__repository.sql b/store/seed/test/10180__repository.sql
index 74fcfdfc4a..476dd869e6 100644
--- a/store/seed/test/10180__repository.sql
+++ b/store/seed/test/10180__repository.sql
@@ -95,4 +95,4 @@ VALUES
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
0,
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
- );
\ No newline at end of file
+ );
diff --git a/store/seed/test/10190__anomaly.sql b/store/seed/test/10190__anomaly.sql
index ce66228472..d224130b87 100644
--- a/store/seed/test/10190__anomaly.sql
+++ b/store/seed/test/10190__anomaly.sql
@@ -111,4 +111,3 @@ VALUES
'bb.anomaly.instance.connection',
'{"detail":"failed to connect database at mysql.staging.example.com:3306 with user \"admin\": dial tcp: lookup mysql.staging.example.com: no such host"}'
);
-
diff --git a/store/stage.go b/store/stage.go
index f310c066a7..60f7105864 100644
--- a/store/stage.go
+++ b/store/stage.go
@@ -136,7 +136,7 @@ func (s *StageService) findStageList(ctx context.Context, tx *Tx, find *api.Stag
}
rows, err := tx.QueryContext(ctx, `
- SELECT
+ SELECT
id,
creator_id,
created_ts,
diff --git a/store/table.go b/store/table.go
index 006e8698ce..612cf6742d 100644
--- a/store/table.go
+++ b/store/table.go
@@ -189,7 +189,7 @@ func (s *TableService) findTableList(ctx context.Context, tx *Tx, find *api.Tabl
}
rows, err := tx.QueryContext(ctx, `
- SELECT
+ SELECT
id,
creator_id,
created_ts,
diff --git a/store/task.go b/store/task.go
index cb11b4fd3a..863fb409d2 100644
--- a/store/task.go
+++ b/store/task.go
@@ -135,9 +135,9 @@ func (s *TaskService) createTask(ctx context.Context, tx *Tx, create *api.TaskCr
stage_id,
instance_id,
name,
- `+"`status`,"+`
+ `+"`status`,"+`
`+"`type`,"+`
- payload
+ payload
)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
RETURNING id, creator_id, created_ts, updater_id, updated_ts, pipeline_id, stage_id, instance_id, database_id, name, `+"`status`, `type`, payload"+`
@@ -162,9 +162,9 @@ func (s *TaskService) createTask(ctx context.Context, tx *Tx, create *api.TaskCr
instance_id,
database_id,
name,
- `+"`status`,"+`
+ `+"`status`,"+`
`+"`type`,"+`
- payload
+ payload
)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
RETURNING id, creator_id, created_ts, updater_id, updated_ts, pipeline_id, stage_id, instance_id, database_id, name, `+"`status`, `type`, payload"+`
@@ -252,7 +252,7 @@ func (s *TaskService) findTaskList(ctx context.Context, tx *Tx, find *api.TaskFi
}
rows, err := tx.QueryContext(ctx, `
- SELECT
+ SELECT
id,
creator_id,
created_ts,
diff --git a/store/test_schema/clickhouse/1_todo.sql b/store/test_schema/clickhouse/1_todo.sql
index 7a2345e707..dd2a521c74 100644
--- a/store/test_schema/clickhouse/1_todo.sql
+++ b/store/test_schema/clickhouse/1_todo.sql
@@ -21,4 +21,4 @@ CREATE TABLE bytebase_test_todo.todo (
INDEX index_name (name) TYPE minmax GRANULARITY 4,
INDEX index_created_ts (created_ts) TYPE minmax GRANULARITY 4
) ENGINE = MergeTree()
-ORDER BY id;
\ No newline at end of file
+ORDER BY id;
diff --git a/store/test_schema/clickhouse/2_blog.sql b/store/test_schema/clickhouse/2_blog.sql
index be805c58eb..961d01f9f7 100644
--- a/store/test_schema/clickhouse/2_blog.sql
+++ b/store/test_schema/clickhouse/2_blog.sql
@@ -46,4 +46,4 @@ FROM
bytebase_test_blog.post
ORDER BY
like_count DESC
-LIMIT 10;
\ No newline at end of file
+LIMIT 10;
diff --git a/store/test_schema/mysql/2_blog.sql b/store/test_schema/mysql/2_blog.sql
index 42721b6dbe..659a380738 100644
--- a/store/test_schema/mysql/2_blog.sql
+++ b/store/test_schema/mysql/2_blog.sql
@@ -95,4 +95,4 @@ BEGIN
updated_ts = NOW()
WHERE
id = OLD.id;
-END;
\ No newline at end of file
+END;
diff --git a/store/test_schema/pg/1_todo.sql b/store/test_schema/pg/1_todo.sql
index 04b2fac788..a7a8dc113f 100644
--- a/store/test_schema/pg/1_todo.sql
+++ b/store/test_schema/pg/1_todo.sql
@@ -28,4 +28,4 @@ CREATE INDEX bytebase_test_todo_todo_name ON public.todo(name);
CREATE INDEX bytebase_test_todo_todo_created_ts ON public.todo(created_ts);
COMMENT ON INDEX bytebase_test_todo_todo_name is 'index on todo.name';
-COMMENT ON INDEX bytebase_test_todo_todo_created_ts is 'index on todo.created_ts';
\ No newline at end of file
+COMMENT ON INDEX bytebase_test_todo_todo_created_ts is 'index on todo.created_ts';
diff --git a/store/test_schema/pg/2_blog.sql b/store/test_schema/pg/2_blog.sql
index 3ebdb83a9f..5e4a6f2738 100644
--- a/store/test_schema/pg/2_blog.sql
+++ b/store/test_schema/pg/2_blog.sql
@@ -91,7 +91,7 @@ CREATE FUNCTION public.author_post_count (author_id INT)
CREATE OR REPLACE FUNCTION update_updated_ts()
RETURNS TRIGGER AS $$
BEGIN
- NEW.updated_ts = now();
+ NEW.updated_ts = now();
RETURN NEW;
END;
$$ language 'plpgsql';
@@ -112,4 +112,4 @@ END;
$$;
CREATE EVENT TRIGGER abort_drop ON sql_drop
- EXECUTE FUNCTION abort_any_command();
\ No newline at end of file
+ EXECUTE FUNCTION abort_any_command();
diff --git a/store/vcs.go b/store/vcs.go
index 0d51c4e8b5..eab7eb6f69 100644
--- a/store/vcs.go
+++ b/store/vcs.go
@@ -185,7 +185,7 @@ func findVCSList(ctx context.Context, tx *Tx, find *api.VCSFind) (_ []*api.VCS,
}
rows, err := tx.QueryContext(ctx, `
- SELECT
+ SELECT
id,
creator_id,
created_ts,