Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
refactor: don't escape column name if not keyword (#363)
spinningbot40a3ac26d7b4
diff --git a/plugin/db/clickhouse/clickhouse_migration_schema.sql b/plugin/db/clickhouse/clickhouse_migration_schema.sqlindex dd7e0f3a5d..e16276eb2a 100644--- a/plugin/db/clickhouse/clickhouse_migration_schema.sql+++ b/plugin/db/clickhouse/clickhouse_migration_schema.sql@@ -21,13 +21,13 @@ CREATE TABLE bytebase.migration_history (sequence INTEGER UNSIGNED NOT NULL,-- We call it engine because maybe we could load history from other migration tool.-- Current allowed values are UI, VCS.- `engine` TEXT NOT NULL,+ engine TEXT NOT NULL,-- Current allowed values are BASELINE, MIGRATE, BRANCH, DATA.- `type` TEXT NOT NULL,+ type TEXT NOT NULL,-- Current allowed values are PENDING, DONE, FAILED.-- MySQL runs DDL in its own transaction, so we can't record DDL and migration_history into a single transaction.-- Thus, we create a "PENDING" record before applying the DDL and update that record to "DONE" after applying the DDL.- `status` TEXT NOT NULL,+ status TEXT NOT NULL,-- Record the migration version.version TEXT NOT NULL,description TEXT NOT NULL,diff --git a/plugin/db/mysql/mysql_migration_schema.sql b/plugin/db/mysql/mysql_migration_schema.sqlindex 1f0f2ba125..46414c2b07 100644--- a/plugin/db/mysql/mysql_migration_schema.sql+++ b/plugin/db/mysql/mysql_migration_schema.sql@@ -21,13 +21,13 @@ CREATE TABLE bytebase.migration_history (sequence INTEGER UNSIGNED NOT NULL,-- We call it engine because maybe we could load history from other migration tool.-- Current allowed values are UI, VCS.- `engine` TEXT NOT NULL,+ engine TEXT NOT NULL,-- Current allowed values are BASELINE, MIGRATE, BRANCH, DATA.- `type` TEXT NOT NULL,+ type TEXT NOT NULL,-- Current allowed values are PENDING, DONE, FAILED.-- MySQL runs DDL in its own transaction, so we can't record DDL and migration_history into a single transaction.-- Thus, we create a "PENDING" record before applying the DDL and update that record to "DONE" after applying the DDL.- `status` TEXT NOT NULL,+ status TEXT NOT NULL,-- Record the migration version.version TEXT NOT NULL,description TEXT NOT NULL,@@ -45,8 +45,8 @@ CREATE TABLE bytebase.migration_history (CREATE UNIQUE INDEX bytebase_idx_unique_migration_history_namespace_sequence ON bytebase.migration_history (namespace(256), sequence);-CREATE UNIQUE INDEX bytebase_idx_unique_migration_history_namespace_engine_version ON bytebase.migration_history (namespace(256), `engine`, version(256));+CREATE UNIQUE INDEX bytebase_idx_unique_migration_history_namespace_engine_version ON bytebase.migration_history (namespace(256), engine, version(256));-CREATE INDEX bytebase_idx_migration_history_namespace_engine_type ON bytebase.migration_history(namespace(256), `engine`, `type`);+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`);diff --git a/store/activity.go b/store/activity.goindex 49fabe5016..a14e73b700 100644--- a/store/activity.go+++ b/store/activity.go@@ -132,13 +132,13 @@ func createActivity(ctx context.Context, tx *Tx, create *api.ActivityCreate) (*acreator_id,updater_id,container_id,- `+"`type`,"+`- `+"`level`,"+`+ type,+ level,comment,payload)VALUES (?, ?, ?, ?, ?, ?, ?)- RETURNING id, creator_id, created_ts, updater_id, updated_ts, container_id, `+"`type`, level, comment, payload"+`+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, container_id, type, level, comment, payload`,create.CreatorID,create.CreatorID,@@ -186,15 +186,15 @@ func findActivityList(ctx context.Context, tx *Tx, find *api.ActivityFind) (_ []var query = `SELECT- id,- creator_id,- created_ts,- updater_id,- updated_ts,+ id,+ creator_id,+ created_ts,+ updater_id,+ updated_ts,container_id,- ` + "`type`," + `- ` + "`level`," + `- comment,+ type,+ level,+ comment,payloadFROM activityWHERE ` + strings.Join(where, " AND ")@@ -253,7 +253,7 @@ func patchActivity(ctx context.Context, tx *Tx, patch *api.ActivityPatch) (*api.UPDATE activitySET `+strings.Join(set, ", ")+`WHERE id = ?- RETURNING id, creator_id, created_ts, updater_id, updated_ts, container_id, `+"`type`, level, comment, payload"+`+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, container_id, type, level, comment, payload`,args...,)diff --git a/store/anomaly.go b/store/anomaly.goindex fdf64fc483..be4416d8c3 100644--- a/store/anomaly.go+++ b/store/anomaly.go@@ -121,11 +121,11 @@ func createAnomaly(ctx context.Context, tx *Tx, upsert *api.AnomalyUpsert) (*apiupdater_id,instance_id,database_id,- `+"`type`,"+`+ type,payload)VALUES (?, ?, ?, ?, ?, ?)- RETURNING id, creator_id, created_ts, updater_id, updated_ts, instance_id, database_id, `+"`type`"+`, payload+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, instance_id, database_id, type, payload`,upsert.CreatorID,upsert.CreatorID,@@ -183,7 +183,7 @@ func findAnomalyList(ctx context.Context, tx *Tx, find *api.AnomalyFind) (_ []*awhere, args = append(where, "row_status = ?"), append(args, *v)}if v := find.Type; v != nil {- where, args = append(where, "`type` = ?"), append(args, *v)+ where, args = append(where, "type = ?"), append(args, *v)}rows, err := tx.QueryContext(ctx, `@@ -195,7 +195,7 @@ func findAnomalyList(ctx context.Context, tx *Tx, find *api.AnomalyFind) (_ []*aupdated_ts,instance_id,database_id,- `+"`type`,"+`+ type,payloadFROM anomalyWHERE `+strings.Join(where, " AND ")+`@@ -262,7 +262,7 @@ func patchAnomaly(ctx context.Context, tx *Tx, patch *anomalyPatch) (*api.AnomalUPDATE anomalySET `+strings.Join(set, ", ")+`WHERE id = ?- RETURNING id, creator_id, created_ts, updater_id, updated_ts, instance_id, database_id, `+"`type`"+`, payload+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, instance_id, database_id, type, payload`,args...,)diff --git a/store/backup.go b/store/backup.goindex 16da5bbfb3..09fb662f95 100644--- a/store/backup.go+++ b/store/backup.go@@ -115,14 +115,14 @@ func (s *BackupService) createBackup(ctx context.Context, tx *Tx, create *api.Baupdater_id,database_id,name,- `+"`status`,"+`- `+"`type`,"+`+ status,+ type,storage_backend,migration_history_version,path)VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)- RETURNING id, creator_id, created_ts, updater_id, updated_ts, database_id, name, `+"`status`,"+` `+"`type`, storage_backend, migration_history_version, path, comment"+`+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, database_id, name, status, type, storage_backend, migration_history_version, path, comment`,create.CreatorID,create.CreatorID,@@ -176,7 +176,7 @@ func (s *BackupService) findBackupList(ctx context.Context, tx *Tx, find *api.Bawhere, args = append(where, "name = ?"), append(args, *v)}if v := find.Status; v != nil {- where, args = append(where, "`status` = ?"), append(args, *v)+ where, args = append(where, "status = ?"), append(args, *v)}rows, err := tx.QueryContext(ctx, `@@ -188,8 +188,8 @@ func (s *BackupService) findBackupList(ctx context.Context, tx *Tx, find *api.Baupdated_ts,database_id,name,- `+"`status`,"+`- `+"`type`,"+`+ status,+ type,storage_backend,migration_history_version,path,@@ -248,7 +248,7 @@ func (s *BackupService) patchBackup(ctx context.Context, tx *Tx, patch *api.BackUPDATE backupSET `+strings.Join(set, ", ")+`WHERE id = ?- RETURNING id, creator_id, created_ts, updater_id, updated_ts, database_id, name, `+"`status`,"+` `+"`type`, storage_backend, migration_history_version, path, comment"+`+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, database_id, name, status, type, storage_backend, migration_history_version, path, comment`,args...,)@@ -412,7 +412,7 @@ func (s *BackupService) UpsertBackupSettingTx(ctx context.Context, tx *sql.Tx, ucreator_id,updater_id,database_id,- `+"`enabled`,"+`+ enabled,hour,day_of_week,hook_url@@ -423,7 +423,7 @@ func (s *BackupService) UpsertBackupSettingTx(ctx context.Context, tx *sql.Tx, uhour = excluded.hour,day_of_week = excluded.day_of_week,hook_url = excluded.hook_url- RETURNING id, creator_id, created_ts, updater_id, updated_ts, database_id, `+"`enabled`,"+` `+"hour, day_of_week"+`, hook_url+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, database_id, enabled, hour, day_of_week , hook_url`,upsert.UpdaterID,upsert.UpdaterID,diff --git a/store/column.go b/store/column.goindex ed484a9f01..b198c21e7a 100644--- a/store/column.go+++ b/store/column.go@@ -125,14 +125,14 @@ func (s *ColumnService) createColumn(ctx context.Context, tx *Tx, create *api.Coname,position,`+"`default`,"+`- `+"`nullable`,"+`- `+"`type`,"+`+ nullable,+ type,character_set,collation,comment)- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`+- "RETURNING id, creator_id, created_ts, updater_id, updated_ts, database_id, table_id, name, position, `default`, `nullable`, `type`, character_set, `collation`, comment"+`+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, database_id, table_id, name, position, `+"`default`, "+`nullable, type, character_set, collation, comment`,create.CreatorID,create.CreatorID,@@ -210,8 +210,8 @@ func (s *ColumnService) findColumnList(ctx context.Context, tx *Tx, find *api.Coname,position,`+"`default`,"+`- `+"`nullable`,"+`- `+"`type`,"+`+ nullable,+ type,character_set,collation,comment@@ -275,7 +275,7 @@ func (s *ColumnService) patchColumn(ctx context.Context, tx *Tx, patch *api.ColuUPDATE colSET `+strings.Join(set, ", ")+`WHERE id = ?`+- "RETURNING id, creator_id, created_ts, updater_id, updated_ts, database_id, table_id, name, position, `default`, `nullable`, `type`, character_set, `collation`, comment"+`+ "RETURNING id, creator_id, created_ts, updater_id, updated_ts, database_id, table_id, name, position, `default`, nullable, type, character_set, collation, comment"+``,args...,)diff --git a/store/data_source.go b/store/data_source.goindex d62cb25f63..b813a09ce4 100644--- a/store/data_source.go+++ b/store/data_source.go@@ -173,7 +173,7 @@ func (s *DataSourceService) findDataSourceList(ctx context.Context, tx *Tx, findwhere, args = append(where, "`database_id` = ?"), append(args, *v)}if v := find.Type; v != nil {- where, args = append(where, "`type` = ?"), append(args, api.DataSourceType(*v))+ where, args = append(where, "type = ?"), append(args, api.DataSourceType(*v))}rows, err := tx.QueryContext(ctx, `diff --git a/store/inbox.go b/store/inbox.goindex a3d5b40a2a..61415faff9 100644--- a/store/inbox.go+++ b/store/inbox.go@@ -165,10 +165,10 @@ func (s *InboxService) createInbox(ctx context.Context, tx *Tx, create *api.InboINSERT INTO inbox (receiver_id,activity_id,- `+"`status`"+`+ status)VALUES (?, ?, 'UNREAD')- RETURNING id, receiver_id, activity_id, `+"`status`"+`+ RETURNING id, receiver_id, activity_id, status`,create.ReceiverID,create.ActivityID,@@ -218,18 +218,18 @@ func findInboxList(ctx context.Context, tx *Tx, find *api.InboxFind) (_ []*api.Irows, err := tx.QueryContext(ctx, `SELECT- inbox.id,- receiver_id,- `+"`status`,"+`+ inbox.id,+ receiver_id,+ status,activity.id,activity.creator_id,- activity.created_ts,- activity.updater_id,- activity.updated_ts,+ activity.created_ts,+ activity.updater_id,+ activity.updated_ts,activity.container_id,- activity.type,+ activity.type,activity.level,- activity.comment,+ activity.comment,activity.payloadFROM inbox, activityWHERE `+strings.Join(where, " AND ")+`@@ -276,7 +276,7 @@ func findInboxList(ctx context.Context, tx *Tx, find *api.InboxFind) (_ []*api.I// patchInbox updates a inbox by ID. Returns the new state of the inbox after update.func (s *InboxService) patchInbox(ctx context.Context, tx *Tx, patch *api.InboxPatch) (*api.Inbox, error) {// Build UPDATE clause.- set, args := []string{"`status` = ?"}, []interface{}{patch.Status}+ set, args := []string{"status = ?"}, []interface{}{patch.Status}args = append(args, patch.ID)// Execute update query with RETURNING.@@ -284,7 +284,7 @@ func (s *InboxService) patchInbox(ctx context.Context, tx *Tx, patch *api.InboxPUPDATE inboxSET `+strings.Join(set, ", ")+`WHERE id = ?- RETURNING id, receiver_id, activity_id, `+"`status`"+`+ RETURNING id, receiver_id, activity_id, `+"status"+``,args...,)diff --git a/store/issue.go b/store/issue.goindex 799299d51f..0a21a8aa03 100644--- a/store/issue.go+++ b/store/issue.go@@ -135,14 +135,14 @@ func (s *IssueService) createIssue(ctx context.Context, tx *Tx, create *api.Issuproject_id,pipeline_id,name,- `+"`status`,"+`- `+"`type`,"+`+ status,+ type,description,assignee_id,payload)VALUES (?, ?, ?, ?, ?, 'OPEN', ?, ?, ?, ?)- RETURNING id, creator_id, created_ts, updater_id, updated_ts, project_id, pipeline_id, name, `+"`status`, `type`, description, assignee_id, payload"+`+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, project_id, pipeline_id, name, status, type, description, assignee_id, payload`,create.CreatorID,create.CreatorID,@@ -207,7 +207,7 @@ func (s *IssueService) findIssueList(ctx context.Context, tx *Tx, find *api.Issulist = append(list, "?")args = append(args, status)}- where = append(where, fmt.Sprintf("`status` in (%s)", strings.Join(list, ",")))+ where = append(where, fmt.Sprintf("status in (%s)", strings.Join(list, ",")))}var query = `@@ -220,8 +220,8 @@ func (s *IssueService) findIssueList(ctx context.Context, tx *Tx, find *api.Issuproject_id,pipeline_id,name,- ` + "`status`," + `- ` + "`type`," + `+ status,+ type,description,assignee_id,payload@@ -276,7 +276,7 @@ func (s *IssueService) patchIssue(ctx context.Context, tx *Tx, patch *api.IssuePset, args = append(set, "name = ?"), append(args, *v)}if v := patch.Status; v != nil {- set, args = append(set, "`status` = ?"), append(args, api.IssueStatus(*v))+ set, args = append(set, "status = ?"), append(args, api.IssueStatus(*v))}if v := patch.Description; v != nil {set, args = append(set, "description = ?"), append(args, *v)@@ -299,7 +299,7 @@ func (s *IssueService) patchIssue(ctx context.Context, tx *Tx, patch *api.IssuePUPDATE issueSET `+strings.Join(set, ", ")+`WHERE id = ?- RETURNING id, creator_id, created_ts, updater_id, updated_ts, project_id, pipeline_id, name, `+"`status`, `type`, description, assignee_id, payload"+`+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, project_id, pipeline_id, name, status, type, description, assignee_id, payload`,args...,)diff --git a/store/member.go b/store/member.goindex 5d6e7d2b36..965f2c5160 100644--- a/store/member.go+++ b/store/member.go@@ -143,12 +143,12 @@ func createMember(ctx context.Context, tx *Tx, create *api.MemberCreate) (*api.MINSERT INTO member (creator_id,updater_id,- `+"`status`,"+`+ status,role,principal_id)VALUES (?, ?, ?, ?, ?)- RETURNING id, row_status, creator_id, created_ts, updater_id, updated_ts, `+"`status`, role, principal_id"+`+ RETURNING id, row_status, creator_id, created_ts, updater_id, updated_ts, status, role, principal_id`,create.CreatorID,create.CreatorID,@@ -202,7 +202,7 @@ func findMemberList(ctx context.Context, tx *Tx, find *api.MemberFind) (_ []*apicreated_ts,updater_id,updated_ts,- `+"`status`,"+`+ status,role,principal_idFROM member@@ -259,7 +259,7 @@ func patchMember(ctx context.Context, tx *Tx, patch *api.MemberPatch) (*api.MembUPDATE memberSET `+strings.Join(set, ", ")+`WHERE id = ?- RETURNING id, row_status, creator_id, created_ts, updater_id, updated_ts, `+"`status`, role, principal_id"+`+ RETURNING id, row_status, creator_id, created_ts, updater_id, updated_ts, status, role, principal_id`,args...,)diff --git a/store/migration/10001__init_schema.sql b/store/migration/10001__init_schema.sqlindex a429250505..1a80633a78 100644--- a/store/migration/10001__init_schema.sql+++ b/store/migration/10001__init_schema.sql@@ -11,7 +11,7 @@ CREATE TABLE principal (created_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')),updater_id INTEGER NOT NULL REFERENCES principal (id),updated_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')),- `type` TEXT NOT NULL CHECK (`type` IN ('END_USER', 'SYSTEM_BOT')),+ type TEXT NOT NULL CHECK (type IN ('END_USER', 'SYSTEM_BOT')),auth_provider TEXT NOT NULL CHECK (auth_provider in ('BYTEBASE', 'GITLAB_SELF_HOST')),name TEXT NOT NULL,email TEXT NOT NULL UNIQUE,@@ -44,7 +44,7 @@ INSERT INTOid,creator_id,updater_id,- `type`,+ type,auth_provider,name,email,@@ -106,9 +106,9 @@ CREATE TABLE member (created_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')),updater_id INTEGER NOT NULL REFERENCES principal (id),updated_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')),- `status` TEXT NOT NULL CHECK (`status` IN ('INVITED', 'ACTIVE')),- `role` TEXT NOT NULL CHECK (- `role` IN ('OWNER', 'DBA', 'DEVELOPER')+ status TEXT NOT NULL CHECK (status IN ('INVITED', 'ACTIVE')),+ role TEXT NOT NULL CHECK (+ role IN ('OWNER', 'DBA', 'DEVELOPER')),principal_id INTEGER NOT NULL REFERENCES principal (id) UNIQUE);@@ -176,7 +176,7 @@ CREATE TABLE policy (updater_id INTEGER NOT NULL REFERENCES principal (id),updated_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')),environment_id INTEGER NOT NULL REFERENCES environment (id),- `type` TEXT NOT NULL CHECK (`type` LIKE 'bb.policy.%'),+ type TEXT NOT NULL CHECK (type LIKE 'bb.policy.%'),payload TEXT NOT NULL);@@ -213,7 +213,7 @@ CREATE TABLE project (updater_id INTEGER NOT NULL REFERENCES principal (id),updated_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')),name TEXT NOT NULL,- `key` TEXT NOT NULL UNIQUE,+ key TEXT NOT NULL UNIQUE,workflow_type TEXT NOT NULL CHECK (workflow_type IN ('UI', 'VCS')),visibility TEXT NOT NULL CHECK (visibility IN ('PUBLIC', 'PRIVATE')),tenant_mode TEXT NOT NULL DEFAULT 'DISABLED' CHECK (tenant_mode IN ('DISABLED', 'TENANT')),@@ -228,7 +228,7 @@ INSERT INTOcreator_id,updater_id,name,- `key`,+ key,workflow_type,visibility,tenant_mode,@@ -278,7 +278,7 @@ CREATE TABLE project_member (updater_id INTEGER NOT NULL REFERENCES principal (id),updated_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')),project_id INTEGER NOT NULL REFERENCES project (id),- `role` TEXT NOT NULL CHECK (`role` IN ('OWNER', 'DEVELOPER')),+ role TEXT NOT NULL CHECK (role IN ('OWNER', 'DEVELOPER')),principal_id INTEGER NOT NULL REFERENCES principal (id),UNIQUE(project_id, principal_id));@@ -352,7 +352,7 @@ CREATE TABLE instance (updated_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')),environment_id INTEGER NOT NULL REFERENCES environment (id),name TEXT NOT NULL,- `engine` TEXT NOT NULL CHECK (`engine` IN ('MYSQL', 'POSTGRES', 'TIDB', 'CLICKHOUSE', 'SNOWFLAKE', 'SQLITE')),+ engine TEXT NOT NULL CHECK (engine IN ('MYSQL', 'POSTGRES', 'TIDB', 'CLICKHOUSE', 'SNOWFLAKE', 'SQLITE')),engine_version TEXT NOT NULL DEFAULT '',host TEXT NOT NULL,port TEXT NOT NULL,@@ -431,7 +431,7 @@ CREATE TABLE db (schema_version TEXT NOT NULL,name TEXT NOT NULL,character_set TEXT NOT NULL,- `collation` TEXT NOT NULL,+ collation TEXT NOT NULL,UNIQUE(instance_id, name));@@ -468,15 +468,15 @@ CREATE TABLE tbl (updated_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')),database_id INTEGER NOT NULL REFERENCES db (id) ON DELETE CASCADE,name TEXT NOT NULL,- `type` TEXT NOT NULL,- `engine` TEXT NOT NULL,- `collation` TEXT NOT NULL,+ type TEXT NOT NULL,+ engine TEXT NOT NULL,+ collation TEXT NOT NULL,row_count BIGINT NOT NULL,data_size BIGINT NOT NULL,index_size BIGINT NOT NULL,data_free BIGINT NOT NULL,create_options TEXT NOT NULL,- `comment` TEXT NOT NULL,+ comment TEXT NOT NULL,UNIQUE(database_id, name));@@ -516,11 +516,11 @@ CREATE TABLE col (name TEXT NOT NULL,position INTEGER NOT NULL,`default` TEXT,- `nullable` INTEGER NOT NULL,- `type` TEXT NOT NULL,+ nullable INTEGER NOT NULL,+ type TEXT NOT NULL,character_set TEXT NOT NULL,- `collation` TEXT NOT NULL,- `comment` TEXT NOT NULL,+ collation TEXT NOT NULL,+ comment TEXT NOT NULL,UNIQUE(database_id, table_id, name));@@ -560,10 +560,10 @@ CREATE TABLE idx (name TEXT NOT NULL,expression TEXT NOT NULL,position INTEGER NOT NULL,- `type` TEXT NOT NULL,+ type TEXT NOT NULL,`unique` INTEGER NOT NULL,visible INTEGER NOT NULL,- `comment` TEXT NOT NULL,+ comment TEXT NOT NULL,UNIQUE(database_id, table_id, name, expression));@@ -638,9 +638,9 @@ CREATE TABLE data_source (instance_id INTEGER NOT NULL REFERENCES instance (id),database_id INTEGER NOT NULL REFERENCES db (id),name TEXT NOT NULL,- `type` TEXT NOT NULL CHECK (TYPE IN ('ADMIN', 'RW', 'RO')),+ type TEXT NOT NULL CHECK (TYPE IN ('ADMIN', 'RW', 'RO')),username TEXT NOT NULL,- `password` TEXT NOT NULL,+ password TEXT NOT NULL,ssl_key TEXT NOT NULL DEFAULT '',ssl_cert TEXT NOT NULL DEFAULT '',ssl_ca TEXT NOT NULL DEFAULT '',@@ -679,12 +679,12 @@ CREATE TABLE backup (updated_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')),database_id INTEGER NOT NULL REFERENCES db (id),name TEXT NOT NULL,- `status` TEXT NOT NULL CHECK (`status` IN ('PENDING_CREATE', 'DONE', 'FAILED')),- `type` TEXT NOT NULL CHECK (`type` IN ('MANUAL', 'AUTOMATIC')),+ status TEXT NOT NULL CHECK (status IN ('PENDING_CREATE', 'DONE', 'FAILED')),+ type TEXT NOT NULL CHECK (type IN ('MANUAL', 'AUTOMATIC')),storage_backend TEXT NOT NULL CHECK (storage_backend IN ('LOCAL')),migration_history_version TEXT NOT NULL,path TEXT NOT NULL,- `comment` TEXT NOT NULL DEFAULT '',+ comment TEXT NOT NULL DEFAULT '',UNIQUE(database_id, name));@@ -720,7 +720,7 @@ CREATE TABLE backup_setting (updater_id INTEGER NOT NULL REFERENCES principal (id),updated_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')),database_id INTEGER NOT NULL UNIQUE REFERENCES db (id),- `enabled` INTEGER NOT NULL CHECK (`enabled` IN (0, 1)),+ enabled INTEGER NOT NULL CHECK (enabled IN (0, 1)),hour INTEGER NOT NULL CHECK (0 <= hourAND hour < 24@@ -767,10 +767,10 @@ CREATE TABLE pipeline (updater_id INTEGER NOT NULL REFERENCES principal (id),updated_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')),name TEXT NOT NULL,- `status` TEXT NOT NULL CHECK (`status` IN ('OPEN', 'DONE', 'CANCELED'))+ status TEXT NOT NULL CHECK (status IN ('OPEN', 'DONE', 'CANCELED')));-CREATE INDEX idx_pipeline_status ON pipeline(`status`);+CREATE INDEX idx_pipeline_status ON pipeline(status);INSERT INTOsqlite_sequence (name, seq)@@ -841,8 +841,8 @@ CREATE TABLE task (-- Could be empty for tasks like creating databasedatabase_id INTEGER REFERENCES db (id),name TEXT NOT NULL,- `status` TEXT NOT NULL CHECK (- `status` IN (+ status TEXT NOT NULL CHECK (+ status IN ('PENDING','PENDING_APPROVAL','RUNNING',@@ -851,14 +851,14 @@ CREATE TABLE task ("CANCELED")),- `type` TEXT NOT NULL CHECK (`type` LIKE 'bb.task.%'),+ type TEXT NOT NULL CHECK (type LIKE 'bb.task.%'),payload TEXT NOT NULL DEFAULT '',- `earliest_allowed_ts` BIGINT NOT NULL DEFAULT 0+ earliest_allowed_ts BIGINT NOT NULL DEFAULT 0);CREATE INDEX idx_task_pipeline_id_stage_id ON task(pipeline_id, stage_id);-CREATE INDEX idx_task_status ON task(`status`);+CREATE INDEX idx_task_status ON task(status);CREATE INDEX idx_task_earliest_allowed_ts ON task(earliest_allowed_ts);@@ -889,15 +889,15 @@ CREATE TABLE task_run (updated_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')),task_id INTEGER NOT NULL REFERENCES task (id),name TEXT NOT NULL,- `status` TEXT NOT NULL CHECK (- `status` IN (+ status TEXT NOT NULL CHECK (+ status IN ('RUNNING','DONE','FAILED',"CANCELED")),- `type` TEXT NOT NULL CHECK (`type` LIKE 'bb.task.%'),+ type TEXT NOT NULL CHECK (type LIKE 'bb.task.%'),code INTEGER NOT NULL DEFAULT 0,comment TEXT NOT NULL DEFAULT '',-- result saves the task run result in json format@@ -933,15 +933,15 @@ CREATE TABLE task_check_run (updater_id INTEGER NOT NULL REFERENCES principal (id),updated_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')),task_id INTEGER NOT NULL REFERENCES task (id),- `status` TEXT NOT NULL CHECK (- `status` IN (+ status TEXT NOT NULL CHECK (+ status IN ('RUNNING','DONE','FAILED',"CANCELED")),- `type` TEXT NOT NULL CHECK (`type` LIKE 'bb.task-check.%'),+ type TEXT NOT NULL CHECK (type LIKE 'bb.task-check.%'),code INTEGER NOT NULL DEFAULT 0,comment TEXT NOT NULL DEFAULT '',-- result saves the task check run result in json format@@ -985,8 +985,8 @@ CREATE TABLE issue (project_id INTEGER NOT NULL REFERENCES project (id),pipeline_id INTEGER NOT NULL REFERENCES pipeline (id),name TEXT NOT NULL,- `status` TEXT NOT NULL CHECK (`status` IN ('OPEN', 'DONE', 'CANCELED')),- `type` TEXT NOT NULL CHECK (`type` LIKE 'bb.issue.%'),+ status TEXT NOT NULL CHECK (status IN ('OPEN', 'DONE', 'CANCELED')),+ type TEXT NOT NULL CHECK (type LIKE 'bb.issue.%'),description TEXT NOT NULL DEFAULT '',-- we require an assignee, if user wants to unassign herself, she can re-assign to the system account.assignee_id INTEGER NOT NULL REFERENCES principal (id),@@ -1043,9 +1043,9 @@ CREATE TABLE activity (updater_id INTEGER NOT NULL REFERENCES principal (id),updated_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')),container_id INTEGER NOT NULL CHECK (container_id != 0),- `type` TEXT NOT NULL CHECK (`type` LIKE 'bb.%'),- `level` TEXT NOT NULL CHECK (`level` IN ('INFO', 'WARN', 'ERROR')),- `comment` TEXT NOT NULL DEFAULT '',+ type TEXT NOT NULL CHECK (type LIKE 'bb.%'),+ level TEXT NOT NULL CHECK (level IN ('INFO', 'WARN', 'ERROR')),+ comment TEXT NOT NULL DEFAULT '',payload TEXT NOT NULL DEFAULT '');@@ -1080,12 +1080,12 @@ CREATE TABLE inbox (id INTEGER PRIMARY KEY AUTOINCREMENT,receiver_id INTEGER NOT NULL REFERENCES principal (id),activity_id INTEGER NOT NULL REFERENCES activity (id),- `status` TEXT NOT NULL CHECK (`status` IN ('UNREAD', 'READ'))+ status TEXT NOT NULL CHECK (status IN ('UNREAD', 'READ')));CREATE INDEX idx_inbox_receiver_id_activity_id ON inbox(receiver_id, activity_id);-CREATE INDEX idx_inbox_receiver_id_status ON inbox(receiver_id, `status`);+CREATE INDEX idx_inbox_receiver_id_status ON inbox(receiver_id, status);INSERT INTOsqlite_sequence (name, seq)@@ -1136,7 +1136,7 @@ CREATE TABLE vcs (updater_id INTEGER NOT NULL REFERENCES principal (id),updated_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')),name TEXT NOT NULL,- `type` TEXT NOT NULL CHECK (`type` IN ('GITLAB_SELF_HOST')),+ type TEXT NOT NULL CHECK (type IN ('GITLAB_SELF_HOST')),instance_url TEXT NOT NULL CHECK ((instance_url LIKE 'http://%'@@ -1257,7 +1257,7 @@ CREATE TABLE anomaly (instance_id INTEGER NOT NULL REFERENCES instance (id),-- NULL if it's an instance anomalydatabase_id INTEGER NULL REFERENCES db (id),- `type` TEXT NOT NULL CHECK (`type` LIKE 'bb.anomaly.%'),+ type TEXT NOT NULL CHECK (type LIKE 'bb.anomaly.%'),payload TEXT NOT NULL DEFAULT '');diff --git a/store/pipeline.go b/store/pipeline.goindex 0f6abf2da9..462dbda25a 100644--- a/store/pipeline.go+++ b/store/pipeline.go@@ -143,10 +143,10 @@ func (s *PipelineService) createPipeline(ctx context.Context, tx *Tx, create *apcreator_id,updater_id,name,- `+"`status`"+`+ status)VALUES (?, ?, ?, 'OPEN')- RETURNING id, creator_id, created_ts, updater_id, updated_ts, name, `+"`status`"+`+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, name, status`,create.CreatorID,create.CreatorID,@@ -182,7 +182,7 @@ func (s *PipelineService) findPipelineList(ctx context.Context, tx *Tx, find *apwhere, args = append(where, "id = ?"), append(args, *v)}if v := find.Status; v != nil {- where, args = append(where, "`status` = ?"), append(args, *v)+ where, args = append(where, "status = ?"), append(args, *v)}rows, err := tx.QueryContext(ctx, `@@ -193,7 +193,7 @@ func (s *PipelineService) findPipelineList(ctx context.Context, tx *Tx, find *apupdater_id,updated_ts,name,- `+"`status`"+`+ statusFROM pipelineWHERE `+strings.Join(where, " AND "),args...,@@ -243,7 +243,7 @@ func (s *PipelineService) patchPipeline(ctx context.Context, tx *Tx, patch *api.UPDATE pipelineSET `+strings.Join(set, ", ")+`WHERE id = ?- RETURNING id, creator_id, created_ts, updater_id, updated_ts, name, `+"`status`"+`+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, name, status`,args...,)diff --git a/store/project.go b/store/project.goindex 2ffa53e3bc..a7ac7c5b8d 100644--- a/store/project.go+++ b/store/project.go@@ -168,7 +168,7 @@ func createProject(ctx context.Context, tx *Tx, create *api.ProjectCreate) (*apidb_name_template)VALUES (?, ?, ?, ?, 'UI', 'PUBLIC', ?, ?)- RETURNING id, row_status, creator_id, created_ts, updater_id, updated_ts, name, `+"`key`, workflow_type, visibility, tenant_mode, db_name_template"+`+ RETURNING id, row_status, creator_id, created_ts, updater_id, updated_ts, name, key, workflow_type, visibility, tenant_mode, db_name_template`,create.CreatorID,create.CreatorID,@@ -282,7 +282,7 @@ func patchProject(ctx context.Context, tx *sql.Tx, patch *api.ProjectPatch) (*apset, args = append(set, "name = ?"), append(args, *v)}if v := patch.Key; v != nil {- set, args = append(set, "`key` = ?"), append(args, strings.ToUpper(*v))+ set, args = append(set, "key = ?"), append(args, strings.ToUpper(*v))}if v := patch.WorkflowType; v != nil {set, args = append(set, "`workflow_type` = ?"), append(args, *v)@@ -295,7 +295,7 @@ func patchProject(ctx context.Context, tx *sql.Tx, patch *api.ProjectPatch) (*apUPDATE projectSET `+strings.Join(set, ", ")+`WHERE id = ?- RETURNING id, row_status, creator_id, created_ts, updater_id, updated_ts, name, `+"`key`, workflow_type, visibility, tenant_mode, db_name_template"+`+ RETURNING id, row_status, creator_id, created_ts, updater_id, updated_ts, name, key, workflow_type, visibility, tenant_mode, db_name_template`,args...,)diff --git a/store/project_member.go b/store/project_member.goindex ec6d50e602..29ae698aac 100644--- a/store/project_member.go+++ b/store/project_member.go@@ -131,7 +131,7 @@ func createProjectMember(ctx context.Context, tx *Tx, create *api.ProjectMemberCcreator_id,updater_id,project_id,- `+"`role`,"+`+ role,principal_id)VALUES (?, ?, ?, ?, ?)diff --git a/store/seed/release/10001__init_seed.sql b/store/seed/release/10001__init_seed.sqlindex ddd17f2e7c..abfc8886c8 100644--- a/store/seed/release/10001__init_seed.sql+++ b/store/seed/release/10001__init_seed.sql@@ -127,7 +127,7 @@ INSERT INTOupdater_id,environment_id,name,- `engine`,+ engine,engine_version,host,port,@@ -156,7 +156,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -186,7 +186,7 @@ INSERT INTOname,TYPE,username,- `password`+ password)VALUES(@@ -209,7 +209,7 @@ INSERT INTOupdater_id,environment_id,name,- `engine`,+ engine,engine_version,host,port,@@ -238,7 +238,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -268,7 +268,7 @@ INSERT INTOname,TYPE,username,- `password`+ password)VALUES(@@ -291,7 +291,7 @@ INSERT INTOcreator_id,updater_id,name,- `status`+ status)VALUES(@@ -352,8 +352,8 @@ INSERT INTOinstance_id,database_id,name,- `type`,- `status`,+ type,+ status,payload)VALUES@@ -382,8 +382,8 @@ INSERT INTOinstance_id,database_id,name,- `type`,- `status`,+ type,+ status,payload)VALUES@@ -408,8 +408,8 @@ INSERT INTOupdater_id,task_id,name,- `status`,- `type`,+ status,+ type,comment,result,payload@@ -433,8 +433,8 @@ INSERT INTOupdater_id,task_id,name,- `status`,- `type`,+ status,+ type,comment,payload)@@ -459,8 +459,8 @@ INSERT INTOproject_id,pipeline_id,name,- `status`,- `type`,+ status,+ type,description,assignee_id)@@ -485,7 +485,7 @@ INSERT INTOcreator_id,updater_id,container_id,- `type`,+ type,level)VALUES@@ -503,9 +503,9 @@ INSERT INTOcreator_id,updater_id,container_id,- `type`,+ type,level,- `comment`+ comment)VALUES(diff --git a/store/seed/test/10001__principal.sql b/store/seed/test/10001__principal.sqlindex 7ffb58454c..9ee80c3dd3 100644--- a/store/seed/test/10001__principal.sql+++ b/store/seed/test/10001__principal.sql@@ -5,7 +5,7 @@ INSERT INTOprincipal (creator_id,updater_id,- `type`,+ type,auth_provider,name,email,@@ -28,7 +28,7 @@ INSERT INTOprincipal (creator_id,updater_id,- `type`,+ type,auth_provider,name,email,@@ -51,7 +51,7 @@ INSERT INTOprincipal (creator_id,updater_id,- `type`,+ type,auth_provider,name,email,@@ -74,7 +74,7 @@ INSERT INTOprincipal (creator_id,updater_id,- `type`,+ type,auth_provider,name,email,diff --git a/store/seed/test/10020__member.sql b/store/seed/test/10020__member.sqlindex 15f5ee8191..f1af1d697e 100644--- a/store/seed/test/10020__member.sql+++ b/store/seed/test/10020__member.sql@@ -3,7 +3,7 @@ INSERT INTOid,creator_id,updater_id,- `status`,+ status,role,principal_id)@@ -15,7 +15,7 @@ INSERT INTOid,creator_id,updater_id,- `status`,+ status,role,principal_id)@@ -27,7 +27,7 @@ INSERT INTOid,creator_id,updater_id,- `status`,+ status,role,principal_id)@@ -39,7 +39,7 @@ INSERT INTOid,creator_id,updater_id,- `status`,+ status,role,principal_id)diff --git a/store/seed/test/10030__project.sql b/store/seed/test/10030__project.sqlindex a82dd409ef..3e5e505f1f 100644--- a/store/seed/test/10030__project.sql+++ b/store/seed/test/10030__project.sql@@ -4,7 +4,7 @@ INSERT INTOcreator_id,updater_id,name,- `key`,+ key,workflow_type,visibility,tenant_mode,@@ -29,7 +29,7 @@ INSERT INTOcreator_id,updater_id,name,- `key`,+ key,workflow_type,visibility,tenant_mode,@@ -54,7 +54,7 @@ INSERT INTOcreator_id,updater_id,name,- `key`,+ key,workflow_type,visibility,tenant_mode,@@ -80,7 +80,7 @@ INSERT INTOcreator_id,updater_id,name,- `key`,+ key,workflow_type,visibility,tenant_mode,@@ -106,7 +106,7 @@ INSERT INTOcreator_id,updater_id,name,- `key`,+ key,workflow_type,visibility,tenant_mode,@@ -131,7 +131,7 @@ INSERT INTOcreator_id,updater_id,name,- `key`,+ key,workflow_type,visibility,tenant_mode,@@ -156,7 +156,7 @@ INSERT INTOcreator_id,updater_id,name,- `key`,+ key,workflow_type,visibility,tenant_mode,diff --git a/store/seed/test/10040__project_member.sql b/store/seed/test/10040__project_member.sqlindex 567b67c2ea..c950abd9b7 100644--- a/store/seed/test/10040__project_member.sql+++ b/store/seed/test/10040__project_member.sql@@ -5,7 +5,7 @@ INSERT INTOcreator_id,updater_id,project_id,- `role`,+ role,principal_id)VALUES@@ -23,7 +23,7 @@ INSERT INTOcreator_id,updater_id,project_id,- `role`,+ role,principal_id)VALUES@@ -40,7 +40,7 @@ INSERT INTOcreator_id,updater_id,project_id,- `role`,+ role,principal_id)VALUES@@ -58,7 +58,7 @@ INSERT INTOcreator_id,updater_id,project_id,- `role`,+ role,principal_id)VALUES@@ -75,7 +75,7 @@ INSERT INTOcreator_id,updater_id,project_id,- `role`,+ role,principal_id)VALUES@@ -93,7 +93,7 @@ INSERT INTOcreator_id,updater_id,project_id,- `role`,+ role,principal_id)VALUES@@ -110,7 +110,7 @@ INSERT INTOcreator_id,updater_id,project_id,- `role`,+ role,principal_id)VALUES@@ -128,7 +128,7 @@ INSERT INTOcreator_id,updater_id,project_id,- `role`,+ role,principal_id)VALUES@@ -145,7 +145,7 @@ INSERT INTOcreator_id,updater_id,project_id,- `role`,+ role,principal_id)VALUES@@ -162,7 +162,7 @@ INSERT INTOcreator_id,updater_id,project_id,- `role`,+ role,principal_id)VALUES@@ -180,7 +180,7 @@ INSERT INTOcreator_id,updater_id,project_id,- `role`,+ role,principal_id)VALUES@@ -197,7 +197,7 @@ INSERT INTOcreator_id,updater_id,project_id,- `role`,+ role,principal_id)VALUES@@ -215,7 +215,7 @@ INSERT INTOcreator_id,updater_id,project_id,- `role`,+ role,principal_id)VALUES@@ -232,7 +232,7 @@ INSERT INTOcreator_id,updater_id,project_id,- `role`,+ role,principal_id)VALUES@@ -249,7 +249,7 @@ INSERT INTOcreator_id,updater_id,project_id,- `role`,+ role,principal_id)VALUESdiff --git a/store/seed/test/10060__instance.sql b/store/seed/test/10060__instance.sqlindex e579f5638c..09df46140a 100644--- a/store/seed/test/10060__instance.sql+++ b/store/seed/test/10060__instance.sql@@ -5,7 +5,7 @@ INSERT INTOupdater_id,environment_id,name,- `engine`,+ engine,engine_version,host,port,@@ -32,7 +32,7 @@ INSERT INTOupdater_id,environment_id,name,- `engine`,+ engine,engine_version,host,port,@@ -59,7 +59,7 @@ INSERT INTOupdater_id,environment_id,name,- `engine`,+ engine,engine_version,host,port,@@ -86,7 +86,7 @@ INSERT INTOupdater_id,environment_id,name,- `engine`,+ engine,engine_version,host,port,@@ -113,7 +113,7 @@ INSERT INTOupdater_id,environment_id,name,- `engine`,+ engine,engine_version,host,port,@@ -140,7 +140,7 @@ INSERT INTOupdater_id,environment_id,name,- `engine`,+ engine,engine_version,host,port,@@ -167,7 +167,7 @@ INSERT INTOupdater_id,environment_id,name,- `engine`,+ engine,engine_version,host,port,@@ -194,7 +194,7 @@ INSERT INTOupdater_id,environment_id,name,- `engine`,+ engine,engine_version,host,port,@@ -222,7 +222,7 @@ INSERT INTOupdater_id,environment_id,name,- `engine`,+ engine,engine_version,host,port,diff --git a/store/seed/test/10070__db.sql b/store/seed/test/10070__db.sqlindex a29b28ba33..a62e07a897 100644--- a/store/seed/test/10070__db.sql+++ b/store/seed/test/10070__db.sql@@ -8,7 +8,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -37,7 +37,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -66,7 +66,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -95,7 +95,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -125,7 +125,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -154,7 +154,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -183,7 +183,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -212,7 +212,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -242,7 +242,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -271,7 +271,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -300,7 +300,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -329,7 +329,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -359,7 +359,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -388,7 +388,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -417,7 +417,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -446,7 +446,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -476,7 +476,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -506,7 +506,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -536,7 +536,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -566,7 +566,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -596,7 +596,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -624,7 +624,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -652,7 +652,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -680,7 +680,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_version@@ -710,7 +710,7 @@ INSERT INTOproject_id,name,character_set,- `collation`,+ collation,sync_status,last_successful_sync_ts,schema_versiondiff --git a/store/seed/test/10071__tbl.sql b/store/seed/test/10071__tbl.sqlindex 75894c9d5e..2f6c15a8bd 100644--- a/store/seed/test/10071__tbl.sql+++ b/store/seed/test/10071__tbl.sql@@ -6,15 +6,15 @@ INSERT INTOupdater_id,database_id,name,- `type`,+ type,ENGINE,- `collation`,+ collation,row_count,data_size,index_size,data_free,create_options,- `comment`+ comment)VALUES(@@ -41,15 +41,15 @@ INSERT INTOupdater_id,database_id,name,- `type`,+ type,ENGINE,- `collation`,+ collation,row_count,data_size,index_size,data_free,create_options,- `comment`+ comment)VALUES(@@ -75,15 +75,15 @@ INSERT INTOupdater_id,database_id,name,- `type`,+ type,ENGINE,- `collation`,+ collation,row_count,data_size,index_size,data_free,create_options,- `comment`+ comment)VALUES(@@ -109,15 +109,15 @@ INSERT INTOupdater_id,database_id,name,- `type`,+ type,ENGINE,- `collation`,+ collation,row_count,data_size,index_size,data_free,create_options,- `comment`+ comment)VALUES(@@ -143,15 +143,15 @@ INSERT INTOupdater_id,database_id,name,- `type`,+ type,ENGINE,- `collation`,+ collation,row_count,data_size,index_size,data_free,create_options,- `comment`+ comment)VALUES(@@ -177,15 +177,15 @@ INSERT INTOupdater_id,database_id,name,- `type`,+ type,ENGINE,- `collation`,+ collation,row_count,data_size,index_size,data_free,create_options,- `comment`+ comment)VALUES(@@ -211,15 +211,15 @@ INSERT INTOupdater_id,database_id,name,- `type`,+ type,ENGINE,- `collation`,+ collation,row_count,data_size,index_size,data_free,create_options,- `comment`+ comment)VALUES(@@ -244,15 +244,15 @@ INSERT INTOupdater_id,database_id,name,- `type`,+ type,ENGINE,- `collation`,+ collation,row_count,data_size,index_size,data_free,create_options,- `comment`+ comment)VALUES(@@ -277,15 +277,15 @@ INSERT INTOupdater_id,database_id,name,- `type`,+ type,ENGINE,- `collation`,+ collation,row_count,data_size,index_size,data_free,create_options,- `comment`+ comment)VALUES(@@ -311,15 +311,15 @@ INSERT INTOupdater_id,database_id,name,- `type`,+ type,ENGINE,- `collation`,+ collation,row_count,data_size,index_size,data_free,create_options,- `comment`+ comment)VALUES(@@ -344,15 +344,15 @@ INSERT INTOupdater_id,database_id,name,- `type`,+ type,ENGINE,- `collation`,+ collation,row_count,data_size,index_size,data_free,create_options,- `comment`+ comment)VALUES(@@ -377,15 +377,15 @@ INSERT INTOupdater_id,database_id,name,- `type`,+ type,ENGINE,- `collation`,+ collation,row_count,data_size,index_size,data_free,create_options,- `comment`+ comment)VALUES(@@ -411,15 +411,15 @@ INSERT INTOupdater_id,database_id,name,- `type`,+ type,ENGINE,- `collation`,+ collation,row_count,data_size,index_size,data_free,create_options,- `comment`+ comment)VALUES(@@ -444,15 +444,15 @@ INSERT INTOupdater_id,database_id,name,- `type`,+ type,ENGINE,- `collation`,+ collation,row_count,data_size,index_size,data_free,create_options,- `comment`+ comment)VALUES(@@ -477,15 +477,15 @@ INSERT INTOupdater_id,database_id,name,- `type`,+ type,ENGINE,- `collation`,+ collation,row_count,data_size,index_size,data_free,create_options,- `comment`+ comment)VALUES(@@ -511,15 +511,15 @@ INSERT INTOupdater_id,database_id,name,- `type`,+ type,ENGINE,- `collation`,+ collation,row_count,data_size,index_size,data_free,create_options,- `comment`+ comment)VALUES(@@ -544,15 +544,15 @@ INSERT INTOupdater_id,database_id,name,- `type`,+ type,ENGINE,- `collation`,+ collation,row_count,data_size,index_size,data_free,create_options,- `comment`+ comment)VALUES(@@ -577,15 +577,15 @@ INSERT INTOupdater_id,database_id,name,- `type`,+ type,ENGINE,- `collation`,+ collation,row_count,data_size,index_size,data_free,create_options,- `comment`+ comment)VALUES(diff --git a/store/seed/test/10072__col.sql b/store/seed/test/10072__col.sqlindex b5026437a8..393d28138a 100644--- a/store/seed/test/10072__col.sql+++ b/store/seed/test/10072__col.sql@@ -9,11 +9,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -42,11 +42,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -74,11 +74,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -106,11 +106,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -138,11 +138,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -169,11 +169,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -200,11 +200,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -232,11 +232,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -263,11 +263,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -294,11 +294,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -326,11 +326,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -357,11 +357,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -388,11 +388,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -420,11 +420,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -451,11 +451,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -482,11 +482,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -513,11 +513,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -545,11 +545,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -576,11 +576,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -607,11 +607,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -638,11 +638,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -670,11 +670,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -701,11 +701,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -732,11 +732,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -764,11 +764,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -795,11 +795,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -826,11 +826,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -857,11 +857,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -889,11 +889,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -920,11 +920,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -951,11 +951,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -982,11 +982,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -1014,11 +1014,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -1045,11 +1045,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -1076,11 +1076,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -1108,11 +1108,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -1139,11 +1139,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -1170,11 +1170,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -1201,11 +1201,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -1233,11 +1233,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -1264,11 +1264,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -1295,11 +1295,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -1326,11 +1326,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -1358,11 +1358,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -1389,11 +1389,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -1420,11 +1420,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -1452,11 +1452,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -1483,11 +1483,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -1514,11 +1514,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -1545,11 +1545,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -1577,11 +1577,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -1608,11 +1608,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -1639,11 +1639,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(@@ -1670,11 +1670,11 @@ INSERT INTOname,position,`default`,- `nullable`,- `type`,+ nullable,+ type,character_set,- `collation`,- `comment`+ collation,+ comment)VALUES(diff --git a/store/seed/test/10073__idx.sql b/store/seed/test/10073__idx.sqlindex 756aa8c664..dfe3f3344c 100644--- a/store/seed/test/10073__idx.sql+++ b/store/seed/test/10073__idx.sql@@ -9,10 +9,10 @@ INSERT INTOname,expression,position,- `type`,+ type,`unique`,visible,- `comment`+ comment)VALUES(@@ -40,10 +40,10 @@ INSERT INTOname,expression,position,- `type`,+ type,`unique`,visible,- `comment`+ comment)VALUES(@@ -70,10 +70,10 @@ INSERT INTOname,expression,position,- `type`,+ type,`unique`,visible,- `comment`+ comment)VALUES(@@ -100,10 +100,10 @@ INSERT INTOname,expression,position,- `type`,+ type,`unique`,visible,- `comment`+ comment)VALUES(@@ -130,10 +130,10 @@ INSERT INTOname,expression,position,- `type`,+ type,`unique`,visible,- `comment`+ comment)VALUES(@@ -160,10 +160,10 @@ INSERT INTOname,expression,position,- `type`,+ type,`unique`,visible,- `comment`+ comment)VALUES(@@ -190,10 +190,10 @@ INSERT INTOname,expression,position,- `type`,+ type,`unique`,visible,- `comment`+ comment)VALUES(@@ -220,10 +220,10 @@ INSERT INTOname,expression,position,- `type`,+ type,`unique`,visible,- `comment`+ comment)VALUES(@@ -250,10 +250,10 @@ INSERT INTOname,expression,position,- `type`,+ type,`unique`,visible,- `comment`+ comment)VALUES(@@ -280,10 +280,10 @@ INSERT INTOname,expression,position,- `type`,+ type,`unique`,visible,- `comment`+ comment)VALUES(@@ -310,10 +310,10 @@ INSERT INTOname,expression,position,- `type`,+ type,`unique`,visible,- `comment`+ comment)VALUES(@@ -340,10 +340,10 @@ INSERT INTOname,expression,position,- `type`,+ type,`unique`,visible,- `comment`+ comment)VALUES(@@ -370,10 +370,10 @@ INSERT INTOname,expression,position,- `type`,+ type,`unique`,visible,- `comment`+ comment)VALUES(@@ -400,10 +400,10 @@ INSERT INTOname,expression,position,- `type`,+ type,`unique`,visible,- `comment`+ comment)VALUES(@@ -430,10 +430,10 @@ INSERT INTOname,expression,position,- `type`,+ type,`unique`,visible,- `comment`+ comment)VALUES(@@ -460,10 +460,10 @@ INSERT INTOname,expression,position,- `type`,+ type,`unique`,visible,- `comment`+ comment)VALUES(@@ -490,10 +490,10 @@ INSERT INTOname,expression,position,- `type`,+ type,`unique`,visible,- `comment`+ comment)VALUES(@@ -520,10 +520,10 @@ INSERT INTOname,expression,position,- `type`,+ type,`unique`,visible,- `comment`+ comment)VALUES(diff --git a/store/seed/test/10074__backup.sql b/store/seed/test/10074__backup.sqlindex ce806e4d32..b0631239db 100644--- a/store/seed/test/10074__backup.sql+++ b/store/seed/test/10074__backup.sql@@ -8,12 +8,12 @@ INSERT INTOupdated_ts,database_id,name,- `status`,- `type`,+ status,+ type,storage_backend,migration_history_version,path,- `comment`+ comment)VALUES(@@ -40,12 +40,12 @@ INSERT INTOupdated_ts,database_id,name,- `status`,- `type`,+ status,+ type,storage_backend,migration_history_version,path,- `comment`+ comment)VALUES(@@ -71,12 +71,12 @@ INSERT INTOupdated_ts,database_id,name,- `status`,- `type`,+ status,+ type,storage_backend,migration_history_version,path,- `comment`+ comment)VALUES(@@ -102,12 +102,12 @@ INSERT INTOupdated_ts,database_id,name,- `status`,- `type`,+ status,+ type,storage_backend,migration_history_version,path,- `comment`+ comment)VALUES(@@ -134,12 +134,12 @@ INSERT INTOupdated_ts,database_id,name,- `status`,- `type`,+ status,+ type,storage_backend,migration_history_version,path,- `comment`+ comment)VALUES(@@ -165,12 +165,12 @@ INSERT INTOupdated_ts,database_id,name,- `status`,- `type`,+ status,+ type,storage_backend,migration_history_version,path,- `comment`+ comment)VALUES(@@ -196,12 +196,12 @@ INSERT INTOupdated_ts,database_id,name,- `status`,- `type`,+ status,+ type,storage_backend,migration_history_version,path,- `comment`+ comment)VALUES(@@ -227,12 +227,12 @@ INSERT INTOupdated_ts,database_id,name,- `status`,- `type`,+ status,+ type,storage_backend,migration_history_version,path,- `comment`+ comment)VALUES(diff --git a/store/seed/test/10090__pipeline.sql b/store/seed/test/10090__pipeline.sqlindex 82d16ff1e6..abe14a2255 100644--- a/store/seed/test/10090__pipeline.sql+++ b/store/seed/test/10090__pipeline.sql@@ -5,7 +5,7 @@ INSERT INTOcreator_id,updater_id,name,- `status`+ status)VALUES(@@ -25,7 +25,7 @@ INSERT INTOupdater_id,updated_ts,name,- `status`+ status)VALUES(@@ -45,7 +45,7 @@ INSERT INTOcreator_id,updater_id,name,- `status`+ status)VALUES(@@ -65,7 +65,7 @@ INSERT INTOupdater_id,updated_ts,name,- `status`+ status)VALUES(@@ -87,7 +87,7 @@ INSERT INTOupdater_id,updated_ts,name,- `status`+ status)VALUES(@@ -109,7 +109,7 @@ INSERT INTOupdater_id,updated_ts,name,- `status`+ status)VALUES(@@ -131,7 +131,7 @@ INSERT INTOupdater_id,updated_ts,name,- `status`+ status)VALUES(@@ -153,7 +153,7 @@ INSERT INTOupdater_id,updated_ts,name,- `status`+ status)VALUES(@@ -175,7 +175,7 @@ INSERT INTOupdater_id,updated_ts,name,- `status`+ status)VALUES(diff --git a/store/seed/test/10110__task.sql b/store/seed/test/10110__task.sqlindex be6cedb73c..a203ac1abd 100644--- a/store/seed/test/10110__task.sql+++ b/store/seed/test/10110__task.sql@@ -9,8 +9,8 @@ INSERT INTOinstance_id,database_id,name,- `type`,- `status`,+ type,+ status,payload)VALUES@@ -42,8 +42,8 @@ INSERT INTOinstance_id,database_id,name,- `type`,- `status`,+ type,+ status,payload)VALUES@@ -76,8 +76,8 @@ INSERT INTOinstance_id,database_id,name,- `type`,- `status`,+ type,+ status,payload)VALUES@@ -110,8 +110,8 @@ INSERT INTOinstance_id,database_id,name,- `type`,- `status`,+ type,+ status,payload)VALUES@@ -144,8 +144,8 @@ INSERT INTOinstance_id,database_id,name,- `type`,- `status`,+ type,+ status,payload)VALUES@@ -177,8 +177,8 @@ INSERT INTOinstance_id,database_id,name,- `type`,- `status`,+ type,+ status,payload)VALUES@@ -207,8 +207,8 @@ INSERT INTOinstance_id,database_id,name,- `type`,- `status`,+ type,+ status,payload)VALUES@@ -239,8 +239,8 @@ INSERT INTOinstance_id,database_id,name,- `type`,- `status`,+ type,+ status,payload)VALUES@@ -273,8 +273,8 @@ INSERT INTOinstance_id,database_id,name,- `type`,- `status`,+ type,+ status,payload)VALUES@@ -307,8 +307,8 @@ INSERT INTOinstance_id,database_id,name,- `type`,- `status`,+ type,+ status,payload)VALUES@@ -341,8 +341,8 @@ INSERT INTOinstance_id,database_id,name,- `type`,- `status`,+ type,+ status,payload)VALUES@@ -375,8 +375,8 @@ INSERT INTOinstance_id,database_id,name,- `type`,- `status`,+ type,+ status,payload)VALUES@@ -408,8 +408,8 @@ INSERT INTOinstance_id,database_id,name,- `type`,- `status`,+ type,+ status,payload)VALUES@@ -438,8 +438,8 @@ INSERT INTOinstance_id,database_id,name,- `type`,- `status`,+ type,+ status,payload)VALUES@@ -469,8 +469,8 @@ INSERT INTOinstance_id,database_id,name,- `type`,- `status`,+ type,+ status,payload)VALUES@@ -499,8 +499,8 @@ INSERT INTOinstance_id,database_id,name,- `type`,- `status`,+ type,+ status,payload)VALUESdiff --git a/store/seed/test/10120__task_run.sql b/store/seed/test/10120__task_run.sqlindex e898d50f39..5f08129451 100644--- a/store/seed/test/10120__task_run.sql+++ b/store/seed/test/10120__task_run.sql@@ -7,8 +7,8 @@ INSERT INTOupdated_ts,task_id,name,- `status`,- `type`,+ status,+ type,code,result,payload@@ -37,8 +37,8 @@ INSERT INTOupdated_ts,task_id,name,- `status`,- `type`,+ status,+ type,code,result,payload@@ -66,8 +66,8 @@ INSERT INTOupdater_id,task_id,name,- `status`,- `type`,+ status,+ type,code,result)@@ -93,8 +93,8 @@ INSERT INTOupdated_ts,task_id,name,- `status`,- `type`,+ status,+ type,code,result,payload@@ -123,8 +123,8 @@ INSERT INTOupdated_ts,task_id,name,- `status`,- `type`,+ status,+ type,code,result,payload@@ -153,8 +153,8 @@ INSERT INTOupdated_ts,task_id,name,- `status`,- `type`,+ status,+ type,code,result,payload@@ -183,8 +183,8 @@ INSERT INTOupdated_ts,task_id,name,- `status`,- `type`,+ status,+ type,code,result,payload@@ -213,8 +213,8 @@ INSERT INTOupdated_ts,task_id,name,- `status`,- `type`,+ status,+ type,code,result,payload@@ -243,8 +243,8 @@ INSERT INTOupdated_ts,task_id,name,- `status`,- `type`,+ status,+ type,code,result,payload@@ -273,8 +273,8 @@ INSERT INTOupdated_ts,task_id,name,- `status`,- `type`,+ status,+ type,result,payload)@@ -301,8 +301,8 @@ INSERT INTOupdated_ts,task_id,name,- `status`,- `type`,+ status,+ type,code,result,payloaddiff --git a/store/seed/test/10121__task_check_run.sql b/store/seed/test/10121__task_check_run.sqlindex 086ae1d28c..68d3cc00c8 100644--- a/store/seed/test/10121__task_check_run.sql+++ b/store/seed/test/10121__task_check_run.sql@@ -4,8 +4,8 @@ INSERT INTOcreator_id,updater_id,task_id,- `status`,- `type`,+ status,+ type,code,comment,result,@@ -29,8 +29,8 @@ INSERT INTOcreator_id,updater_id,task_id,- `status`,- `type`,+ status,+ type,code,comment,result,diff --git a/store/seed/test/10130__issue.sql b/store/seed/test/10130__issue.sqlindex d2369cf439..01fcae200a 100644--- a/store/seed/test/10130__issue.sql+++ b/store/seed/test/10130__issue.sql@@ -7,8 +7,8 @@ INSERT INTOproject_id,pipeline_id,name,- `status`,- `type`,+ status,+ type,description,assignee_id)@@ -37,8 +37,8 @@ INSERT INTOproject_id,pipeline_id,name,- `status`,- `type`,+ status,+ type,description,assignee_id)@@ -67,8 +67,8 @@ INSERT INTOproject_id,pipeline_id,name,- `status`,- `type`,+ status,+ type,description,assignee_id)@@ -97,8 +97,8 @@ INSERT INTOproject_id,pipeline_id,name,- `status`,- `type`,+ status,+ type,description,assignee_id)@@ -129,8 +129,8 @@ INSERT INTOproject_id,pipeline_id,name,- `status`,- `type`,+ status,+ type,description,assignee_id)@@ -161,8 +161,8 @@ INSERT INTOproject_id,pipeline_id,name,- `status`,- `type`,+ status,+ type,description,assignee_id)@@ -193,8 +193,8 @@ INSERT INTOproject_id,pipeline_id,name,- `status`,- `type`,+ status,+ type,description,assignee_id)@@ -225,8 +225,8 @@ INSERT INTOproject_id,pipeline_id,name,- `status`,- `type`,+ status,+ type,description,assignee_id)@@ -255,8 +255,8 @@ INSERT INTOproject_id,pipeline_id,name,- `status`,- `type`,+ status,+ type,description,assignee_id)diff --git a/store/seed/test/10140__activity.sql b/store/seed/test/10140__activity.sqlindex a9f614fb07..fd781d22cd 100644--- a/store/seed/test/10140__activity.sql+++ b/store/seed/test/10140__activity.sql@@ -5,8 +5,8 @@ INSERT INTOcreator_id,updater_id,container_id,- `type`,- `level`,+ type,+ level,payload)VALUES@@ -26,9 +26,9 @@ INSERT INTOcreator_id,updater_id,container_id,- `type`,- `level`,- `comment`,+ type,+ level,+ comment,payload)VALUES@@ -49,9 +49,9 @@ INSERT INTOcreator_id,updater_id,container_id,- `type`,- `level`,- `comment`,+ type,+ level,+ comment,payload)VALUES@@ -72,9 +72,9 @@ INSERT INTOcreator_id,updater_id,container_id,- `type`,- `level`,- `comment`,+ type,+ level,+ comment,payload)VALUES@@ -98,8 +98,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,payload)VALUES@@ -123,8 +123,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -150,8 +150,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -177,8 +177,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -204,8 +204,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -231,8 +231,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,payload)VALUES@@ -257,8 +257,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,payload)VALUES@@ -281,8 +281,8 @@ INSERT INTOcreator_id,updater_id,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -304,8 +304,8 @@ INSERT INTOcreator_id,updater_id,container_id,- `type`,- `level`,+ type,+ level,payload)VALUES@@ -327,8 +327,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -352,8 +352,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -377,8 +377,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -402,8 +402,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -428,8 +428,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -453,8 +453,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -478,8 +478,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -503,8 +503,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -529,8 +529,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -554,8 +554,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -579,8 +579,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -604,8 +604,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -630,8 +630,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -655,8 +655,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -680,8 +680,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -705,8 +705,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -731,8 +731,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -756,8 +756,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -781,8 +781,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -807,8 +807,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -832,8 +832,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -857,8 +857,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -882,8 +882,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -907,8 +907,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -932,8 +932,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -957,8 +957,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -983,8 +983,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -1009,8 +1009,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -1034,8 +1034,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -1060,8 +1060,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -1085,8 +1085,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -1110,8 +1110,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -1135,8 +1135,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -1160,8 +1160,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)@@ -1185,8 +1185,8 @@ INSERT INTOupdater_id,updated_ts,container_id,- `type`,- `level`,+ type,+ level,COMMENT,payload)diff --git a/store/seed/test/10150__inbox.sql b/store/seed/test/10150__inbox.sqlindex 79fc4ab7b6..001c873adb 100644--- a/store/seed/test/10150__inbox.sql+++ b/store/seed/test/10150__inbox.sql@@ -4,7 +4,7 @@ INSERT INTOid,receiver_id,activity_id,- `status`+ status)VALUES(@@ -18,7 +18,7 @@ INSERT INTOinbox (receiver_id,activity_id,- `status`+ status)VALUES(101, 14003, 'UNREAD');@@ -27,7 +27,7 @@ INSERT INTOinbox (receiver_id,activity_id,- `status`+ status)VALUES(101, 14004, 'UNREAD');@@ -36,7 +36,7 @@ INSERT INTOinbox (receiver_id,activity_id,- `status`+ status)VALUES(101, 14005, 'UNREAD');@@ -45,7 +45,7 @@ INSERT INTOinbox (receiver_id,activity_id,- `status`+ status)VALUES(101, 14010, 'UNREAD');@@ -54,7 +54,7 @@ INSERT INTOinbox (receiver_id,activity_id,- `status`+ status)VALUES(101, 14012, 'UNREAD');@@ -63,7 +63,7 @@ INSERT INTOinbox (receiver_id,activity_id,- `status`+ status)VALUES(101, 14013, 'UNREAD');@@ -73,7 +73,7 @@ INSERT INTOinbox (receiver_id,activity_id,- `status`+ status)VALUES(102, 14001, 'READ');@@ -82,7 +82,7 @@ INSERT INTOinbox (receiver_id,activity_id,- `status`+ status)VALUES(102, 14002, 'READ');@@ -91,7 +91,7 @@ INSERT INTOinbox (receiver_id,activity_id,- `status`+ status)VALUES(102, 14004, 'READ');@@ -100,7 +100,7 @@ INSERT INTOinbox (receiver_id,activity_id,- `status`+ status)VALUES(102, 14005, 'UNREAD');@@ -109,7 +109,7 @@ INSERT INTOinbox (receiver_id,activity_id,- `status`+ status)VALUES(102, 14006, 'UNREAD');@@ -118,7 +118,7 @@ INSERT INTOinbox (receiver_id,activity_id,- `status`+ status)VALUES(102, 14013, 'UNREAD');@@ -128,7 +128,7 @@ INSERT INTOinbox (receiver_id,activity_id,- `status`+ status)VALUES(103, 14001, 'READ');@@ -137,7 +137,7 @@ INSERT INTOinbox (receiver_id,activity_id,- `status`+ status)VALUES(103, 14002, 'READ');@@ -146,7 +146,7 @@ INSERT INTOinbox (receiver_id,activity_id,- `status`+ status)VALUES(103, 14003, 'READ');@@ -155,7 +155,7 @@ INSERT INTOinbox (receiver_id,activity_id,- `status`+ status)VALUES(103, 14005, 'READ');@@ -164,7 +164,7 @@ INSERT INTOinbox (receiver_id,activity_id,- `status`+ status)VALUES(103, 14006, 'UNREAD');@@ -173,7 +173,7 @@ INSERT INTOinbox (receiver_id,activity_id,- `status`+ status)VALUES(103, 14013, 'UNREAD');diff --git a/store/seed/test/10170__vcs.sql b/store/seed/test/10170__vcs.sqlindex c3c0f3255e..e9b9cfcd44 100644--- a/store/seed/test/10170__vcs.sql+++ b/store/seed/test/10170__vcs.sql@@ -5,7 +5,7 @@ INSERT INTOcreator_id,updater_id,name,- `type`,+ type,instance_url,api_url,application_id,diff --git a/store/seed/test/10190__anomaly.sql b/store/seed/test/10190__anomaly.sqlindex a45f8f5287..767393c1ab 100644--- a/store/seed/test/10190__anomaly.sql+++ b/store/seed/test/10190__anomaly.sql@@ -6,7 +6,7 @@ INSERT INTOupdater_id,instance_id,database_id,- `type`,+ type,payload)VALUES@@ -26,7 +26,7 @@ INSERT INTOupdater_id,instance_id,database_id,- `type`,+ type,payload)VALUES@@ -45,7 +45,7 @@ INSERT INTOupdater_id,instance_id,database_id,- `type`,+ type,payload)VALUES@@ -64,7 +64,7 @@ INSERT INTOupdater_id,instance_id,database_id,- `type`,+ type,payload)VALUES@@ -83,7 +83,7 @@ INSERT INTOcreator_id,updater_id,instance_id,- `type`,+ type,payload)VALUES@@ -100,7 +100,7 @@ INSERT INTOcreator_id,updater_id,instance_id,- `type`,+ type,payload)VALUESdiff --git a/store/table.go b/store/table.goindex 8fd16c793e..354682ff65 100644--- a/store/table.go+++ b/store/table.go@@ -114,7 +114,7 @@ func (s *TableService) createTable(ctx context.Context, tx *Tx, create *api.Tablupdated_ts,database_id,name,- `+"`type`,"+`+ type,engine,collation,row_count,@@ -125,7 +125,7 @@ func (s *TableService) createTable(ctx context.Context, tx *Tx, create *api.Tablcomment)VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)- RETURNING id, creator_id, created_ts, updater_id, updated_ts, database_id, name, `+"`type`, engine, collation, row_count, data_size, index_size, data_free, create_options, comment"+`+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, database_id, name, type, engine, collation, row_count, data_size, index_size, data_free, create_options, comment`,create.CreatorID,create.CreatedTs,@@ -197,7 +197,7 @@ func (s *TableService) findTableList(ctx context.Context, tx *Tx, find *api.Tablupdated_ts,database_id,name,- `+"`type`,"+`+ type,engine,collation,row_count,diff --git a/store/table_index.go b/store/table_index.goindex afd91c5dd8..38c9f3e6a7 100644--- a/store/table_index.go+++ b/store/table_index.go@@ -95,13 +95,13 @@ func (s *IndexService) createIndex(ctx context.Context, tx *Tx, create *api.Indename,expression,position,- `+"`type`,"+`+ type,`+"`unique`,"+`visible,comment)VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`+- "RETURNING id, creator_id, created_ts, updater_id, updated_ts, database_id, table_id, name, expression, position, `type`, `unique`, visible, comment"+`+ "RETURNING id, creator_id, created_ts, updater_id, updated_ts, database_id, table_id, name, expression, position, type, `unique`, visible, comment"+``,create.CreatorID,create.CreatorID,@@ -176,7 +176,7 @@ func (s *IndexService) findIndexList(ctx context.Context, tx *Tx, find *api.Indename,expression,position,- `+"`type`,"+`+ `+"type,"+``+"`unique`,"+`visible,commentdiff --git a/store/task.go b/store/task.goindex 3d1ee1f5ea..b2f87a7a37 100644--- a/store/task.go+++ b/store/task.go@@ -134,13 +134,13 @@ func (s *TaskService) createTask(ctx context.Context, tx *Tx, create *api.TaskCrstage_id,instance_id,name,- `+"`status`,"+`- `+"`type`,"+`+ status,+ type,payload,earliest_allowed_ts)VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)- RETURNING id, creator_id, created_ts, updater_id, updated_ts, pipeline_id, stage_id, instance_id, database_id, name, `+"`status`, `type`, payload, earliest_allowed_ts"+`+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, pipeline_id, stage_id, instance_id, database_id, name, status, type, payload, earliest_allowed_ts`,create.CreatorID,create.CreatorID,@@ -163,13 +163,13 @@ func (s *TaskService) createTask(ctx context.Context, tx *Tx, create *api.TaskCrinstance_id,database_id,name,- `+"`status`,"+`- `+"`type`,"+`+ status,+ type,payload,earliest_allowed_ts)VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)- RETURNING id, creator_id, created_ts, updater_id, updated_ts, pipeline_id, stage_id, instance_id, database_id, name, `+"`status`, `type`, payload, earliest_allowed_ts"+`+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, pipeline_id, stage_id, instance_id, database_id, name, status, type, payload, earliest_allowed_ts`,create.CreatorID,create.CreatorID,@@ -254,7 +254,7 @@ func (s *TaskService) findTaskList(ctx context.Context, tx *Tx, find *api.TaskFilist = append(list, "?")args = append(args, status)}- where = append(where, fmt.Sprintf("`status` in (%s)", strings.Join(list, ",")))+ where = append(where, fmt.Sprintf("status in (%s)", strings.Join(list, ",")))}rows, err := tx.QueryContext(ctx, `@@ -269,8 +269,8 @@ func (s *TaskService) findTaskList(ctx context.Context, tx *Tx, find *api.TaskFiinstance_id,database_id,name,- `+"`status`,"+`- `+"`type`,"+`+ status,+ type,payload,earliest_allowed_tsFROM task@@ -346,7 +346,7 @@ func (s *TaskService) patchTask(ctx context.Context, tx *Tx, patch *api.TaskPatcUPDATE taskSET `+strings.Join(set, ", ")+`WHERE id = ?- RETURNING id, creator_id, created_ts, updater_id, updated_ts, pipeline_id, stage_id, instance_id, database_id, name, `+"`status`, `type`, payload, earliest_allowed_ts"+`+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, pipeline_id, stage_id, instance_id, database_id, name, status, type, payload, earliest_allowed_ts`,args...,)@@ -454,7 +454,7 @@ func (s *TaskService) patchTaskStatus(ctx context.Context, tx *Tx, patch *api.Ta// Updates the task// Build UPDATE clause.set, args := []string{"updater_id = ?"}, []interface{}{patch.UpdaterID}- set, args = append(set, "`status` = ?"), append(args, patch.Status)+ set, args = append(set, "status = ?"), append(args, patch.Status)args = append(args, patch.ID)// Execute update query with RETURNING.@@ -462,7 +462,7 @@ func (s *TaskService) patchTaskStatus(ctx context.Context, tx *Tx, patch *api.TaUPDATE taskSET `+strings.Join(set, ", ")+`WHERE id = ?- RETURNING id, creator_id, created_ts, updater_id, updated_ts, pipeline_id, stage_id, instance_id, database_id, name, `+"`status`, `type`, payload, earliest_allowed_ts"+`+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, pipeline_id, stage_id, instance_id, database_id, name, status, type, payload, earliest_allowed_ts`,args...,)diff --git a/store/task_check_run.go b/store/task_check_run.goindex 446be694b2..c00821e445 100644--- a/store/task_check_run.go+++ b/store/task_check_run.go@@ -96,13 +96,13 @@ func (s *TaskCheckRunService) CreateTaskCheckRunTx(ctx context.Context, tx *sql.creator_id,updater_id,task_id,- `+"`status`,"+`- `+"`type`,"+`+ status,+ type,comment,payload)VALUES (?, ?, ?, 'RUNNING', ?, ?, ?)- RETURNING id, creator_id, created_ts, updater_id, updated_ts, task_id, `+"`status`, `type`, code, comment, result, payload"+`+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, task_id, status, type, code, comment, result, payload`,create.CreatorID,create.CreatorID,@@ -205,7 +205,7 @@ func (s *TaskCheckRunService) PatchTaskCheckRunStatus(ctx context.Context, patchfunc (s *TaskCheckRunService) PatchTaskCheckRunStatusTx(ctx context.Context, tx *sql.Tx, patch *api.TaskCheckRunStatusPatch) (*api.TaskCheckRun, error) {// Build UPDATE clause.set, args := []string{"updater_id = ?"}, []interface{}{patch.UpdaterID}- set, args = append(set, "`status` = ?"), append(args, patch.Status)+ set, args = append(set, "status = ?"), append(args, patch.Status)set, args = append(set, "code = ?"), append(args, patch.Code)set, args = append(set, "result = ?"), append(args, patch.Result)@@ -219,7 +219,7 @@ func (s *TaskCheckRunService) PatchTaskCheckRunStatusTx(ctx context.Context, txUPDATE task_check_runSET `+strings.Join(set, ", ")+`WHERE `+strings.Join(where, " AND ")+`- RETURNING id, creator_id, created_ts, updater_id, updated_ts, task_id, `+"`status`, `type`, code, comment, result, payload"+`+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, task_id, status, type, code, comment, result, payload`,args...,)@@ -261,7 +261,7 @@ func (s *TaskCheckRunService) findTaskCheckRunList(ctx context.Context, tx *sql.where, args = append(where, "task_id = ?"), append(args, *v)}if v := find.Type; v != nil {- where, args = append(where, "`type` = ?"), append(args, *v)+ where, args = append(where, "type = ?"), append(args, *v)}if v := find.StatusList; v != nil {list := []string{}@@ -269,7 +269,7 @@ func (s *TaskCheckRunService) findTaskCheckRunList(ctx context.Context, tx *sql.list = append(list, "?")args = append(args, status)}- where = append(where, fmt.Sprintf("`status` in (%s)", strings.Join(list, ",")))+ where = append(where, fmt.Sprintf("status in (%s)", strings.Join(list, ",")))}orderAndLimit := ""@@ -285,8 +285,8 @@ func (s *TaskCheckRunService) findTaskCheckRunList(ctx context.Context, tx *sql.updater_id,updated_ts,task_id,- `+"`status`,"+`- `+"`type`,"+`+ status,+ type,code,comment,result,diff --git a/store/task_run.go b/store/task_run.goindex d38f430ce4..30e376dfcf 100644--- a/store/task_run.go+++ b/store/task_run.go@@ -34,12 +34,12 @@ func (s *TaskRunService) CreateTaskRunTx(ctx context.Context, tx *sql.Tx, createupdater_id,task_id,name,- `+"`status`,"+`- `+"`type`,"+`+ status,+ type,payload)VALUES (?, ?, ?, ?, 'RUNNING', ?, ?)- RETURNING id, creator_id, created_ts, updater_id, updated_ts, task_id, name, `+"`status`, `type`, code, comment, result, payload"+`+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, task_id, name, status, type, code, comment, result, payload`,create.CreatorID,create.CreatorID,@@ -106,7 +106,7 @@ func (s *TaskRunService) FindTaskRunTx(ctx context.Context, tx *sql.Tx, find *apfunc (s *TaskRunService) PatchTaskRunStatusTx(ctx context.Context, tx *sql.Tx, patch *api.TaskRunStatusPatch) (*api.TaskRun, error) {// Build UPDATE clause.set, args := []string{"updater_id = ?"}, []interface{}{patch.UpdaterID}- set, args = append(set, "`status` = ?"), append(args, patch.Status)+ set, args = append(set, "status = ?"), append(args, patch.Status)if v := patch.Code; v != nil {set, args = append(set, "code = ?"), append(args, *v)}@@ -130,7 +130,7 @@ func (s *TaskRunService) PatchTaskRunStatusTx(ctx context.Context, tx *sql.Tx, pUPDATE task_runSET `+strings.Join(set, ", ")+`WHERE `+strings.Join(where, " AND ")+`- RETURNING id, creator_id, created_ts, updater_id, updated_ts, task_id, name, `+"`status`, `type`, code, comment, result, payload"+`+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, task_id, name, status, type, code, comment, result, payload`,args...,)@@ -179,7 +179,7 @@ func (s *TaskRunService) findTaskRunList(ctx context.Context, tx *sql.Tx, find *list = append(list, "?")args = append(args, status)}- where = append(where, fmt.Sprintf("`status` in (%s)", strings.Join(list, ",")))+ where = append(where, fmt.Sprintf("status in (%s)", strings.Join(list, ",")))}rows, err := tx.QueryContext(ctx, `@@ -191,8 +191,8 @@ func (s *TaskRunService) findTaskRunList(ctx context.Context, tx *sql.Tx, find *updated_ts,task_id,name,- `+"`status`,"+`- `+"`type`,"+`+ status,+ type,code,comment,result,diff --git a/store/vcs.go b/store/vcs.goindex 78892d59ca..0968c97850 100644--- a/store/vcs.go+++ b/store/vcs.go@@ -132,14 +132,14 @@ func createVCS(ctx context.Context, tx *Tx, create *api.VCSCreate) (*api.VCS, ercreator_id,updater_id,name,- `+"`type`,"+`+ type,instance_url,api_url,application_id,secret)VALUES (?, ?, ?, ?, ?, ?, ?, ?)- RETURNING id, creator_id, created_ts, updater_id, updated_ts, name, `+"`type`, instance_url, api_url, application_id, secret"+`+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, name, type, instance_url, api_url, application_id, secret`,create.CreatorID,create.CreatorID,@@ -192,7 +192,7 @@ func findVCSList(ctx context.Context, tx *Tx, find *api.VCSFind) (_ []*api.VCS,updater_id,updated_ts,name,- `+"`type`,"+`+ type,instance_url,api_url,application_id,@@ -255,7 +255,7 @@ func patchVCS(ctx context.Context, tx *Tx, patch *api.VCSPatch) (*api.VCS, errorUPDATE vcsSET `+strings.Join(set, ", ")+`WHERE id = ?- RETURNING id, creator_id, created_ts, updater_id, updated_ts, name, `+"`type`, instance_url, api_url, application_id, secret"+`+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, name, type, instance_url, api_url, application_id, secret`,args...,)