Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: replace double underscore with double pound signs (#2935)
Danny Xu92e43ed02f51
diff --git a/docs/design/gh-ost-integration.md b/docs/design/gh-ost-integration.mdindex aa7d15d82b..e254fe09dc 100644--- a/docs/design/gh-ost-integration.md+++ b/docs/design/gh-ost-integration.md@@ -223,7 +223,7 @@ Users can set a workspace-level gh-ost configuration, which will be the default.In the UI workflow, the user can select to use gh-ost and supply statements.-In the VCS workflow, user commit `{{ENV_NAME}}/{{DB_NAME}}__{{VERSION}}__{{TYPE}}__{{DESCRIPTION}}.ghost.sql` to trigger gh-ost to execute migration. We use the suffix to tell if it is a gh-ost migration. The content is a vanilla SQL statement.+In the VCS workflow, user commit `{{ENV_NAME}}/{{DB_NAME}}##{{VERSION}}##{{TYPE}}##{{DESCRIPTION}}.ghost.sql` to trigger gh-ost to execute migration. We use the suffix to tell if it is a gh-ost migration. The content is a vanilla SQL statement.Users can change the gh-ost configuration in the related issue tab.diff --git a/docs/design/tenancy.md b/docs/design/tenancy.mdindex dd0790f4fd..2618dff65a 100644--- a/docs/design/tenancy.md+++ b/docs/design/tenancy.md@@ -215,7 +215,7 @@ Tenant mode projects should show databases in tenant view (TBD). Schema altering#### VCSSince we will still take the database name that's plugged to deployment configuration, the [file path template](https://www.bytebase.com/docs/vcs-integration/name-and-organize-schema-files#file-path-template) will not change.```-{{ENV_NAME}}/{{DB_NAME}}__{{VERSION}}__{{TYPE}}__{{DESCRIPTION}}.sql+{{ENV_NAME}}/{{DB_NAME}}##{{VERSION}}##{{TYPE}}##{{DESCRIPTION}}.sql```#### Other Workflows@@ -307,7 +307,7 @@ CREATE UNIQUE INDEX idx_deployment_config_project_id_name ON deployment_config(p```#### Tenant Mode-This will be a new ENUM field on the existing [project table](https://github.com/bytebase/bytebase/blob/main/store/migration/10001__init_schema.sql#L202).+This will be a new ENUM field on the existing [project table](https://github.com/bytebase/bytebase/blob/main/store/migration/10001##init_schema.sql#L202).### Tenancy with different database namesdiff --git a/docs/schema-update-guide.md b/docs/schema-update-guide.mdindex a4888b3e84..e70b84cf97 100644--- a/docs/schema-update-guide.md+++ b/docs/schema-update-guide.md@@ -24,7 +24,7 @@ Demo Data## Development-1. Add a DDL SQL file such as `dev/20220408000000__schema_version_type.sql`. The prefix numbers should be the date time format when the PR is sent.+1. Add a DDL SQL file such as `dev/20220408000000##schema_version_type.sql`. The prefix numbers should be the date time format when the PR is sent.2. Update `LATEST.sql` and `LATEST_DATA.sql` w.r.t. the DDL changes. (TODO: auto-generate the latest schema)3. Update Dev Demo data if needed.4. Since we use the same code for both dev and release schemas, we should add if-else branching to read storage differently based on schema version, such as [this example](https://github.com/bytebase/bytebase/pull/1039).diff --git a/frontend/src/components/RepositorySetupWizard.vue b/frontend/src/components/RepositorySetupWizard.vueindex c0112bdcee..efa1b60aaf 100644--- a/frontend/src/components/RepositorySetupWizard.vue+++ b/frontend/src/components/RepositorySetupWizard.vue@@ -73,17 +73,17 @@ import { useProjectStore, useRepositoryStore } from "@/store";// Default file path template is to organize migration files from different environments under separate directories.const DEFAULT_FILE_PATH_TEMPLATE =- "{{ENV_NAME}}/{{DB_NAME}}__{{VERSION}}__{{TYPE}}__{{DESCRIPTION}}.sql";+ "{{ENV_NAME}}/{{DB_NAME}}##{{VERSION}}##{{TYPE}}##{{DESCRIPTION}}.sql";// Default schema path template is co-locate with the corresponding db's migration files and use .(dot) to appear the first.-const DEFAULT_SCHEMA_PATH_TEMPLATE = "{{ENV_NAME}}/.{{DB_NAME}}__LATEST.sql";+const DEFAULT_SCHEMA_PATH_TEMPLATE = "{{ENV_NAME}}/.{{DB_NAME}}##LATEST.sql";// Default sheet path tempalte is to organize script files for SQL Editor.const DEFAULT_SHEET_PATH_TEMPLATE =- "script/{{ENV_NAME}}__{{DB_NAME}}__{{NAME}}.sql";+ "script/{{ENV_NAME}}##{{DB_NAME}}##{{NAME}}.sql";// For tenant mode projects, {{ENV_NAME}} is not supported.const DEFAULT_TENANT_MODE_FILE_PATH_TEMPLATE =- "{{DB_NAME}}__{{VERSION}}__{{TYPE}}__{{DESCRIPTION}}.sql";-const DEFAULT_TENANT_MODE_SCHEMA_PATH_TEMPLATE = ".{{DB_NAME}}__LATEST.sql";+ "{{DB_NAME}}##{{VERSION}}##{{TYPE}}##{{DESCRIPTION}}.sql";+const DEFAULT_TENANT_MODE_SCHEMA_PATH_TEMPLATE = ".{{DB_NAME}}##LATEST.sql";const DEFAULT_TENANT_MODE_SHEET_PATH_TEMPLATE = "script/{{NAME}}.sql";const CHOOSE_PROVIDER_STEP = 0;diff --git a/frontend/src/types/repository.ts b/frontend/src/types/repository.tsindex e90207098d..2d3c458ba9 100644--- a/frontend/src/types/repository.ts+++ b/frontend/src/types/repository.ts@@ -110,7 +110,7 @@ export function baseDirectoryWebUrl(// Once we meet a "dynamic" segment which has a pattern that cannot be replaced// we won't push it, either the segments behind it.// E.g., the filePathTemplate is- // configure/{{ENV_NAME}}/20220707-wechat/{{TYPE}}/**/**/**/{{DB_NAME}}__{{VERSION}}__{{DESCRIPTION}}.sql+ // configure/{{ENV_NAME}}/20220707-wechat/{{TYPE}}/**/**/**/{{DB_NAME}}##{{VERSION}}##{{DESCRIPTION}}.sql/**The segments are- configurediff --git a/plugin/db/driver_test.go b/plugin/db/driver_test.goindex 3083720dab..554d4e5a4a 100644--- a/plugin/db/driver_test.go+++ b/plugin/db/driver_test.go@@ -18,8 +18,8 @@ func TestParseMigrationInfo(t *testing.T) {tests := []test{{- filePath: "db1__001foo",- filePathTemplate: "{{DB_NAME}}__{{VERSION}}",+ filePath: "db1##001foo",+ filePathTemplate: "{{DB_NAME}}##{{VERSION}}",want: &MigrationInfo{Version: "001foo",Namespace: "db1",@@ -33,8 +33,8 @@ func TestParseMigrationInfo(t *testing.T) {wantErr: "",},{- filePath: "db foo_+-=_#!$.__1.2.3",- filePathTemplate: "{{DB_NAME}}__{{VERSION}}",+ filePath: "db foo_+-=_#!$.##1.2.3",+ filePathTemplate: "{{DB_NAME}}##{{VERSION}}",want: &MigrationInfo{Version: "1.2.3",Namespace: "db foo_+-=_#!$.",@@ -48,8 +48,8 @@ func TestParseMigrationInfo(t *testing.T) {wantErr: "",},{- filePath: "bytebase/db1__001foo",- filePathTemplate: "bytebase/{{DB_NAME}}__{{VERSION}}",+ filePath: "bytebase/db1##001foo",+ filePathTemplate: "bytebase/{{DB_NAME}}##{{VERSION}}",want: &MigrationInfo{Version: "001foo",Namespace: "db1",@@ -63,8 +63,8 @@ func TestParseMigrationInfo(t *testing.T) {wantErr: "",},{- filePath: "bytebase/dev/db1__001foo",- filePathTemplate: "bytebase/{{ENV_NAME}}/{{DB_NAME}}__{{VERSION}}",+ filePath: "bytebase/dev/db1##001foo",+ filePathTemplate: "bytebase/{{ENV_NAME}}/{{DB_NAME}}##{{VERSION}}",want: &MigrationInfo{Version: "001foo",Namespace: "db1",@@ -78,8 +78,8 @@ func TestParseMigrationInfo(t *testing.T) {wantErr: "",},{- filePath: "db1__001foo__create_t1",- filePathTemplate: "{{DB_NAME}}__{{VERSION}}__{{DESCRIPTION}}",+ filePath: "db1##001foo##create_t1",+ filePathTemplate: "{{DB_NAME}}##{{VERSION}}##{{DESCRIPTION}}",want: &MigrationInfo{Version: "001foo",Namespace: "db1",@@ -93,8 +93,8 @@ func TestParseMigrationInfo(t *testing.T) {wantErr: "",},{- filePath: "db1__001foo__migrate",- filePathTemplate: "{{DB_NAME}}__{{VERSION}}__{{TYPE}}",+ filePath: "db1##001foo##migrate",+ filePathTemplate: "{{DB_NAME}}##{{VERSION}}##{{TYPE}}",want: &MigrationInfo{Version: "001foo",Namespace: "db1",@@ -108,8 +108,8 @@ func TestParseMigrationInfo(t *testing.T) {wantErr: "",},{- filePath: "db1__001foo__ddl",- filePathTemplate: "{{DB_NAME}}__{{VERSION}}__{{TYPE}}",+ filePath: "db1##001foo##ddl",+ filePathTemplate: "{{DB_NAME}}##{{VERSION}}##{{TYPE}}",want: &MigrationInfo{Version: "001foo",Namespace: "db1",@@ -123,8 +123,8 @@ func TestParseMigrationInfo(t *testing.T) {wantErr: "",},{- filePath: "db1__001foo__dml",- filePathTemplate: "{{DB_NAME}}__{{VERSION}}__{{TYPE}}",+ filePath: "db1##001foo##dml",+ filePathTemplate: "{{DB_NAME}}##{{VERSION}}##{{TYPE}}",want: &MigrationInfo{Version: "001foo",Namespace: "db1",@@ -138,8 +138,8 @@ func TestParseMigrationInfo(t *testing.T) {wantErr: "",},{- filePath: "db_shop1__001foo__data",- filePathTemplate: "{{DB_NAME}}__{{VERSION}}__{{TYPE}}",+ filePath: "db_shop1##001foo##data",+ filePathTemplate: "{{DB_NAME}}##{{VERSION}}##{{TYPE}}",want: &MigrationInfo{Version: "001foo",Namespace: "db_shop1",@@ -153,8 +153,8 @@ func TestParseMigrationInfo(t *testing.T) {wantErr: "",},{- filePath: "db_shop1__001foo__data__fix_customer_info",- filePathTemplate: "{{DB_NAME}}__{{VERSION}}__{{TYPE}}__{{DESCRIPTION}}",+ filePath: "db_shop1##001foo##data##fix_customer_info",+ filePathTemplate: "{{DB_NAME}}##{{VERSION}}##{{TYPE}}##{{DESCRIPTION}}",want: &MigrationInfo{Version: "001foo",Namespace: "db_shop1",@@ -168,8 +168,8 @@ func TestParseMigrationInfo(t *testing.T) {wantErr: "",},{- filePath: ".db__20220811.sql",- filePathTemplate: ".{{DB_NAME}}__{{VERSION}}.sql",+ filePath: ".db##20220811.sql",+ filePathTemplate: ".{{DB_NAME}}##{{VERSION}}.sql",want: &MigrationInfo{Version: "20220811",Namespace: "db",@@ -183,8 +183,8 @@ func TestParseMigrationInfo(t *testing.T) {wantErr: "",},{- filePath: "db1__001foo__baseline",- filePathTemplate: "{{DB_NAME}}__{{VERSION}}__{{TYPE}}",+ filePath: "db1##001foo##baseline",+ filePathTemplate: "{{DB_NAME}}##{{VERSION}}##{{TYPE}}",want: &MigrationInfo{Version: "001foo",Namespace: "db1",@@ -199,13 +199,13 @@ func TestParseMigrationInfo(t *testing.T) {},{filePath: "db",- filePathTemplate: "{{DB_NAME}}__{{VERSION}}",+ filePathTemplate: "{{DB_NAME}}##{{VERSION}}",want: nil,wantErr: "",},{ // Make sure the "." is escaped and should only match literals not as a wildcard- filePath: ".db__20220811.sql",- filePathTemplate: "A{{DB_NAME}}__{{VERSION}}Asql",+ filePath: ".db##20220811.sql",+ filePathTemplate: "A{{DB_NAME}}##{{VERSION}}Asql",want: nil,wantErr: "",},@@ -240,14 +240,14 @@ func TestParseSchemaFileInfo(t *testing.T) {name: "no schemaPathTemplate",baseDirectory: "",schemaPathTemplate: "",- file: "Test/testdb__LATEST.sql",+ file: "Test/testdb##LATEST.sql",schemaInfo: nil,},{name: "only has DB_NAME",baseDirectory: "",- schemaPathTemplate: "{{DB_NAME}}__LATEST.sql",- file: "testdb__LATEST.sql",+ schemaPathTemplate: "{{DB_NAME}}##LATEST.sql",+ file: "testdb##LATEST.sql",schemaInfo: &MigrationInfo{Source: VCS,Type: Migrate,@@ -257,8 +257,8 @@ func TestParseSchemaFileInfo(t *testing.T) {{name: "has both ENV_NAME and DB_NAME",baseDirectory: "",- schemaPathTemplate: "{{ENV_NAME}}/{{DB_NAME}}__LATEST.sql",- file: "Test/testdb__LATEST.sql",+ schemaPathTemplate: "{{ENV_NAME}}/{{DB_NAME}}##LATEST.sql",+ file: "Test/testdb##LATEST.sql",schemaInfo: &MigrationInfo{Source: VCS,Type: Migrate,@@ -270,15 +270,15 @@ func TestParseSchemaFileInfo(t *testing.T) {{name: "baseDirectory does not match",baseDirectory: "bytebase",- schemaPathTemplate: "{{ENV_NAME}}/{{DB_NAME}}__LATEST.sql",- file: "Test/testdb__LATEST.sql",+ schemaPathTemplate: "{{ENV_NAME}}/{{DB_NAME}}##LATEST.sql",+ file: "Test/testdb##LATEST.sql",schemaInfo: nil,},{name: "baseDirectory with both ENV_NAME and DB_NAME",baseDirectory: "bytebase",- schemaPathTemplate: "{{ENV_NAME}}/{{DB_NAME}}__LATEST.sql",- file: "bytebase/Test/testdb__LATEST.sql",+ schemaPathTemplate: "{{ENV_NAME}}/{{DB_NAME}}##LATEST.sql",+ file: "bytebase/Test/testdb##LATEST.sql",schemaInfo: &MigrationInfo{Source: VCS,Type: Migrate,diff --git a/plugin/vcs/vcs_test.go b/plugin/vcs/vcs_test.goindex 007003fe97..2c11d31300 100644--- a/plugin/vcs/vcs_test.go+++ b/plugin/vcs/vcs_test.go@@ -24,11 +24,11 @@ func TestIsDoubleTimesAsteriskInTemplateValid(t *testing.T) {err: true,},{- template: "bytebase/**/{{ENV_NAME}}/**/{{DB_NAME}}__{{VERSION}}__{{TYPE}}__{{DESCRIPTION}}.sql",+ template: "bytebase/**/{{ENV_NAME}}/**/{{DB_NAME}}##{{VERSION}}##{{TYPE}}##{{DESCRIPTION}}.sql",err: false,},{- template: "/**/{{ENV_NAME}}/**/{{DB_NAME}}__{{VERSION}}__{{TYPE}}__{{DESCRIPTION}}.sql",+ template: "/**/{{ENV_NAME}}/**/{{DB_NAME}}##{{VERSION}}##{{TYPE}}##{{DESCRIPTION}}.sql",err: false,},// Credit to Linear Issue BYT-1267diff --git a/server/sheet_test.go b/server/sheet_test.goindex 54fef7c39b..ece2941843 100644--- a/server/sheet_test.go+++ b/server/sheet_test.go@@ -25,8 +25,8 @@ func TestParseSheetInfo(t *testing.T) {err: nil,},{- filePath: "sheet/DEV__TEST__test.sql",- sheetPathTemplate: "sheet/{{ENV_NAME}}__{{DB_NAME}}__{{NAME}}.sql",+ filePath: "sheet/DEV##TEST##test.sql",+ sheetPathTemplate: "sheet/{{ENV_NAME}}##{{DB_NAME}}##{{NAME}}.sql",want: &SheetInfo{EnvironmentName: "DEV",DatabaseName: "TEST",@@ -35,8 +35,8 @@ func TestParseSheetInfo(t *testing.T) {err: nil,},{- filePath: "sheet/DEV__test.sql",- sheetPathTemplate: "sheet/{{ENV_NAME}}__{{NAME}}.sql",+ filePath: "sheet/DEV##test.sql",+ sheetPathTemplate: "sheet/{{ENV_NAME}}##{{NAME}}.sql",want: &SheetInfo{EnvironmentName: "DEV",DatabaseName: "",@@ -45,8 +45,8 @@ func TestParseSheetInfo(t *testing.T) {err: nil,},{- filePath: "sheet/employee__test.sql",- sheetPathTemplate: "sheet/{{DB_NAME}}__{{NAME}}.sql",+ filePath: "sheet/employee##test.sql",+ sheetPathTemplate: "sheet/{{DB_NAME}}##{{NAME}}.sql",want: &SheetInfo{EnvironmentName: "",DatabaseName: "employee",diff --git a/server/webhook.go b/server/webhook.goindex a66dbcbeb8..132fe1c2ec 100644--- a/server/webhook.go+++ b/server/webhook.go@@ -504,10 +504,10 @@ func (s *Server) findProjectDatabases(ctx context.Context, projectID int, tenant// We support 3 patterns on how to organize the schema files.// Pattern 1: The database name is the same across all environments. Each environment will have its own directory, so the- // schema file looks like "dev/v1__db1", "staging/v1__db1".+ // schema file looks like "dev/v1##db1", "staging/v1##db1".//// Pattern 2: Like 1, the database name is the same across all environments. All environment shares the same schema file,- // say v1__db1, when a new file is added like v2__db1__add_column, we will create a multi stage pipeline where+ // say v1##db1, when a new file is added like v2##db1##add_column, we will create a multi stage pipeline where// each stage corresponds to an environment.//// Pattern 3: The database name is different among different environments. In such case, the database name alone is enoughdiff --git a/server/webhook_test.go b/server/webhook_test.goindex a8a76274e1..dcd2fe9423 100644--- a/server/webhook_test.go+++ b/server/webhook_test.go@@ -6,6 +6,7 @@ import ("github.com/stretchr/testify/assert")+// TODO(d): fix the double underscore "__".func TestValidateGitHubWebhookSignature256(t *testing.T) {//nolint:misspellconst payload = `{"ref":"refs/heads/main","before":"07da1e122bdbb81da8499b6d82c6b6302581a5a7","after":"5a96148ac5ef11a53b838b8cc0d9c929420657f3","repository":{"id":470746482,"node_id":"R_kgDOHA8Fcg","name":"bytebase-test","full_name":"unknwon/bytebase-test","private":true,"owner":{"name":"unknwon","email":"[email protected]","login":"unknwon","id":2946214,"node_id":"MDQ6VXNlcjI5NDYyMTQ=","avatar_url":"https://avatars.githubusercontent.com/u/2946214?v=4","gravatar_id":"","url":"https://api.github.com/users/unknwon","html_url":"https://github.com/unknwon","followers_url":"https://api.github.com/users/unknwon/followers","following_url":"https://api.github.com/users/unknwon/following{/other_user}","gists_url":"https://api.github.com/users/unknwon/gists{/gist_id}","starred_url":"https://api.github.com/users/unknwon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unknwon/subscriptions","organizations_url":"https://api.github.com/users/unknwon/orgs","repos_url":"https://api.github.com/users/unknwon/repos","events_url":"https://api.github.com/users/unknwon/events{/privacy}","received_events_url":"https://api.github.com/users/unknwon/received_events","type":"User","site_admin":false},"html_url":"https://github.com/unknwon/bytebase-test","description":null,"fork":false,"url":"https://github.com/unknwon/bytebase-test","forks_url":"https://api.github.com/repos/unknwon/bytebase-test/forks","keys_url":"https://api.github.com/repos/unknwon/bytebase-test/keys{/key_id}","collaborators_url":"https://api.github.com/repos/unknwon/bytebase-test/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/unknwon/bytebase-test/teams","hooks_url":"https://api.github.com/repos/unknwon/bytebase-test/hooks","issue_events_url":"https://api.github.com/repos/unknwon/bytebase-test/issues/events{/number}","events_url":"https://api.github.com/repos/unknwon/bytebase-test/events","assignees_url":"https://api.github.com/repos/unknwon/bytebase-test/assignees{/user}","branches_url":"https://api.github.com/repos/unknwon/bytebase-test/branches{/branch}","tags_url":"https://api.github.com/repos/unknwon/bytebase-test/tags","blobs_url":"https://api.github.com/repos/unknwon/bytebase-test/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/unknwon/bytebase-test/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/unknwon/bytebase-test/git/refs{/sha}","trees_url":"https://api.github.com/repos/unknwon/bytebase-test/git/trees{/sha}","statuses_url":"https://api.github.com/repos/unknwon/bytebase-test/statuses/{sha}","languages_url":"https://api.github.com/repos/unknwon/bytebase-test/languages","stargazers_url":"https://api.github.com/repos/unknwon/bytebase-test/stargazers","contributors_url":"https://api.github.com/repos/unknwon/bytebase-test/contributors","subscribers_url":"https://api.github.com/repos/unknwon/bytebase-test/subscribers","subscription_url":"https://api.github.com/repos/unknwon/bytebase-test/subscription","commits_url":"https://api.github.com/repos/unknwon/bytebase-test/commits{/sha}","git_commits_url":"https://api.github.com/repos/unknwon/bytebase-test/git/commits{/sha}","comments_url":"https://api.github.com/repos/unknwon/bytebase-test/comments{/number}","issue_comment_url":"https://api.github.com/repos/unknwon/bytebase-test/issues/comments{/number}","contents_url":"https://api.github.com/repos/unknwon/bytebase-test/contents/{+path}","compare_url":"https://api.github.com/repos/unknwon/bytebase-test/compare/{base}...{head}","merges_url":"https://api.github.com/repos/unknwon/bytebase-test/merges","archive_url":"https://api.github.com/repos/unknwon/bytebase-test/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/unknwon/bytebase-test/downloads","issues_url":"https://api.github.com/repos/unknwon/bytebase-test/issues{/number}","pulls_url":"https://api.github.com/repos/unknwon/bytebase-test/pulls{/number}","milestones_url":"https://api.github.com/repos/unknwon/bytebase-test/milestones{/number}","notifications_url":"https://api.github.com/repos/unknwon/bytebase-test/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/unknwon/bytebase-test/labels{/name}","releases_url":"https://api.github.com/repos/unknwon/bytebase-test/releases{/id}","deployments_url":"https://api.github.com/repos/unknwon/bytebase-test/deployments","created_at":1647463607,"updated_at":"2022-03-16T20:46:47Z","pushed_at":1658671596,"git_url":"git://github.com/unknwon/bytebase-test.git","ssh_url":"[email protected]:unknwon/bytebase-test.git","clone_url":"https://github.com/unknwon/bytebase-test.git","svn_url":"https://github.com/unknwon/bytebase-test","homepage":null,"size":20,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":[],"visibility":"private","forks":0,"open_issues":0,"watchers":0,"default_branch":"main","stargazers":0,"master_branch":"main"},"pusher":{"name":"unknwon","email":"[email protected]"},"sender":{"login":"unknwon","id":2946214,"node_id":"MDQ6VXNlcjI5NDYyMTQ=","avatar_url":"https://avatars.githubusercontent.com/u/2946214?v=4","gravatar_id":"","url":"https://api.github.com/users/unknwon","html_url":"https://github.com/unknwon","followers_url":"https://api.github.com/users/unknwon/followers","following_url":"https://api.github.com/users/unknwon/following{/other_user}","gists_url":"https://api.github.com/users/unknwon/gists{/gist_id}","starred_url":"https://api.github.com/users/unknwon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unknwon/subscriptions","organizations_url":"https://api.github.com/users/unknwon/orgs","repos_url":"https://api.github.com/users/unknwon/repos","events_url":"https://api.github.com/users/unknwon/events{/privacy}","received_events_url":"https://api.github.com/users/unknwon/received_events","type":"User","site_admin":false},"created":false,"deleted":false,"forced":false,"base_ref":null,"compare":"https://github.com/unknwon/bytebase-test/compare/07da1e122bdb...5a96148ac5ef","commits":[{"id":"5a96148ac5ef11a53b838b8cc0d9c929420657f3","tree_id":"8a842b23b62886d2ee12c152eda741cf39b1ceef","distinct":true,"message":"Create testdb_dev__202101131000__baseline__create_tablefoo_for_bar.sql","timestamp":"2022-07-24T22:06:36+08:00","url":"https://github.com/unknwon/bytebase-test/commit/5a96148ac5ef11a53b838b8cc0d9c929420657f3","author":{"name":"Joe Chen","email":"[email protected]","username":"unknwon"},"committer":{"name":"GitHub","email":"[email protected]","username":"web-flow"},"added":["Dev/testdb_dev__202101131000__baseline__create_tablefoo_for_bar.sql"],"removed":[],"modified":[]}],"head_commit":{"id":"5a96148ac5ef11a53b838b8cc0d9c929420657f3","tree_id":"8a842b23b62886d2ee12c152eda741cf39b1ceef","distinct":true,"message":"Create testdb_dev__202101131000__baseline__create_tablefoo_for_bar.sql","timestamp":"2022-07-24T22:06:36+08:00","url":"https://github.com/unknwon/bytebase-test/commit/5a96148ac5ef11a53b838b8cc0d9c929420657f3","author":{"name":"Joe Chen","email":"[email protected]","username":"unknwon"},"committer":{"name":"GitHub","email":"[email protected]","username":"web-flow"},"added":["Dev/testdb_dev__202101131000__baseline__create_tablefoo_for_bar.sql"],"removed":[],"modified":[]}}`diff --git a/store/demo/dev/10000__reset.sql b/store/demo/dev/10000##reset.sqlsimilarity index 100%rename from store/demo/dev/10000__reset.sqlrename to store/demo/dev/10000##reset.sqldiff --git a/store/demo/dev/10001__principal.sql b/store/demo/dev/10001##principal.sqlsimilarity index 100%rename from store/demo/dev/10001__principal.sqlrename to store/demo/dev/10001##principal.sqldiff --git a/store/demo/dev/10010__workspace.sql b/store/demo/dev/10010##workspace.sqlsimilarity index 100%rename from store/demo/dev/10010__workspace.sqlrename to store/demo/dev/10010##workspace.sqldiff --git a/store/demo/dev/10020__member.sql b/store/demo/dev/10020##member.sqlsimilarity index 100%rename from store/demo/dev/10020__member.sqlrename to store/demo/dev/10020##member.sqldiff --git a/store/demo/dev/10030__project.sql b/store/demo/dev/10030##project.sqlsimilarity index 100%rename from store/demo/dev/10030__project.sqlrename to store/demo/dev/10030##project.sqldiff --git a/store/demo/dev/10040__project_member.sql b/store/demo/dev/10040##project_member.sqlsimilarity index 100%rename from store/demo/dev/10040__project_member.sqlrename to store/demo/dev/10040##project_member.sqldiff --git a/store/demo/dev/10041__project_webhook.sql b/store/demo/dev/10041##project_webhook.sqlsimilarity index 100%rename from store/demo/dev/10041__project_webhook.sqlrename to store/demo/dev/10041##project_webhook.sqldiff --git a/store/demo/dev/10050__environment.sql b/store/demo/dev/10050##environment.sqlsimilarity index 100%rename from store/demo/dev/10050__environment.sqlrename to store/demo/dev/10050##environment.sqldiff --git a/store/demo/dev/10051__policy.sql b/store/demo/dev/10051##policy.sqlsimilarity index 100%rename from store/demo/dev/10051__policy.sqlrename to store/demo/dev/10051##policy.sqldiff --git a/store/demo/dev/10060__instance.sql b/store/demo/dev/10060##instance.sqlsimilarity index 100%rename from store/demo/dev/10060__instance.sqlrename to store/demo/dev/10060##instance.sqldiff --git a/store/demo/dev/10061__instance_user.sql b/store/demo/dev/10061##instance_user.sqlsimilarity index 100%rename from store/demo/dev/10061__instance_user.sqlrename to store/demo/dev/10061##instance_user.sqldiff --git a/store/demo/dev/10070__db.sql b/store/demo/dev/10070##db.sqlsimilarity index 100%rename from store/demo/dev/10070__db.sqlrename to store/demo/dev/10070##db.sqldiff --git a/store/demo/dev/10071__tbl.sql b/store/demo/dev/10071##tbl.sqlsimilarity index 100%rename from store/demo/dev/10071__tbl.sqlrename to store/demo/dev/10071##tbl.sqldiff --git a/store/demo/dev/10072__col.sql b/store/demo/dev/10072##col.sqlsimilarity index 100%rename from store/demo/dev/10072__col.sqlrename to store/demo/dev/10072##col.sqldiff --git a/store/demo/dev/10073__idx.sql b/store/demo/dev/10073##idx.sqlsimilarity index 100%rename from store/demo/dev/10073__idx.sqlrename to store/demo/dev/10073##idx.sqldiff --git a/store/demo/dev/10074__backup.sql b/store/demo/dev/10074##backup.sqlsimilarity index 100%rename from store/demo/dev/10074__backup.sqlrename to store/demo/dev/10074##backup.sqldiff --git a/store/demo/dev/10080__data_source.sql b/store/demo/dev/10080##data_source.sqlsimilarity index 100%rename from store/demo/dev/10080__data_source.sqlrename to store/demo/dev/10080##data_source.sqldiff --git a/store/demo/dev/10090__pipeline.sql b/store/demo/dev/10090##pipeline.sqlsimilarity index 100%rename from store/demo/dev/10090__pipeline.sqlrename to store/demo/dev/10090##pipeline.sqldiff --git a/store/demo/dev/10100__stage.sql b/store/demo/dev/10100##stage.sqlsimilarity index 100%rename from store/demo/dev/10100__stage.sqlrename to store/demo/dev/10100##stage.sqldiff --git a/store/demo/dev/10110__task.sql b/store/demo/dev/10110##task.sqlsimilarity index 97%rename from store/demo/dev/10110__task.sqlrename to store/demo/dev/10110##task.sqlindex c0dde9ca79..7d1d2ef441 100644--- a/store/demo/dev/10110__task.sql+++ b/store/demo/dev/10110##task.sql@@ -60,7 +60,7 @@ VALUES'Add initial schema','bb.task.database.schema.update','DONE',- '{"migrationType":"BASELINE","statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs":1624873354,"url":"http://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop__v1__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs":1624873354,"url":"http://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop##v1##baseline##add_initial_schema.sql"}}}');-- Task for stage 10003 "Integration" to update database 7007 'shop'@@ -94,7 +94,7 @@ VALUES'Add initial schema','bb.task.database.schema.update','DONE',- '{"migrationType":"BASELINE","statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs":1624873354,"url":"http://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop__v1__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs":1624873354,"url":"http://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop##v1##baseline##add_initial_schema.sql"}}}');-- Task for stage 10004 "Staging" to update database 7011 'shop'@@ -128,7 +128,7 @@ VALUES'Add initial schema','bb.task.database.schema.update','PENDING_APPROVAL',- '{"migrationType":"BASELINE","statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs":1624873354,"url":"http://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop__v1__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs":1624873354,"url":"http://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop##v1##baseline##add_initial_schema.sql"}}}');-- Task for stage 10005 "Prod" to update database 7015 'proddb1'@@ -162,7 +162,7 @@ VALUES'Add initial schema','bb.task.database.schema.update','PENDING_APPROVAL',- '{"migrationType":"BASELINE","statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs":1624873354,"url":"http://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop__v1__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs":1624873354,"url":"http://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop##v1##baseline##add_initial_schema.sql"}}}');-- Task for Pipeline 9003 create table@@ -257,7 +257,7 @@ VALUES'Add initial schema','bb.task.database.schema.update','DONE',- '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"8f578d53e821c46421d69fd0aabd29921190a6c0","title":"Create user, post, comment table for dev environment","message":"Create user, post, comment table for dev environment","createdTs":1624865383,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8f578d53e821c46421d69fd0aabd29921190a6c0","authorName":"tianzhou","added":"bytebase/dev/blog__202106280000__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"8f578d53e821c46421d69fd0aabd29921190a6c0","title":"Create user, post, comment table for dev environment","message":"Create user, post, comment table for dev environment","createdTs":1624865383,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8f578d53e821c46421d69fd0aabd29921190a6c0","authorName":"tianzhou","added":"bytebase/dev/blog##202106280000##baseline##add_initial_schema.sql"}}}');-- Task for stage 10009 simulating webhook push event@@ -291,7 +291,7 @@ VALUES'Add initial schema','bb.task.database.schema.update','DONE',- '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"0765950c28c50dd07217aa0a133e8239e64f0ea1","title":"Create user, post, comment table for integration environment","message":"Create user, post, comment table for integration environment","createdTs":1624866787,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/0765950c28c50dd07217aa0a133e8239e64f0ea1","authorName":"tianzhou","added":"bytebase/integration/blog__202106280000__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"0765950c28c50dd07217aa0a133e8239e64f0ea1","title":"Create user, post, comment table for integration environment","message":"Create user, post, comment table for integration environment","createdTs":1624866787,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/0765950c28c50dd07217aa0a133e8239e64f0ea1","authorName":"tianzhou","added":"bytebase/integration/blog##202106280000##baseline##add_initial_schema.sql"}}}');-- Task for stage 10010 simulating webhook push event@@ -325,7 +325,7 @@ VALUES'Add initial schema','bb.task.database.schema.update','DONE',- '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"149f18b8d94805be4b92e256ef1dc9f4a27d5157","title":"Create user, post, comment table for staging environment","message":"Create user, post, comment table for staging environment","createdTs":1624868403,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/149f18b8d94805be4b92e256ef1dc9f4a27d5157","authorName":"tianzhou","added":"bytebase/bytebase/staging/blog__202106280000__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"149f18b8d94805be4b92e256ef1dc9f4a27d5157","title":"Create user, post, comment table for staging environment","message":"Create user, post, comment table for staging environment","createdTs":1624868403,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/149f18b8d94805be4b92e256ef1dc9f4a27d5157","authorName":"tianzhou","added":"bytebase/bytebase/staging/blog##202106280000##baseline##add_initial_schema.sql"}}}');-- Task for stage 10011 simulating webhook push event@@ -359,7 +359,7 @@ VALUES'Add initial schema','bb.task.database.schema.update','DONE',- '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":1624868676,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/ec17d38d6581015feb49b341cc3da56cb0e354fb","authorName":"tianzhou","added":"bytebase/prod/blog__202106280000__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":1624868676,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/ec17d38d6581015feb49b341cc3da56cb0e354fb","authorName":"tianzhou","added":"bytebase/prod/blog##202106280000##baseline##add_initial_schema.sql"}}}');-- Task for stage 10012 simulating webhook push event@@ -393,7 +393,7 @@ VALUES'Add created at column','bb.task.database.schema.update','FAILED',- '{"migrationType":"MIGRATE","statement":"ALTER TABLE `user` ADD COLUMN `created_at` DATETIME NOT NULL;\n\nALTER TABLE post ADD COLUMN `created_at` DATETIME NOT NULL;\n\nALTER TABLE comment ADD COLUMN `created_at` DATETIME NOT NULL;\n","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":"8ff6482998059a861e1faa14658c65244577b54e","title":"Add created_at column to user,post,comment table for dev environment","message":"Add created_at column to user,post,comment table for dev environment","createdTs":1624869938,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8ff6482998059a861e1faa14658c65244577b54e","authorName":"tianzhou","added":"bytebase/dev/blog__202106280100__migrate__add_created_at_column.sql"}}}'+ '{"migrationType":"MIGRATE","statement":"ALTER TABLE `user` ADD COLUMN `created_at` DATETIME NOT NULL;\n\nALTER TABLE post ADD COLUMN `created_at` DATETIME NOT NULL;\n\nALTER TABLE comment ADD COLUMN `created_at` DATETIME NOT NULL;\n","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":"8ff6482998059a861e1faa14658c65244577b54e","title":"Add created_at column to user,post,comment table for dev environment","message":"Add created_at column to user,post,comment table for dev environment","createdTs":1624869938,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8ff6482998059a861e1faa14658c65244577b54e","authorName":"tianzhou","added":"bytebase/dev/blog##202106280100##migrate##add_created_at_column.sql"}}}');-- Task for Pipeline 9009 multi-stage create table UI workflowdiff --git a/store/demo/dev/10111__task_dag.sql b/store/demo/dev/10111##task_dag.sqlsimilarity index 100%rename from store/demo/dev/10111__task_dag.sqlrename to store/demo/dev/10111##task_dag.sqldiff --git a/store/demo/dev/10120__task_run.sql b/store/demo/dev/10120##task_run.sqlsimilarity index 97%rename from store/demo/dev/10120__task_run.sqlrename to store/demo/dev/10120##task_run.sqlindex 4aebd9236a..840d9300e6 100644--- a/store/demo/dev/10120__task_run.sql+++ b/store/demo/dev/10120##task_run.sql@@ -27,7 +27,7 @@ VALUES'bb.task.database.schema.update',0,'{"detail":"Established baseline version 202106280000 for database ''shop''","migrationId":1,"version":"202106280000"}',- '{"migrationType":"BASELINE","statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs":1624873354,"url":"http://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop__v1__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs":1624873354,"url":"http://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop##v1##baseline##add_initial_schema.sql"}}}');-- Task run for task 11003@@ -59,7 +59,7 @@ VALUES'bb.task.database.schema.update',0,'{"detail":"Established baseline version 202106280000 for database ''shop''","migrationId":1,"version":"202106280000"}',- '{"migrationType":"BASELINE","statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs":1624873354,"url":"http://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop__v1__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs":1624873354,"url":"http://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop##v1##baseline##add_initial_schema.sql"}}}');-- Failed task run for task 11006 create table@@ -117,7 +117,7 @@ VALUES'bb.task.database.schema.update',0,'{"detail":"Established baseline version 202106280000 for database ''blog''","migrationId":1,"version":"202106280000"}',- '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"8f578d53e821c46421d69fd0aabd29921190a6c0","title":"Create user, post, comment table for dev environment","message":"Create user, post, comment table for dev environment","createdTs":1624865383,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8f578d53e821c46421d69fd0aabd29921190a6c0","authorName":"tianzhou","added":"bytebase/dev/blog__202106280000__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"8f578d53e821c46421d69fd0aabd29921190a6c0","title":"Create user, post, comment table for dev environment","message":"Create user, post, comment table for dev environment","createdTs":1624865383,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8f578d53e821c46421d69fd0aabd29921190a6c0","authorName":"tianzhou","added":"bytebase/dev/blog##202106280000##baseline##add_initial_schema.sql"}}}');-- Task run for task 11009@@ -149,7 +149,7 @@ VALUES'bb.task.database.schema.update',0,'{"detail":"Established baseline version 202106280000 for database ''blog''","migrationId":1,"version":"202106280000"}',- '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"8f578d53e821c46421d69fd0aabd29921190a6c0","title":"Create user, post, comment table for dev environment","message":"Create user, post, comment table for dev environment","createdTs":1624865383,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8f578d53e821c46421d69fd0aabd29921190a6c0","authorName":"tianzhou","added":"bytebase/dev/blog__202106280000__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"8f578d53e821c46421d69fd0aabd29921190a6c0","title":"Create user, post, comment table for dev environment","message":"Create user, post, comment table for dev environment","createdTs":1624865383,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8f578d53e821c46421d69fd0aabd29921190a6c0","authorName":"tianzhou","added":"bytebase/dev/blog##202106280000##baseline##add_initial_schema.sql"}}}');-- Task run for task 11010@@ -181,7 +181,7 @@ VALUES'bb.task.database.schema.update',0,'{"detail":"Established baseline version 202106280000 for database ''blog''","migrationId":1,"version":"202106280000"}',- '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"8f578d53e821c46421d69fd0aabd29921190a6c0","title":"Create user, post, comment table for dev environment","message":"Create user, post, comment table for dev environment","createdTs":1624865383,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8f578d53e821c46421d69fd0aabd29921190a6c0","authorName":"tianzhou","added":"bytebase/dev/blog__202106280000__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"8f578d53e821c46421d69fd0aabd29921190a6c0","title":"Create user, post, comment table for dev environment","message":"Create user, post, comment table for dev environment","createdTs":1624865383,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8f578d53e821c46421d69fd0aabd29921190a6c0","authorName":"tianzhou","added":"bytebase/dev/blog##202106280000##baseline##add_initial_schema.sql"}}}');-- Task run for task 11011@@ -213,7 +213,7 @@ VALUES'bb.task.database.schema.update',0,'{"detail":"Established baseline version 202106280000 for database ''blog''","migrationId":1,"version":"202106280000"}',- '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"8f578d53e821c46421d69fd0aabd29921190a6c0","title":"Create user, post, comment table for dev environment","message":"Create user, post, comment table for dev environment","createdTs":1624865383,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8f578d53e821c46421d69fd0aabd29921190a6c0","authorName":"tianzhou","added":"bytebase/dev/blog__202106280000__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"8f578d53e821c46421d69fd0aabd29921190a6c0","title":"Create user, post, comment table for dev environment","message":"Create user, post, comment table for dev environment","createdTs":1624865383,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8f578d53e821c46421d69fd0aabd29921190a6c0","authorName":"tianzhou","added":"bytebase/dev/blog##202106280000##baseline##add_initial_schema.sql"}}}');-- Failed task run for task 11012 create table@@ -245,7 +245,7 @@ VALUES'bb.task.database.schema.update',201,'{"detail":"database ''blog'' has already applied version 202106280100"}',- '{"migrationType":"MIGRATE","statement":"ALTER TABLE `user` ADD COLUMN `created_at` DATETIME NOT NULL;\n\nALTER TABLE post ADD COLUMN `created_at` DATETIME NOT NULL;\n\nALTER TABLE comment ADD COLUMN `created_at` DATETIME NOT NULL;\n","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":"8ff6482998059a861e1faa14658c65244577b54e","title":"Add created_at column to user,post,comment table for dev environment","message":"Add created_at column to user,post,comment table for dev environment","createdTs":1624869938,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8ff6482998059a861e1faa14658c65244577b54e","authorName":"tianzhou","added":"bytebase/dev/blog__202106280100__migrate__add_created_at_column.sql"}}}'+ '{"migrationType":"MIGRATE","statement":"ALTER TABLE `user` ADD COLUMN `created_at` DATETIME NOT NULL;\n\nALTER TABLE post ADD COLUMN `created_at` DATETIME NOT NULL;\n\nALTER TABLE comment ADD COLUMN `created_at` DATETIME NOT NULL;\n","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":"8ff6482998059a861e1faa14658c65244577b54e","title":"Add created_at column to user,post,comment table for dev environment","message":"Add created_at column to user,post,comment table for dev environment","createdTs":1624869938,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8ff6482998059a861e1faa14658c65244577b54e","authorName":"tianzhou","added":"bytebase/dev/blog##202106280100##migrate##add_created_at_column.sql"}}}');-- Successful task run for task 10013 create tablediff --git a/store/demo/dev/10121__task_check_run.sql b/store/demo/dev/10121##task_check_run.sqlsimilarity index 100%rename from store/demo/dev/10121__task_check_run.sqlrename to store/demo/dev/10121##task_check_run.sqldiff --git a/store/demo/dev/10130__issue.sql b/store/demo/dev/10130##issue.sqlsimilarity index 100%rename from store/demo/dev/10130__issue.sqlrename to store/demo/dev/10130##issue.sqldiff --git a/store/demo/dev/10131__issue_subscriber.sql b/store/demo/dev/10131##issue_subscriber.sqlsimilarity index 100%rename from store/demo/dev/10131__issue_subscriber.sqlrename to store/demo/dev/10131##issue_subscriber.sqldiff --git a/store/demo/prod/10140__activity.sql b/store/demo/dev/10140##activity.sqlsimilarity index 97%rename from store/demo/prod/10140__activity.sqlrename to store/demo/dev/10140##activity.sqlindex ee112d285a..473110405a 100644--- a/store/demo/prod/10140__activity.sql+++ b/store/demo/dev/10140##activity.sql@@ -1107,7 +1107,7 @@ VALUES'bb.project.repository.push','INFO','Created issue "Create product table using multi-stage VCS workflow".',- '{"pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs": 1630940811,"url":"https://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop__v1__baseline__add_initial_schema.sql"}},"issueId":13002,"issueName":"Create product table using multi-stage VCS workflow"}'+ '{"pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs": 1630940811,"url":"https://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop##v1##baseline##add_initial_schema.sql"}},"issueId":13002,"issueName":"Create product table using multi-stage VCS workflow"}');-- Project activity for 3003@@ -1162,7 +1162,7 @@ VALUES'bb.project.repository.push','INFO','Created issue "Add created_at column to user,post,comment table for dev 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":"8ff6482998059a861e1faa14658c65244577b54e","title":"Add created_at column to user,post,comment table for dev environment","message":"Add created_at column to user,post,comment table for dev environment","createdTs":1630943211,"url":"https://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8ff6482998059a861e1faa14658c65244577b54e","authorName":"tianzhou","added":"bytebase/dev/blog__202106280100__migrate__add_created_at_column.sql"}},"issueId":13008,"issueName":"Add created_at column to user,post,comment table for dev 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":"8ff6482998059a861e1faa14658c65244577b54e","title":"Add created_at column to user,post,comment table for dev environment","message":"Add created_at column to user,post,comment table for dev environment","createdTs":1630943211,"url":"https://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8ff6482998059a861e1faa14658c65244577b54e","authorName":"tianzhou","added":"bytebase/dev/blog##202106280100##migrate##add_created_at_column.sql"}},"issueId":13008,"issueName":"Add created_at column to user,post,comment table for dev environment"}');INSERT INTO@@ -1189,7 +1189,7 @@ VALUES'bb.project.repository.push','INFO','Created issue "Create user, post, comment table for dev 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":"8f578d53e821c46421d69fd0aabd29921190a6c0","title":"Create user, post, comment table for dev environment","message":"Create user, post, comment table for dev environment","createdTs": 1630941711,"url":"https://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8f578d53e821c46421d69fd0aabd29921190a6c0","authorName":"tianzhou","added":"bytebase/dev/blog__202106280000__baseline__add_initial_schema.sql"}},"issueId":13004,"issueName":"Create user, post, comment table for dev 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":"8f578d53e821c46421d69fd0aabd29921190a6c0","title":"Create user, post, comment table for dev environment","message":"Create user, post, comment table for dev environment","createdTs": 1630941711,"url":"https://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8f578d53e821c46421d69fd0aabd29921190a6c0","authorName":"tianzhou","added":"bytebase/dev/blog##202106280000##baseline##add_initial_schema.sql"}},"issueId":13004,"issueName":"Create user, post, comment table for dev environment"}');INSERT INTO@@ -1216,7 +1216,7 @@ VALUES'bb.project.repository.push','INFO','Created issue "Create user, post, comment table for integration 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":"0765950c28c50dd07217aa0a133e8239e64f0ea1","title":"Create user, post, comment table for integration environment","message":"Create user, post, comment table for integration environment","createdTs": 1630941711,"url":"https://gitlab.bytebase.com/bytebase-demo/blog/-/commit/0765950c28c50dd07217aa0a133e8239e64f0ea1","authorName":"tianzhou","added":"bytebase/integration/blog__202106280000__baseline__add_initial_schema.sql"}},"issueId":13005,"issueName":"Create user, post, comment table for integration 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":"0765950c28c50dd07217aa0a133e8239e64f0ea1","title":"Create user, post, comment table for integration environment","message":"Create user, post, comment table for integration environment","createdTs": 1630941711,"url":"https://gitlab.bytebase.com/bytebase-demo/blog/-/commit/0765950c28c50dd07217aa0a133e8239e64f0ea1","authorName":"tianzhou","added":"bytebase/integration/blog##202106280000##baseline##add_initial_schema.sql"}},"issueId":13005,"issueName":"Create user, post, comment table for integration environment"}');INSERT INTO@@ -1243,7 +1243,7 @@ VALUES'bb.project.repository.push','INFO','Created issue "Create user, post, comment table for staging 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":"149f18b8d94805be4b92e256ef1dc9f4a27d5157","title":"Create user, post, comment table for staging environment","message":"Create user, post, comment table for staging environment","createdTs": 1630941711,"url":"https://gitlab.bytebase.com/bytebase-demo/blog/-/commit/149f18b8d94805be4b92e256ef1dc9f4a27d5157","authorName":"tianzhou","added":"bytebase/staging/blog__202106280000__baseline__add_initial_schema.sql"}},"issueId":13006,"issueName":"Create user, post, comment table for staging 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":"149f18b8d94805be4b92e256ef1dc9f4a27d5157","title":"Create user, post, comment table for staging environment","message":"Create user, post, comment table for staging environment","createdTs": 1630941711,"url":"https://gitlab.bytebase.com/bytebase-demo/blog/-/commit/149f18b8d94805be4b92e256ef1dc9f4a27d5157","authorName":"tianzhou","added":"bytebase/staging/blog##202106280000##baseline##add_initial_schema.sql"}},"issueId":13006,"issueName":"Create user, post, comment table for staging environment"}');INSERT INTO@@ -1270,7 +1270,7 @@ VALUES'bb.project.repository.push','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"}'+ '{"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"}');ALTER SEQUENCE activity_id_seq RESTART WITH 14049;diff --git a/store/demo/dev/10150__inbox.sql b/store/demo/dev/10150##inbox.sqlsimilarity index 100%rename from store/demo/dev/10150__inbox.sqlrename to store/demo/dev/10150##inbox.sqldiff --git a/store/demo/dev/10160__bookmark.sql b/store/demo/dev/10160##bookmark.sqlsimilarity index 100%rename from store/demo/dev/10160__bookmark.sqlrename to store/demo/dev/10160##bookmark.sqldiff --git a/store/demo/dev/10170__vcs.sql b/store/demo/dev/10170##vcs.sqlsimilarity index 100%rename from store/demo/dev/10170__vcs.sqlrename to store/demo/dev/10170##vcs.sqldiff --git a/store/demo/dev/10180__repository.sql b/store/demo/dev/10180##repository.sqlsimilarity index 90%rename from store/demo/dev/10180__repository.sqlrename to store/demo/dev/10180##repository.sqlindex 9f480de32e..99d4daaa9f 100644--- a/store/demo/dev/10180__repository.sql+++ b/store/demo/dev/10180##repository.sql@@ -35,8 +35,8 @@ VALUES'http://gitlab.bytebase.com/bytebase-demo/blog','master','bytebase',- '{{ENV_NAME}}/{{DB_NAME}}__{{VERSION}}__{{TYPE}}__{{DESCRIPTION}}.sql',- '{{ENV_NAME}}/.{{DB_NAME}}__LATEST.sql',+ '{{ENV_NAME}}/{{DB_NAME}}##{{VERSION}}##{{TYPE}}##{{DESCRIPTION}}.sql',+ '{{ENV_NAME}}/.{{DB_NAME}}##LATEST.sql','script/{{NAME}}.sql',-- Refers to the bytebase-demo/blog'13',@@ -86,9 +86,9 @@ VALUES'http://gitlab.bytebase.com/bytebase-demo/shop','master','bytebase',- '{{ENV_NAME}}/{{DB_NAME}}__{{VERSION}}__{{TYPE}}__{{DESCRIPTION}}.sql',- '{{ENV_NAME}}/.{{DB_NAME}}__LATEST.sql',- 'script/{{ENV_NAME}}__{{DB_NAME}}__{{NAME}}.sql',+ '{{ENV_NAME}}/{{DB_NAME}}##{{VERSION}}##{{TYPE}}##{{DESCRIPTION}}.sql',+ '{{ENV_NAME}}/.{{DB_NAME}}##LATEST.sql',+ 'script/{{ENV_NAME}}##{{DB_NAME}}##{{NAME}}.sql',-- Refers to the bytebase-demo/shop'14',-- Refers to the webhook in bytebase-demo/shop@@ -137,8 +137,8 @@ VALUES'http://gitlab.bytebase.com/bytebase-demo/tenant','master','bytebase',- '{{DB_NAME}}__{{VERSION}}__{{TYPE}}__{{DESCRIPTION}}.sql',- '.{{DB_NAME}}__LATEST.sql',+ '{{DB_NAME}}##{{VERSION}}##{{TYPE}}##{{DESCRIPTION}}.sql',+ '.{{DB_NAME}}##LATEST.sql',-- Refers to the bytebase-demo/tenant'15',-- Refers to the webhook in bytebase-demo/tenantdiff --git a/store/demo/dev/10190__anomaly.sql b/store/demo/dev/10190##anomaly.sqlsimilarity index 100%rename from store/demo/dev/10190__anomaly.sqlrename to store/demo/dev/10190##anomaly.sqldiff --git a/store/demo/dev/10200__label.sql b/store/demo/dev/10200##label.sqlsimilarity index 100%rename from store/demo/dev/10200__label.sqlrename to store/demo/dev/10200##label.sqldiff --git a/store/demo/dev/10210__deployment_config.sql b/store/demo/dev/10210##deployment_config.sqlsimilarity index 100%rename from store/demo/dev/10210__deployment_config.sqlrename to store/demo/dev/10210##deployment_config.sqldiff --git a/store/demo/dev/10220__sheet.sql b/store/demo/dev/10220##sheet.sqlsimilarity index 100%rename from store/demo/dev/10220__sheet.sqlrename to store/demo/dev/10220##sheet.sqldiff --git a/store/demo/dev/10221__sheet_organizer.sql b/store/demo/dev/10221##sheet_organizer.sqlsimilarity index 100%rename from store/demo/dev/10221__sheet_organizer.sqlrename to store/demo/dev/10221##sheet_organizer.sqldiff --git a/store/demo/prod/10000__reset.sql b/store/demo/prod/10000##reset.sqlsimilarity index 100%rename from store/demo/prod/10000__reset.sqlrename to store/demo/prod/10000##reset.sqldiff --git a/store/demo/prod/10001__principal.sql b/store/demo/prod/10001##principal.sqlsimilarity index 100%rename from store/demo/prod/10001__principal.sqlrename to store/demo/prod/10001##principal.sqldiff --git a/store/demo/prod/10010__workspace.sql b/store/demo/prod/10010##workspace.sqlsimilarity index 100%rename from store/demo/prod/10010__workspace.sqlrename to store/demo/prod/10010##workspace.sqldiff --git a/store/demo/prod/10020__member.sql b/store/demo/prod/10020##member.sqlsimilarity index 100%rename from store/demo/prod/10020__member.sqlrename to store/demo/prod/10020##member.sqldiff --git a/store/demo/prod/10030__project.sql b/store/demo/prod/10030##project.sqlsimilarity index 100%rename from store/demo/prod/10030__project.sqlrename to store/demo/prod/10030##project.sqldiff --git a/store/demo/prod/10040__project_member.sql b/store/demo/prod/10040##project_member.sqlsimilarity index 100%rename from store/demo/prod/10040__project_member.sqlrename to store/demo/prod/10040##project_member.sqldiff --git a/store/demo/prod/10041__project_webhook.sql b/store/demo/prod/10041##project_webhook.sqlsimilarity index 100%rename from store/demo/prod/10041__project_webhook.sqlrename to store/demo/prod/10041##project_webhook.sqldiff --git a/store/demo/prod/10050__environment.sql b/store/demo/prod/10050##environment.sqlsimilarity index 100%rename from store/demo/prod/10050__environment.sqlrename to store/demo/prod/10050##environment.sqldiff --git a/store/demo/prod/10051__policy.sql b/store/demo/prod/10051##policy.sqlsimilarity index 100%rename from store/demo/prod/10051__policy.sqlrename to store/demo/prod/10051##policy.sqldiff --git a/store/demo/prod/10060__instance.sql b/store/demo/prod/10060##instance.sqlsimilarity index 100%rename from store/demo/prod/10060__instance.sqlrename to store/demo/prod/10060##instance.sqldiff --git a/store/demo/prod/10061__instance_user.sql b/store/demo/prod/10061#instance_user.sqlsimilarity index 100%rename from store/demo/prod/10061__instance_user.sqlrename to store/demo/prod/10061#instance_user.sqldiff --git a/store/demo/prod/10070__db.sql b/store/demo/prod/10070##db.sqlsimilarity index 100%rename from store/demo/prod/10070__db.sqlrename to store/demo/prod/10070##db.sqldiff --git a/store/demo/prod/10071__tbl.sql b/store/demo/prod/10071##tbl.sqlsimilarity index 100%rename from store/demo/prod/10071__tbl.sqlrename to store/demo/prod/10071##tbl.sqldiff --git a/store/demo/prod/10072__col.sql b/store/demo/prod/10072##col.sqlsimilarity index 100%rename from store/demo/prod/10072__col.sqlrename to store/demo/prod/10072##col.sqldiff --git a/store/demo/prod/10073__idx.sql b/store/demo/prod/10073##idx.sqlsimilarity index 100%rename from store/demo/prod/10073__idx.sqlrename to store/demo/prod/10073##idx.sqldiff --git a/store/demo/prod/10074__backup.sql b/store/demo/prod/10074##backup.sqlsimilarity index 100%rename from store/demo/prod/10074__backup.sqlrename to store/demo/prod/10074##backup.sqldiff --git a/store/demo/prod/10080__data_source.sql b/store/demo/prod/10080##data_source.sqlsimilarity index 100%rename from store/demo/prod/10080__data_source.sqlrename to store/demo/prod/10080##data_source.sqldiff --git a/store/demo/prod/10090__pipeline.sql b/store/demo/prod/10090##pipeline.sqlsimilarity index 100%rename from store/demo/prod/10090__pipeline.sqlrename to store/demo/prod/10090##pipeline.sqldiff --git a/store/demo/prod/10100__stage.sql b/store/demo/prod/10100##stage.sqlsimilarity index 100%rename from store/demo/prod/10100__stage.sqlrename to store/demo/prod/10100##stage.sqldiff --git a/store/demo/prod/10110__task.sql b/store/demo/prod/10110##task.sqlsimilarity index 97%rename from store/demo/prod/10110__task.sqlrename to store/demo/prod/10110##task.sqlindex c0dde9ca79..7d1d2ef441 100644--- a/store/demo/prod/10110__task.sql+++ b/store/demo/prod/10110##task.sql@@ -60,7 +60,7 @@ VALUES'Add initial schema','bb.task.database.schema.update','DONE',- '{"migrationType":"BASELINE","statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs":1624873354,"url":"http://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop__v1__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs":1624873354,"url":"http://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop##v1##baseline##add_initial_schema.sql"}}}');-- Task for stage 10003 "Integration" to update database 7007 'shop'@@ -94,7 +94,7 @@ VALUES'Add initial schema','bb.task.database.schema.update','DONE',- '{"migrationType":"BASELINE","statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs":1624873354,"url":"http://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop__v1__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs":1624873354,"url":"http://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop##v1##baseline##add_initial_schema.sql"}}}');-- Task for stage 10004 "Staging" to update database 7011 'shop'@@ -128,7 +128,7 @@ VALUES'Add initial schema','bb.task.database.schema.update','PENDING_APPROVAL',- '{"migrationType":"BASELINE","statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs":1624873354,"url":"http://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop__v1__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs":1624873354,"url":"http://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop##v1##baseline##add_initial_schema.sql"}}}');-- Task for stage 10005 "Prod" to update database 7015 'proddb1'@@ -162,7 +162,7 @@ VALUES'Add initial schema','bb.task.database.schema.update','PENDING_APPROVAL',- '{"migrationType":"BASELINE","statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs":1624873354,"url":"http://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop__v1__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs":1624873354,"url":"http://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop##v1##baseline##add_initial_schema.sql"}}}');-- Task for Pipeline 9003 create table@@ -257,7 +257,7 @@ VALUES'Add initial schema','bb.task.database.schema.update','DONE',- '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"8f578d53e821c46421d69fd0aabd29921190a6c0","title":"Create user, post, comment table for dev environment","message":"Create user, post, comment table for dev environment","createdTs":1624865383,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8f578d53e821c46421d69fd0aabd29921190a6c0","authorName":"tianzhou","added":"bytebase/dev/blog__202106280000__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"8f578d53e821c46421d69fd0aabd29921190a6c0","title":"Create user, post, comment table for dev environment","message":"Create user, post, comment table for dev environment","createdTs":1624865383,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8f578d53e821c46421d69fd0aabd29921190a6c0","authorName":"tianzhou","added":"bytebase/dev/blog##202106280000##baseline##add_initial_schema.sql"}}}');-- Task for stage 10009 simulating webhook push event@@ -291,7 +291,7 @@ VALUES'Add initial schema','bb.task.database.schema.update','DONE',- '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"0765950c28c50dd07217aa0a133e8239e64f0ea1","title":"Create user, post, comment table for integration environment","message":"Create user, post, comment table for integration environment","createdTs":1624866787,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/0765950c28c50dd07217aa0a133e8239e64f0ea1","authorName":"tianzhou","added":"bytebase/integration/blog__202106280000__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"0765950c28c50dd07217aa0a133e8239e64f0ea1","title":"Create user, post, comment table for integration environment","message":"Create user, post, comment table for integration environment","createdTs":1624866787,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/0765950c28c50dd07217aa0a133e8239e64f0ea1","authorName":"tianzhou","added":"bytebase/integration/blog##202106280000##baseline##add_initial_schema.sql"}}}');-- Task for stage 10010 simulating webhook push event@@ -325,7 +325,7 @@ VALUES'Add initial schema','bb.task.database.schema.update','DONE',- '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"149f18b8d94805be4b92e256ef1dc9f4a27d5157","title":"Create user, post, comment table for staging environment","message":"Create user, post, comment table for staging environment","createdTs":1624868403,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/149f18b8d94805be4b92e256ef1dc9f4a27d5157","authorName":"tianzhou","added":"bytebase/bytebase/staging/blog__202106280000__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"149f18b8d94805be4b92e256ef1dc9f4a27d5157","title":"Create user, post, comment table for staging environment","message":"Create user, post, comment table for staging environment","createdTs":1624868403,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/149f18b8d94805be4b92e256ef1dc9f4a27d5157","authorName":"tianzhou","added":"bytebase/bytebase/staging/blog##202106280000##baseline##add_initial_schema.sql"}}}');-- Task for stage 10011 simulating webhook push event@@ -359,7 +359,7 @@ VALUES'Add initial schema','bb.task.database.schema.update','DONE',- '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":1624868676,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/ec17d38d6581015feb49b341cc3da56cb0e354fb","authorName":"tianzhou","added":"bytebase/prod/blog__202106280000__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":1624868676,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/ec17d38d6581015feb49b341cc3da56cb0e354fb","authorName":"tianzhou","added":"bytebase/prod/blog##202106280000##baseline##add_initial_schema.sql"}}}');-- Task for stage 10012 simulating webhook push event@@ -393,7 +393,7 @@ VALUES'Add created at column','bb.task.database.schema.update','FAILED',- '{"migrationType":"MIGRATE","statement":"ALTER TABLE `user` ADD COLUMN `created_at` DATETIME NOT NULL;\n\nALTER TABLE post ADD COLUMN `created_at` DATETIME NOT NULL;\n\nALTER TABLE comment ADD COLUMN `created_at` DATETIME NOT NULL;\n","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":"8ff6482998059a861e1faa14658c65244577b54e","title":"Add created_at column to user,post,comment table for dev environment","message":"Add created_at column to user,post,comment table for dev environment","createdTs":1624869938,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8ff6482998059a861e1faa14658c65244577b54e","authorName":"tianzhou","added":"bytebase/dev/blog__202106280100__migrate__add_created_at_column.sql"}}}'+ '{"migrationType":"MIGRATE","statement":"ALTER TABLE `user` ADD COLUMN `created_at` DATETIME NOT NULL;\n\nALTER TABLE post ADD COLUMN `created_at` DATETIME NOT NULL;\n\nALTER TABLE comment ADD COLUMN `created_at` DATETIME NOT NULL;\n","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":"8ff6482998059a861e1faa14658c65244577b54e","title":"Add created_at column to user,post,comment table for dev environment","message":"Add created_at column to user,post,comment table for dev environment","createdTs":1624869938,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8ff6482998059a861e1faa14658c65244577b54e","authorName":"tianzhou","added":"bytebase/dev/blog##202106280100##migrate##add_created_at_column.sql"}}}');-- Task for Pipeline 9009 multi-stage create table UI workflowdiff --git a/store/demo/prod/10120__task_run.sql b/store/demo/prod/10120##task_run.sqlsimilarity index 97%rename from store/demo/prod/10120__task_run.sqlrename to store/demo/prod/10120##task_run.sqlindex 4aebd9236a..840d9300e6 100644--- a/store/demo/prod/10120__task_run.sql+++ b/store/demo/prod/10120##task_run.sql@@ -27,7 +27,7 @@ VALUES'bb.task.database.schema.update',0,'{"detail":"Established baseline version 202106280000 for database ''shop''","migrationId":1,"version":"202106280000"}',- '{"migrationType":"BASELINE","statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs":1624873354,"url":"http://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop__v1__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs":1624873354,"url":"http://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop##v1##baseline##add_initial_schema.sql"}}}');-- Task run for task 11003@@ -59,7 +59,7 @@ VALUES'bb.task.database.schema.update',0,'{"detail":"Established baseline version 202106280000 for database ''shop''","migrationId":1,"version":"202106280000"}',- '{"migrationType":"BASELINE","statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs":1624873354,"url":"http://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop__v1__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE product (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tdescription TEXT NOT NULL\n);\n","pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs":1624873354,"url":"http://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop##v1##baseline##add_initial_schema.sql"}}}');-- Failed task run for task 11006 create table@@ -117,7 +117,7 @@ VALUES'bb.task.database.schema.update',0,'{"detail":"Established baseline version 202106280000 for database ''blog''","migrationId":1,"version":"202106280000"}',- '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"8f578d53e821c46421d69fd0aabd29921190a6c0","title":"Create user, post, comment table for dev environment","message":"Create user, post, comment table for dev environment","createdTs":1624865383,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8f578d53e821c46421d69fd0aabd29921190a6c0","authorName":"tianzhou","added":"bytebase/dev/blog__202106280000__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"8f578d53e821c46421d69fd0aabd29921190a6c0","title":"Create user, post, comment table for dev environment","message":"Create user, post, comment table for dev environment","createdTs":1624865383,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8f578d53e821c46421d69fd0aabd29921190a6c0","authorName":"tianzhou","added":"bytebase/dev/blog##202106280000##baseline##add_initial_schema.sql"}}}');-- Task run for task 11009@@ -149,7 +149,7 @@ VALUES'bb.task.database.schema.update',0,'{"detail":"Established baseline version 202106280000 for database ''blog''","migrationId":1,"version":"202106280000"}',- '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"8f578d53e821c46421d69fd0aabd29921190a6c0","title":"Create user, post, comment table for dev environment","message":"Create user, post, comment table for dev environment","createdTs":1624865383,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8f578d53e821c46421d69fd0aabd29921190a6c0","authorName":"tianzhou","added":"bytebase/dev/blog__202106280000__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"8f578d53e821c46421d69fd0aabd29921190a6c0","title":"Create user, post, comment table for dev environment","message":"Create user, post, comment table for dev environment","createdTs":1624865383,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8f578d53e821c46421d69fd0aabd29921190a6c0","authorName":"tianzhou","added":"bytebase/dev/blog##202106280000##baseline##add_initial_schema.sql"}}}');-- Task run for task 11010@@ -181,7 +181,7 @@ VALUES'bb.task.database.schema.update',0,'{"detail":"Established baseline version 202106280000 for database ''blog''","migrationId":1,"version":"202106280000"}',- '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"8f578d53e821c46421d69fd0aabd29921190a6c0","title":"Create user, post, comment table for dev environment","message":"Create user, post, comment table for dev environment","createdTs":1624865383,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8f578d53e821c46421d69fd0aabd29921190a6c0","authorName":"tianzhou","added":"bytebase/dev/blog__202106280000__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"8f578d53e821c46421d69fd0aabd29921190a6c0","title":"Create user, post, comment table for dev environment","message":"Create user, post, comment table for dev environment","createdTs":1624865383,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8f578d53e821c46421d69fd0aabd29921190a6c0","authorName":"tianzhou","added":"bytebase/dev/blog##202106280000##baseline##add_initial_schema.sql"}}}');-- Task run for task 11011@@ -213,7 +213,7 @@ VALUES'bb.task.database.schema.update',0,'{"detail":"Established baseline version 202106280000 for database ''blog''","migrationId":1,"version":"202106280000"}',- '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"8f578d53e821c46421d69fd0aabd29921190a6c0","title":"Create user, post, comment table for dev environment","message":"Create user, post, comment table for dev environment","createdTs":1624865383,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8f578d53e821c46421d69fd0aabd29921190a6c0","authorName":"tianzhou","added":"bytebase/dev/blog__202106280000__baseline__add_initial_schema.sql"}}}'+ '{"migrationType":"BASELINE","statement":"CREATE TABLE `user` (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\temail TEXT NOT NULL\n);\n\nCREATE TABLE post (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tname TEXT NOT NULL,\n\tcontent TEXT NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n\nCREATE TABLE comment (\n\tid INTEGER PRIMARY KEY AUTO_INCREMENT,\n\tcontent TEXT NOT NULL,\n\tpost_id INTEGER NOT NULL,\n\tauthor_id INTEGER NOT NULL,\n\tFOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE,\n\tFOREIGN KEY (author_id) REFERENCES `user` (id) ON DELETE RESTRICT\n);\n","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":"8f578d53e821c46421d69fd0aabd29921190a6c0","title":"Create user, post, comment table for dev environment","message":"Create user, post, comment table for dev environment","createdTs":1624865383,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8f578d53e821c46421d69fd0aabd29921190a6c0","authorName":"tianzhou","added":"bytebase/dev/blog##202106280000##baseline##add_initial_schema.sql"}}}');-- Failed task run for task 11012 create table@@ -245,7 +245,7 @@ VALUES'bb.task.database.schema.update',201,'{"detail":"database ''blog'' has already applied version 202106280100"}',- '{"migrationType":"MIGRATE","statement":"ALTER TABLE `user` ADD COLUMN `created_at` DATETIME NOT NULL;\n\nALTER TABLE post ADD COLUMN `created_at` DATETIME NOT NULL;\n\nALTER TABLE comment ADD COLUMN `created_at` DATETIME NOT NULL;\n","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":"8ff6482998059a861e1faa14658c65244577b54e","title":"Add created_at column to user,post,comment table for dev environment","message":"Add created_at column to user,post,comment table for dev environment","createdTs":1624869938,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8ff6482998059a861e1faa14658c65244577b54e","authorName":"tianzhou","added":"bytebase/dev/blog__202106280100__migrate__add_created_at_column.sql"}}}'+ '{"migrationType":"MIGRATE","statement":"ALTER TABLE `user` ADD COLUMN `created_at` DATETIME NOT NULL;\n\nALTER TABLE post ADD COLUMN `created_at` DATETIME NOT NULL;\n\nALTER TABLE comment ADD COLUMN `created_at` DATETIME NOT NULL;\n","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":"8ff6482998059a861e1faa14658c65244577b54e","title":"Add created_at column to user,post,comment table for dev environment","message":"Add created_at column to user,post,comment table for dev environment","createdTs":1624869938,"url":"http://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8ff6482998059a861e1faa14658c65244577b54e","authorName":"tianzhou","added":"bytebase/dev/blog##202106280100##migrate##add_created_at_column.sql"}}}');-- Successful task run for task 10013 create tablediff --git a/store/demo/prod/10121__task_check_run.sql b/store/demo/prod/10121##task_check_run.sqlsimilarity index 100%rename from store/demo/prod/10121__task_check_run.sqlrename to store/demo/prod/10121##task_check_run.sqldiff --git a/store/demo/prod/10130__issue.sql b/store/demo/prod/10130##issue.sqlsimilarity index 100%rename from store/demo/prod/10130__issue.sqlrename to store/demo/prod/10130##issue.sqldiff --git a/store/demo/prod/10131__issue_subscriber.sql b/store/demo/prod/10131##issue_subscriber.sqlsimilarity index 100%rename from store/demo/prod/10131__issue_subscriber.sqlrename to store/demo/prod/10131##issue_subscriber.sqldiff --git a/store/demo/dev/10140__activity.sql b/store/demo/prod/10140##activity.sqlsimilarity index 97%rename from store/demo/dev/10140__activity.sqlrename to store/demo/prod/10140##activity.sqlindex ee112d285a..473110405a 100644--- a/store/demo/dev/10140__activity.sql+++ b/store/demo/prod/10140##activity.sql@@ -1107,7 +1107,7 @@ VALUES'bb.project.repository.push','INFO','Created issue "Create product table using multi-stage VCS workflow".',- '{"pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs": 1630940811,"url":"https://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop__v1__baseline__add_initial_schema.sql"}},"issueId":13002,"issueName":"Create product table using multi-stage VCS workflow"}'+ '{"pushEvent":{"vcsType":"GITLAB_SELF_HOST","baseDir":"bytebase","ref":"refs/heads/master","repositoryId":"14","repositoryUrl":"http://gitlab.bytebase.com/bytebase-demo/shop","repositoryFullPath":"bytebase-demo/shop","authorName":"tianzhou","fileCommit":{"id":"c80352facbaefcde0c1c82340381be3286e5438d","title":"Create product table","message":"Create product table","createdTs": 1630940811,"url":"https://gitlab.bytebase.com/bytebase-demo/shop/-/commit/c80352facbaefcde0c1c82340381be3286e5438d","authorName":"tianzhou","added":"bytebase/shop##v1##baseline##add_initial_schema.sql"}},"issueId":13002,"issueName":"Create product table using multi-stage VCS workflow"}');-- Project activity for 3003@@ -1162,7 +1162,7 @@ VALUES'bb.project.repository.push','INFO','Created issue "Add created_at column to user,post,comment table for dev 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":"8ff6482998059a861e1faa14658c65244577b54e","title":"Add created_at column to user,post,comment table for dev environment","message":"Add created_at column to user,post,comment table for dev environment","createdTs":1630943211,"url":"https://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8ff6482998059a861e1faa14658c65244577b54e","authorName":"tianzhou","added":"bytebase/dev/blog__202106280100__migrate__add_created_at_column.sql"}},"issueId":13008,"issueName":"Add created_at column to user,post,comment table for dev 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":"8ff6482998059a861e1faa14658c65244577b54e","title":"Add created_at column to user,post,comment table for dev environment","message":"Add created_at column to user,post,comment table for dev environment","createdTs":1630943211,"url":"https://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8ff6482998059a861e1faa14658c65244577b54e","authorName":"tianzhou","added":"bytebase/dev/blog##202106280100##migrate##add_created_at_column.sql"}},"issueId":13008,"issueName":"Add created_at column to user,post,comment table for dev environment"}');INSERT INTO@@ -1189,7 +1189,7 @@ VALUES'bb.project.repository.push','INFO','Created issue "Create user, post, comment table for dev 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":"8f578d53e821c46421d69fd0aabd29921190a6c0","title":"Create user, post, comment table for dev environment","message":"Create user, post, comment table for dev environment","createdTs": 1630941711,"url":"https://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8f578d53e821c46421d69fd0aabd29921190a6c0","authorName":"tianzhou","added":"bytebase/dev/blog__202106280000__baseline__add_initial_schema.sql"}},"issueId":13004,"issueName":"Create user, post, comment table for dev 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":"8f578d53e821c46421d69fd0aabd29921190a6c0","title":"Create user, post, comment table for dev environment","message":"Create user, post, comment table for dev environment","createdTs": 1630941711,"url":"https://gitlab.bytebase.com/bytebase-demo/blog/-/commit/8f578d53e821c46421d69fd0aabd29921190a6c0","authorName":"tianzhou","added":"bytebase/dev/blog##202106280000##baseline##add_initial_schema.sql"}},"issueId":13004,"issueName":"Create user, post, comment table for dev environment"}');INSERT INTO@@ -1216,7 +1216,7 @@ VALUES'bb.project.repository.push','INFO','Created issue "Create user, post, comment table for integration 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":"0765950c28c50dd07217aa0a133e8239e64f0ea1","title":"Create user, post, comment table for integration environment","message":"Create user, post, comment table for integration environment","createdTs": 1630941711,"url":"https://gitlab.bytebase.com/bytebase-demo/blog/-/commit/0765950c28c50dd07217aa0a133e8239e64f0ea1","authorName":"tianzhou","added":"bytebase/integration/blog__202106280000__baseline__add_initial_schema.sql"}},"issueId":13005,"issueName":"Create user, post, comment table for integration 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":"0765950c28c50dd07217aa0a133e8239e64f0ea1","title":"Create user, post, comment table for integration environment","message":"Create user, post, comment table for integration environment","createdTs": 1630941711,"url":"https://gitlab.bytebase.com/bytebase-demo/blog/-/commit/0765950c28c50dd07217aa0a133e8239e64f0ea1","authorName":"tianzhou","added":"bytebase/integration/blog##202106280000##baseline##add_initial_schema.sql"}},"issueId":13005,"issueName":"Create user, post, comment table for integration environment"}');INSERT INTO@@ -1243,7 +1243,7 @@ VALUES'bb.project.repository.push','INFO','Created issue "Create user, post, comment table for staging 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":"149f18b8d94805be4b92e256ef1dc9f4a27d5157","title":"Create user, post, comment table for staging environment","message":"Create user, post, comment table for staging environment","createdTs": 1630941711,"url":"https://gitlab.bytebase.com/bytebase-demo/blog/-/commit/149f18b8d94805be4b92e256ef1dc9f4a27d5157","authorName":"tianzhou","added":"bytebase/staging/blog__202106280000__baseline__add_initial_schema.sql"}},"issueId":13006,"issueName":"Create user, post, comment table for staging 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":"149f18b8d94805be4b92e256ef1dc9f4a27d5157","title":"Create user, post, comment table for staging environment","message":"Create user, post, comment table for staging environment","createdTs": 1630941711,"url":"https://gitlab.bytebase.com/bytebase-demo/blog/-/commit/149f18b8d94805be4b92e256ef1dc9f4a27d5157","authorName":"tianzhou","added":"bytebase/staging/blog##202106280000##baseline##add_initial_schema.sql"}},"issueId":13006,"issueName":"Create user, post, comment table for staging environment"}');INSERT INTO@@ -1270,7 +1270,7 @@ VALUES'bb.project.repository.push','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"}'+ '{"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"}');ALTER SEQUENCE activity_id_seq RESTART WITH 14049;diff --git a/store/demo/prod/10150__inbox.sql b/store/demo/prod/10150##inbox.sqlsimilarity index 100%rename from store/demo/prod/10150__inbox.sqlrename to store/demo/prod/10150##inbox.sqldiff --git a/store/demo/prod/10160__bookmark.sql b/store/demo/prod/10160##bookmark.sqlsimilarity index 100%rename from store/demo/prod/10160__bookmark.sqlrename to store/demo/prod/10160##bookmark.sqldiff --git a/store/demo/prod/10170__vcs.sql b/store/demo/prod/10170##vcs.sqlsimilarity index 100%rename from store/demo/prod/10170__vcs.sqlrename to store/demo/prod/10170##vcs.sqldiff --git a/store/demo/prod/10180__repository.sql b/store/demo/prod/10180##repository.sqlsimilarity index 91%rename from store/demo/prod/10180__repository.sqlrename to store/demo/prod/10180##repository.sqlindex 0daf1bec99..88b2303c69 100644--- a/store/demo/prod/10180__repository.sql+++ b/store/demo/prod/10180##repository.sql@@ -34,8 +34,8 @@ VALUES'http://gitlab.bytebase.com/bytebase-demo/blog','master','bytebase',- '{{ENV_NAME}}/{{DB_NAME}}__{{VERSION}}__{{TYPE}}__{{DESCRIPTION}}.sql',- '{{ENV_NAME}}/.{{DB_NAME}}__LATEST.sql',+ '{{ENV_NAME}}/{{DB_NAME}}##{{VERSION}}##{{TYPE}}##{{DESCRIPTION}}.sql',+ '{{ENV_NAME}}/.{{DB_NAME}}##LATEST.sql',-- Refers to the bytebase-demo/blog'13',-- Refers to the webhook in bytebase-demo/blog@@ -83,8 +83,8 @@ VALUES'http://gitlab.bytebase.com/bytebase-demo/shop','master','bytebase',- '{{ENV_NAME}}/{{DB_NAME}}__{{VERSION}}__{{TYPE}}__{{DESCRIPTION}}.sql',- '{{ENV_NAME}}/.{{DB_NAME}}__LATEST.sql',+ '{{ENV_NAME}}/{{DB_NAME}}##{{VERSION}}##{{TYPE}}##{{DESCRIPTION}}.sql',+ '{{ENV_NAME}}/.{{DB_NAME}}##LATEST.sql',-- Refers to the bytebase-demo/shop'14',-- Refers to the webhook in bytebase-demo/shop@@ -133,8 +133,8 @@ VALUES'http://gitlab.bytebase.com/bytebase-demo/tenant','master','bytebase',- '{{DB_NAME}}__{{VERSION}}__{{TYPE}}__{{DESCRIPTION}}.sql',- '.{{DB_NAME}}__LATEST.sql',+ '{{DB_NAME}}##{{VERSION}}##{{TYPE}}##{{DESCRIPTION}}.sql',+ '.{{DB_NAME}}##LATEST.sql',-- Refers to the bytebase-demo/tenant'15',-- Refers to the webhook in bytebase-demo/tenantdiff --git a/store/demo/prod/10190__anomaly.sql b/store/demo/prod/10190##anomaly.sqlsimilarity index 100%rename from store/demo/prod/10190__anomaly.sqlrename to store/demo/prod/10190##anomaly.sqldiff --git a/store/demo/prod/10200__label.sql b/store/demo/prod/10200##label.sqlsimilarity index 100%rename from store/demo/prod/10200__label.sqlrename to store/demo/prod/10200##label.sqldiff --git a/store/demo/prod/10210__deployment_config.sql b/store/demo/prod/10210##deployment_config.sqlsimilarity index 100%rename from store/demo/prod/10210__deployment_config.sqlrename to store/demo/prod/10210##deployment_config.sqldiff --git a/store/demo/prod/10220__sheet.sql b/store/demo/prod/10220##sheet.sqlsimilarity index 100%rename from store/demo/prod/10220__sheet.sqlrename to store/demo/prod/10220##sheet.sqldiff --git a/store/demo/schema-migration-history/10000__reset.sql b/store/demo/schema-migration-history/10000##reset.sqlsimilarity index 100%rename from store/demo/schema-migration-history/10000__reset.sqlrename to store/demo/schema-migration-history/10000##reset.sqldiff --git a/store/demo/schema-migration-history/10001__data.sql b/store/demo/schema-migration-history/10001##data.sqlsimilarity index 100%rename from store/demo/schema-migration-history/10001__data.sqlrename to store/demo/schema-migration-history/10001##data.sqldiff --git a/store/migration/dev/20220408000000__schema_version_type.sql b/store/migration/dev/20220408000000##schema_version_type.sqlsimilarity index 100%rename from store/migration/dev/20220408000000__schema_version_type.sqlrename to store/migration/dev/20220408000000##schema_version_type.sqldiff --git a/store/migration/prod/1.0/0000__initial_schema.sql b/store/migration/prod/1.0/0000##initial_schema.sqlsimilarity index 100%rename from store/migration/prod/1.0/0000__initial_schema.sqlrename to store/migration/prod/1.0/0000##initial_schema.sqldiff --git a/store/migration/prod/1.0/0001__initial_data.sql b/store/migration/prod/1.0/0001##initial_data.sqlsimilarity index 100%rename from store/migration/prod/1.0/0001__initial_data.sqlrename to store/migration/prod/1.0/0001##initial_data.sqldiff --git a/store/migration/prod/1.1/0000__db_extension.sql b/store/migration/prod/1.1/0000##db_extension.sqlsimilarity index 100%rename from store/migration/prod/1.1/0000__db_extension.sqlrename to store/migration/prod/1.1/0000##db_extension.sqldiff --git a/store/migration/prod/1.1/0001__sheet_vcs.sql b/store/migration/prod/1.1/0001##sheet_vcs.sqlsimilarity index 100%rename from store/migration/prod/1.1/0001__sheet_vcs.sqlrename to store/migration/prod/1.1/0001##sheet_vcs.sqldiff --git a/store/migration/prod/1.1/0002__sheet_organizer.sql b/store/migration/prod/1.1/0002##sheet_organizer.sqlsimilarity index 100%rename from store/migration/prod/1.1/0002__sheet_organizer.sqlrename to store/migration/prod/1.1/0002##sheet_organizer.sqldiff --git a/store/migration/prod/1.2/0000__backup.sql b/store/migration/prod/1.2/0000##backup.sqlsimilarity index 100%rename from store/migration/prod/1.2/0000__backup.sqlrename to store/migration/prod/1.2/0000##backup.sqldiff --git a/store/migration/prod/1.2/0001__task_dag.sql b/store/migration/prod/1.2/0001##task_dag.sqlsimilarity index 100%rename from store/migration/prod/1.2/0001__task_dag.sqlrename to store/migration/prod/1.2/0001##task_dag.sqldiff --git a/store/migration/prod/1.3/0000__idx_primary_key_column.sql b/store/migration/prod/1.3/0000##idx_primary_key_column.sqlsimilarity index 100%rename from store/migration/prod/1.3/0000__idx_primary_key_column.sqlrename to store/migration/prod/1.3/0000##idx_primary_key_column.sqldiff --git a/store/migration/prod/1.3/0001__github_com.sql b/store/migration/prod/1.3/0001##github_com.sqlsimilarity index 100%rename from store/migration/prod/1.3/0001__github_com.sqlrename to store/migration/prod/1.3/0001##github_com.sqldiff --git a/store/migration/prod/1.3/0002__backup_type_pitr.sql b/store/migration/prod/1.3/0002##backup_type_pitr.sqlsimilarity index 100%rename from store/migration/prod/1.3/0002__backup_type_pitr.sqlrename to store/migration/prod/1.3/0002##backup_type_pitr.sqldiff --git a/store/migration/prod/1.3/0003__backup_retention.sql b/store/migration/prod/1.3/0003##backup_retention.sqlsimilarity index 100%rename from store/migration/prod/1.3/0003__backup_retention.sqlrename to store/migration/prod/1.3/0003##backup_retention.sqldiff --git a/store/migration/prod/1.3/0004__fix_container_id.sql b/store/migration/prod/1.3/0004##fix_container_id.sqlsimilarity index 100%rename from store/migration/prod/1.3/0004__fix_container_id.sqlrename to store/migration/prod/1.3/0004##fix_container_id.sqldiff --git a/store/migration/prod/1.4/0000__add_project_schema_change_type.sql b/store/migration/prod/1.4/0000##add_project_schema_change_type.sqlsimilarity index 100%rename from store/migration/prod/1.4/0000__add_project_schema_change_type.sqlrename to store/migration/prod/1.4/0000##add_project_schema_change_type.sqldiff --git a/store/migration/prod/1.4/0001__drop_repository_webhook_index.sql b/store/migration/prod/1.4/0001##drop_repository_webhook_index.sqlsimilarity index 100%rename from store/migration/prod/1.4/0001__drop_repository_webhook_index.sqlrename to store/migration/prod/1.4/0001##drop_repository_webhook_index.sqldiff --git a/store/migration/prod/1.4/0002__delete_wildcard_database_backup_settings.sql b/store/migration/prod/1.4/0002##delete_wildcard_database_backup_settings.sqlsimilarity index 100%rename from store/migration/prod/1.4/0002__delete_wildcard_database_backup_settings.sqlrename to store/migration/prod/1.4/0002##delete_wildcard_database_backup_settings.sqldiff --git a/store/migration/prod/1.5/0000__lgtm_check.sql b/store/migration/prod/1.5/0000##lgtm_check.sqlsimilarity index 100%rename from store/migration/prod/1.5/0000__lgtm_check.sqlrename to store/migration/prod/1.5/0000##lgtm_check.sqldiff --git a/store/migration/prod/1.6/0000__datasource_address_override.sql b/store/migration/prod/1.6/0000##datasource_address_override.sqlsimilarity index 100%rename from store/migration/prod/1.6/0000__datasource_address_override.sqlrename to store/migration/prod/1.6/0000##datasource_address_override.sqldiff --git a/store/pg_engine.go b/store/pg_engine.goindex 12c0f21b4f..9a320a95cc 100644--- a/store/pg_engine.go+++ b/store/pg_engine.go@@ -34,7 +34,7 @@ const (// 11001 -> Major version 1, minor version 1001// 20001 -> Major version 2, minor version 1//- // The migration file follows the name pattern of {{version_number}}__{{description}}.+ // The migration file follows the name pattern of {{version_number}}##{{description}}.//// Though minor version is backward compatible, we require the schema version must match both the MAJOR and MINOR version,// otherwise, Bytebase will fail to start. We choose this because otherwise failed minor migration changes like adding an@@ -507,7 +507,7 @@ func getDevMigrations() ([]devMigration, error) {continue}- parts := strings.Split(baseName, "__")+ parts := strings.Split(baseName, "##")if len(parts) != 2 {return nil, errors.Errorf("invalid migration file name %q", name)}@@ -547,9 +547,9 @@ func getPatchVersions(minorVersion semver.Version, currentVersion semver.Versionvar patchVersions []patchVersionfor _, name := range names {baseName := filepath.Base(name)- parts := strings.Split(baseName, "__")+ parts := strings.Split(baseName, "##")if len(parts) != 2 {- return nil, errors.Errorf("migration filename %q should include '__'", name)+ return nil, errors.Errorf("migration filename %q should include '##'", name)}patch, err := strconv.ParseInt(parts[0], 10, 64)if err != nil {diff --git a/store/pg_engine_test.go b/store/pg_engine_test.goindex 4f7a966662..dd67f6fdf1 100644--- a/store/pg_engine_test.go+++ b/store/pg_engine_test.go@@ -83,24 +83,24 @@ func TestGetPatchVersions(t *testing.T) {errPart string}{{- names: []string{"0000__hello.sql", "0001__world.sql"},+ names: []string{"0000##hello.sql", "0001##world.sql"},minorVersion: semver.MustParse("1.1.0"),currentVersion: semver.MustParse("1.2.3"),want: nil,errPart: "",},{- names: []string{"0000__hello.sql", "0001__world.sql"},+ names: []string{"0000##hello.sql", "0001##world.sql"},minorVersion: semver.MustParse("1.1.0"),currentVersion: semver.MustParse("1.0.0"),- want: []patchVersion{{semver.MustParse("1.1.0"), "0000__hello.sql"}, {semver.MustParse("1.1.1"), "0001__world.sql"}},+ want: []patchVersion{{semver.MustParse("1.1.0"), "0000##hello.sql"}, {semver.MustParse("1.1.1"), "0001##world.sql"}},errPart: "",},{- names: []string{"0000__hello.sql", "0001__world.sql"},+ names: []string{"0000##hello.sql", "0001##world.sql"},minorVersion: semver.MustParse("1.1.0"),currentVersion: semver.MustParse("1.1.0"),- want: []patchVersion{{semver.MustParse("1.1.1"), "0001__world.sql"}},+ want: []patchVersion{{semver.MustParse("1.1.1"), "0001##world.sql"}},errPart: "",},{@@ -115,10 +115,10 @@ func TestGetPatchVersions(t *testing.T) {minorVersion: semver.MustParse("1.1.0"),currentVersion: semver.MustParse("1.0.0"),want: nil,- errPart: "should include '__'",+ errPart: "should include '##'",},{- names: []string{"00a0__hello.sql"},+ names: []string{"00a0##hello.sql"},minorVersion: semver.MustParse("1.1.0"),currentVersion: semver.MustParse("1.0.0"),want: nil,diff --git a/tests/schema_update_test.go b/tests/schema_update_test.goindex a77616c13d..33d3709135 100644--- a/tests/schema_update_test.go+++ b/tests/schema_update_test.go@@ -398,8 +398,8 @@ func TestVCS(t *testing.T) {WebURL: fmt.Sprintf("%s/%s", ctl.vcsURL, test.repositoryFullPath),BranchFilter: "feature/foo",BaseDirectory: baseDirectory,- FilePathTemplate: "{{ENV_NAME}}/{{DB_NAME}}__{{VERSION}}__{{TYPE}}__{{DESCRIPTION}}.sql",- SchemaPathTemplate: "{{ENV_NAME}}/.{{DB_NAME}}__LATEST.sql",+ FilePathTemplate: "{{ENV_NAME}}/{{DB_NAME}}##{{VERSION}}##{{TYPE}}##{{DESCRIPTION}}.sql",+ SchemaPathTemplate: "{{ENV_NAME}}/.{{DB_NAME}}##LATEST.sql",ExternalID: test.externalID,AccessToken: "accessToken1",RefreshToken: "refreshToken1",@@ -432,7 +432,7 @@ func TestVCS(t *testing.T) {a.NoError(err)// Simulate Git commits for schema update.- gitFile := "bbtest/Prod/testVCSSchemaUpdate__ver1__migrate__create_a_test_table.sql"+ gitFile := "bbtest/Prod/testVCSSchemaUpdate##ver1##migrate##create_a_test_table.sql"err = ctl.vcsProvider.AddFiles(test.externalID, map[string]string{gitFile: migrationStatement})a.NoError(err)@@ -472,7 +472,7 @@ func TestVCS(t *testing.T) {a.Equal(bookSchemaSQLResult, result)// Simulate Git commits for failed data update.- gitFile = "bbtest/Prod/testVCSSchemaUpdate__ver2__data__insert_data.sql"+ gitFile = "bbtest/Prod/testVCSSchemaUpdate##ver2##data##insert_data.sql"err = ctl.vcsProvider.AddFiles(test.externalID, map[string]string{gitFile: dataUpdateStatementWrong})a.NoError(err)@@ -725,8 +725,8 @@ func TestVCS_SDL(t *testing.T) {WebURL: fmt.Sprintf("%s/%s", ctl.vcsURL, test.repositoryFullPath),BranchFilter: "feature/foo",BaseDirectory: baseDirectory,- FilePathTemplate: "{{ENV_NAME}}/{{DB_NAME}}__{{VERSION}}__{{TYPE}}__{{DESCRIPTION}}.sql",- SchemaPathTemplate: "{{ENV_NAME}}/.{{DB_NAME}}__LATEST.sql",+ FilePathTemplate: "{{ENV_NAME}}/{{DB_NAME}}##{{VERSION}}##{{TYPE}}##{{DESCRIPTION}}.sql",+ SchemaPathTemplate: "{{ENV_NAME}}/.{{DB_NAME}}##LATEST.sql",ExternalID: test.externalID,AccessToken: "accessToken1",RefreshToken: "refreshToken1",@@ -758,7 +758,7 @@ func TestVCS_SDL(t *testing.T) {a.NoError(err)// Simulate Git commits for schema update to create a new table "users".- const schemaFile = "bbtest/Prod/.testVCSSchemaUpdate__LATEST.sql"+ const schemaFile = "bbtest/Prod/.testVCSSchemaUpdate##LATEST.sql"schemaFileContent += "\nCREATE TABLE users (id serial PRIMARY KEY);"err = ctl.vcsProvider.AddFiles(test.externalID, map[string]string{schemaFile: schemaFileContent,@@ -793,7 +793,7 @@ func TestVCS_SDL(t *testing.T) {a.NoError(err)// Simulate Git commits for data update to the table "users".- const dataFile = "bbtest/Prod/testVCSSchemaUpdate__ver2__data__insert_data.sql"+ const dataFile = "bbtest/Prod/testVCSSchemaUpdate##ver2##data##insert_data.sql"err = ctl.vcsProvider.AddFiles(test.externalID, map[string]string{dataFile: `INSERT INTO users (id) VALUES (1);`,})@@ -975,14 +975,14 @@ func TestWildcardInVCSFilePathTemplate(t *testing.T) {vcsType: vcs.GitLabSelfHost,baseDirectory: "bbtest",envName: "wildcard",- filePathTemplate: "{{ENV_NAME}}/*/{{DB_NAME}}__{{VERSION}}__{{TYPE}}__{{DESCRIPTION}}.sql",+ filePathTemplate: "{{ENV_NAME}}/*/{{DB_NAME}}##{{VERSION}}##{{TYPE}}##{{DESCRIPTION}}.sql",commitFileNames: []string{// Normal- fmt.Sprintf("%s/%s/foo/%s__ver1__migrate__create_table_t1.sql", baseDirectory, "wildcard", dbName),+ fmt.Sprintf("%s/%s/foo/%s##ver1##migrate##create_table_t1.sql", baseDirectory, "wildcard", dbName),// One singleAsterisk cannot match two directories.- fmt.Sprintf("%s/%s/foo/bar/%s__ver2__data__insert_data.sql", baseDirectory, "wildcard", dbName),+ fmt.Sprintf("%s/%s/foo/bar/%s##ver2##data##insert_data.sql", baseDirectory, "wildcard", dbName),// One singleAsterisk cannot match zero directory.- fmt.Sprintf("%s/%s/%s__ver3__migrate__create_table_t3.sql", baseDirectory, "wildcard", dbName),+ fmt.Sprintf("%s/%s/%s##ver3##migrate##create_table_t3.sql", baseDirectory, "wildcard", dbName),},commitContents: []string{"CREATE TABLE t1 (id INT);",@@ -1017,16 +1017,16 @@ func TestWildcardInVCSFilePathTemplate(t *testing.T) {vcsType: vcs.GitLabSelfHost,baseDirectory: "bbtest",envName: "wildcard",- filePathTemplate: "{{ENV_NAME}}/**/{{DB_NAME}}__{{VERSION}}__{{TYPE}}__{{DESCRIPTION}}.sql",+ filePathTemplate: "{{ENV_NAME}}/**/{{DB_NAME}}##{{VERSION}}##{{TYPE}}##{{DESCRIPTION}}.sql",commitFileNames: []string{// Two singleAsterisk can match one directory.- fmt.Sprintf("%s/%s/foo/%s__ver1__migrate__create_table_t1.sql", baseDirectory, "wildcard", dbName),+ fmt.Sprintf("%s/%s/foo/%s##ver1##migrate##create_table_t1.sql", baseDirectory, "wildcard", dbName),// Two singleAsterisk can match two directories.- fmt.Sprintf("%s/%s/foo/bar/%s__ver2__migrate__create_table_t2.sql", baseDirectory, "wildcard", dbName),+ fmt.Sprintf("%s/%s/foo/bar/%s##ver2##migrate##create_table_t2.sql", baseDirectory, "wildcard", dbName),// Two singleAsterisk can match three directories or more.- fmt.Sprintf("%s/%s/foo/bar/foo/%s__ver3__migrate__create_table_t3.sql", baseDirectory, "wildcard", dbName),+ fmt.Sprintf("%s/%s/foo/bar/foo/%s##ver3##migrate##create_table_t3.sql", baseDirectory, "wildcard", dbName),// Two singleAsterisk cannot match zero directory.- fmt.Sprintf("%s/%s/%s__ver4__migrate__create_table_t4.sql", baseDirectory, "wildcard", dbName),+ fmt.Sprintf("%s/%s/%s##ver4##migrate##create_table_t4.sql", baseDirectory, "wildcard", dbName),},commitContents: []string{"CREATE TABLE t1 (id INT);",@@ -1063,14 +1063,14 @@ func TestWildcardInVCSFilePathTemplate(t *testing.T) {envName: "wildcard",baseDirectory: "",vcsType: vcs.GitLabSelfHost,- filePathTemplate: "{{ENV_NAME}}/**/foo/*/{{DB_NAME}}__{{VERSION}}__{{TYPE}}__{{DESCRIPTION}}.sql",+ filePathTemplate: "{{ENV_NAME}}/**/foo/*/{{DB_NAME}}##{{VERSION}}##{{TYPE}}##{{DESCRIPTION}}.sql",commitFileNames: []string{// ** matches foo, foo matches foo, * matches bar- fmt.Sprintf("%s/foo/foo/bar/%s__ver1__migrate__create_table_t1.sql", "wildcard", dbName),+ fmt.Sprintf("%s/foo/foo/bar/%s##ver1##migrate##create_table_t1.sql", "wildcard", dbName),// ** matches foo/bar/foo, foo matches foo, * matches bar- fmt.Sprintf("%s/foo/bar/foo/foo/bar/%s__ver2__migrate__create_table_t2.sql", "wildcard", dbName),+ fmt.Sprintf("%s/foo/bar/foo/foo/bar/%s##ver2##migrate##create_table_t2.sql", "wildcard", dbName),// cannot match- fmt.Sprintf("%s/%s__ver3__migrate__create_table_t3.sql", "wildcard", dbName),+ fmt.Sprintf("%s/%s##ver3##migrate##create_table_t3.sql", "wildcard", dbName),},commitContents: []string{"CREATE TABLE t1 (id INT);",@@ -1106,14 +1106,14 @@ func TestWildcardInVCSFilePathTemplate(t *testing.T) {envName: "生产",baseDirectory: "bbtest",vcsType: vcs.GitLabSelfHost,- filePathTemplate: "{{ENV_NAME}}/**/foo/*/{{DB_NAME}}__{{VERSION}}__{{TYPE}}__{{DESCRIPTION}}.sql",+ filePathTemplate: "{{ENV_NAME}}/**/foo/*/{{DB_NAME}}##{{VERSION}}##{{TYPE}}##{{DESCRIPTION}}.sql",commitFileNames: []string{// ** matches foo, foo matches foo, * matches bar- fmt.Sprintf("%s/%s/foo/foo/bar/%s__ver1__migrate__create_table_t1.sql", baseDirectory, "生产", dbName),+ fmt.Sprintf("%s/%s/foo/foo/bar/%s##ver1##migrate##create_table_t1.sql", baseDirectory, "生产", dbName),// ** matches foo/bar/foo, foo matches foo, * matches bar- fmt.Sprintf("%s/%s/foo/bar/foo/foo/bar/%s__ver2__migrate__create_table_t2.sql", baseDirectory, "生产", dbName),+ fmt.Sprintf("%s/%s/foo/bar/foo/foo/bar/%s##ver2##migrate##create_table_t2.sql", baseDirectory, "生产", dbName),// cannot match- fmt.Sprintf("%s/%s/%s__ver3__migrate__create_table_t3.sql", baseDirectory, "生产", dbName),+ fmt.Sprintf("%s/%s/%s##ver3##migrate##create_table_t3.sql", baseDirectory, "生产", dbName),},commitContents: []string{"CREATE TABLE t1 (id INT);",@@ -1149,11 +1149,11 @@ func TestWildcardInVCSFilePathTemplate(t *testing.T) {envName: "ZO",baseDirectory: "bbtest",vcsType: vcs.GitLabSelfHost,- filePathTemplate: "{{ENV_NAME}}/{{DB_NAME}}/sql/{{DB_NAME}}__{{VERSION}}__{{TYPE}}__{{DESCRIPTION}}.sql",+ filePathTemplate: "{{ENV_NAME}}/{{DB_NAME}}/sql/{{DB_NAME}}##{{VERSION}}##{{TYPE}}##{{DESCRIPTION}}.sql",commitFileNames: []string{- fmt.Sprintf("%s/%s/%s/sql/%s__ver1__migrate__create_table_t1.sql", baseDirectory, "ZO", dbName, dbName),- fmt.Sprintf("%s/%s/%s/%s__ver2__migrate__create_table_t2.sql", baseDirectory, "ZO", dbName, dbName),- fmt.Sprintf("%s/%s/%s/sql/%s__ver3__migrate__create_table_t3.sql", baseDirectory, "ZO", dbName, dbName),+ fmt.Sprintf("%s/%s/%s/sql/%s##ver1##migrate##create_table_t1.sql", baseDirectory, "ZO", dbName, dbName),+ fmt.Sprintf("%s/%s/%s/%s##ver2##migrate##create_table_t2.sql", baseDirectory, "ZO", dbName, dbName),+ fmt.Sprintf("%s/%s/%s/sql/%s##ver3##migrate##create_table_t3.sql", baseDirectory, "ZO", dbName, dbName),},commitContents: []string{"CREATE TABLE t1 (id INT);",@@ -1236,7 +1236,7 @@ func TestWildcardInVCSFilePathTemplate(t *testing.T) {BranchFilter: branchFilter,BaseDirectory: baseDirectory,FilePathTemplate: test.filePathTemplate,- SchemaPathTemplate: "{{ENV_NAME}}/.{{DB_NAME}}__LATEST.sql",+ SchemaPathTemplate: "{{ENV_NAME}}/.{{DB_NAME}}##LATEST.sql",ExternalID: externalID,AccessToken: "accessToken1",RefreshToken: "refreshToken1",diff --git a/tests/sheet_vcs_test.go b/tests/sheet_vcs_test.goindex 247ef59e0e..2388a402c8 100644--- a/tests/sheet_vcs_test.go+++ b/tests/sheet_vcs_test.go@@ -86,8 +86,8 @@ func TestSheetVCS(t *testing.T) {WebURL: fmt.Sprintf("%s/%s", ctl.vcsURL, test.repositoryFullPath),BranchFilter: "feature/foo",BaseDirectory: baseDirectory,- FilePathTemplate: "{{ENV_NAME}}/{{DB_NAME}}__{{VERSION}}__{{TYPE}}__{{DESCRIPTION}}.sql",- SchemaPathTemplate: "{{ENV_NAME}}/.{{DB_NAME}}__LATEST.sql",+ FilePathTemplate: "{{ENV_NAME}}/{{DB_NAME}}##{{VERSION}}##{{TYPE}}##{{DESCRIPTION}}.sql",+ SchemaPathTemplate: "{{ENV_NAME}}/.{{DB_NAME}}##LATEST.sql",SheetPathTemplate: "sheet/{{NAME}}.sql",ExternalID: test.externalID,AccessToken: "accessToken1",diff --git a/tests/tenant_test.go b/tests/tenant_test.goindex b2815ab5d8..f7c5ea6ed5 100644--- a/tests/tenant_test.go+++ b/tests/tenant_test.go@@ -324,8 +324,8 @@ func TestTenantVCS(t *testing.T) {WebURL: fmt.Sprintf("%s/%s", ctl.vcsURL, test.repositoryFullPath),BranchFilter: "feature/foo",BaseDirectory: baseDirectory,- FilePathTemplate: "{{DB_NAME}}__{{VERSION}}__{{TYPE}}__{{DESCRIPTION}}.sql",- SchemaPathTemplate: ".{{DB_NAME}}__LATEST.sql",+ FilePathTemplate: "{{DB_NAME}}##{{VERSION}}##{{TYPE}}##{{DESCRIPTION}}.sql",+ SchemaPathTemplate: ".{{DB_NAME}}##LATEST.sql",ExternalID: test.externalID,AccessToken: "accessToken1",RefreshToken: "refreshToken1",@@ -438,7 +438,7 @@ func TestTenantVCS(t *testing.T) {a.Equal(len(prodDatabases), prodTenantNumber)// Simulate Git commits.- gitFile := "bbtest/testTenantVCSSchemaUpdate__ver1__migrate__create_a_test_table.sql"+ gitFile := "bbtest/testTenantVCSSchemaUpdate##ver1##migrate##create_a_test_table.sql"err = ctl.vcsProvider.AddFiles(test.externalID, map[string]string{gitFile: migrationStatement})a.NoError(err)@@ -774,8 +774,8 @@ func TestTenantVCSDatabaseNameTemplate(t *testing.T) {WebURL: fmt.Sprintf("%s/%s", ctl.vcsURL, test.repositoryFullPath),BranchFilter: "feature/foo",BaseDirectory: baseDirectory,- FilePathTemplate: "{{DB_NAME}}__{{VERSION}}__{{TYPE}}__{{DESCRIPTION}}.sql",- SchemaPathTemplate: ".{{DB_NAME}}__LATEST.sql",+ FilePathTemplate: "{{DB_NAME}}##{{VERSION}}##{{TYPE}}##{{DESCRIPTION}}.sql",+ SchemaPathTemplate: ".{{DB_NAME}}##LATEST.sql",ExternalID: test.externalID,AccessToken: "accessToken1",RefreshToken: "refreshToken1",@@ -893,7 +893,7 @@ func TestTenantVCSDatabaseNameTemplate(t *testing.T) {a.Equal(prodTenantNumber, len(prodDatabases))// Simulate Git commits.- gitFile := "bbtest/testTenantVCSSchemaUpdate__ver1__migrate__create_a_test_table.sql"+ gitFile := "bbtest/testTenantVCSSchemaUpdate##ver1##migrate##create_a_test_table.sql"err = ctl.vcsProvider.AddFiles(test.externalID, map[string]string{gitFile: migrationStatement})a.NoError(err)@@ -971,7 +971,7 @@ func TestTenantVCSDatabaseNameTemplate(t *testing.T) {a.Len(hm2, 1)// Check latestSchemaFile- files, err := ctl.vcsProvider.GetFiles(test.externalID, fmt.Sprintf("%s/.%s__LATEST.sql", baseDirectory, baseDatabaseName))+ files, err := ctl.vcsProvider.GetFiles(test.externalID, fmt.Sprintf("%s/.%s##LATEST.sql", baseDirectory, baseDatabaseName))a.NoError(err)a.Len(files, 1)})