Release Database Changes from a Git Project
NineData lets you manage Git project files in SQL Console, compare file versions, generate change SQL, and submit the changes as an SQL Task, a Schema Design and Release task, or an existing Schema Design and Release task.
Before you begin
- Create a Git project that is accessible through HTTPS, and prepare a username and password or access token with access to the project.
- Create the data source where NineData will execute the changes.
- This feature currently targets relational databases. NoSQL, Elasticsearch, vector databases, and Milvus are outside the scope of this phase.
Step 1: Configure the Git project
Sign in to the NineData console and go to System > Git Config.
Click Add Git Config and configure the following fields.
Parameter Description Protocol Type Select Https.Name Enter the project name. Url Enter the HTTPS clone URL of the Git project. User Enter a username that can access the project. Password Enter the password or access token. Email Enter the email address used for Git commits. Complete the connection test in the form. After it succeeds, click Save. When the configuration is saved, NineData clones the Git project. The initial sync time depends on the project size.
Do not write a password or access token into an SQL file or commit it to the Git project. Use a least-privilege token that can be rotated regularly.
Step 2: Manage files in Git Workspace
Open SQL Console and switch to Workspace.
Select a Git project and target branch. If needed, click
Pullto synchronize the latest remote content.Open or edit the target file in the file tree. Git Workspace provides
Commit,Push, andPull. After completing local changes, runCommitfirst and thenPush.- When you select a branch, NineData checks out a locally cloned branch. A remote branch is pulled before it is checked out.
- Edits to multiple files update the local cache and can be consolidated into one commit. The page updates the server cache after a file loses focus or after a period without input.
- Git conflicts and Push or Pull errors are not resolved automatically in the page. Handle them according to the error returned by the current console.
Step 3: Generate change SQL
In Git Workspace, select the file versions to release and compare the versions.
Review the generated change SQL. Table files generate an incremental change script; non-table files generate a full change script.
Step 4: Submit the change task
Select one submission type.
Submission type Description Create an SQL task Carry the change SQL and current data-source information to create an SQL Task. Create a schema design and release task Carry the change SQL and current data-source information to create a Schema Design and Release task. Join an existing task Add the change SQL to an existing Schema Design and Release task. When adding to an existing task, confirm that the data source, database, and schema match the current environment and that the current user is a relevant person for the task. The target task must still be at its first node and must not be finished, terminated, or successful.
Verify the change SQL and target information, then click Submit and go. A new task takes you to the corresponding creation page. Adding to an existing task takes you to that Schema Design and Release task's details page.