Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DDL: add column typo example #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

shiyuhang0
Copy link
Collaborator

@shiyuhang0 shiyuhang0 commented Sep 28, 2023

How GitHub App works in this example

This example adds a new field called new_field in the user table. The first commit type the new_field as wrong_new_field and the second commit corrects it.

  1. The test in GitHub action will fail in the first commit because of the wrong field name.

image
image

  1. The test in GitHub action will succeed in the second commit which we fix the bug.

image

Summarize

In this example:

  1. The branch helps us find the wrong DDL in the first commit, and it will not be applied to the production database.
  2. We can not execute such a test in a new database without branch. Because the AutoMigrate always loads the whole fields, causing an error in the new added DDL.

@tidb-cloud-branching
Copy link

tidb-cloud-branching bot commented Sep 28, 2023

The latest updates on TiDB Serverless Branch. Learn more about branching GitHub integration↗︎

BranchName ClusterID Status Updated
column_typo_example_1_482c9dd 1379661944646224784 READY 2023-09-28T05:10:42Z

@shiyuhang0 shiyuhang0 force-pushed the column_typo_example branch 3 times, most recently from b073bf7 to 7f3e350 Compare September 28, 2023 05:01
@shiyuhang0 shiyuhang0 changed the title Add new field in user table DDL: add column typo example Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant