Skip to main content
All CollectionsIntegrations
Git Integration - GitLab
Git Integration - GitLab

Enable version control through the GitLab repository

SqlDBM Support avatar
Written by SqlDBM Support
Updated this week

User Connections will soon replace Integrations

To continue using Push to git functionality, each user will have to configure their git integration in User Connections and provide their own personal access token. This functionality will no longer be limited to admins.

  • The feature is only available to users with Account Admin privileges.

This feature may not be supported for all license types. Please contact your account manager to find out more.

Once the integration has been configured, see the related article on using this feature and the various ways of generating the files themselves.

To enable version control through the GitLab repository, you will need to create a Personal Access Token and link it with SqlDBM using the steps below.

The end-to-end setup can be seen in the following video or through the steps covered below in this guide.

Please make sure to initialize your repository by creating at least one file in the main branch (Readme.md for example).

  1. Go to GitLab. Create or choose an organization.

  2. Create a Personal Access Token.

    1. Ensure that "Role" is set to "Developer" or above.

    2. If specifying an expiration date, make sure to set a reminder to avoid losing access.

Go to: User settings โ†’ Access Tokens
Once created, make sure to copy the above token. GitLab doesn't store it, and you will not be able to see it again.

  • Token must have read & write permissions or full access.

  • If you want to create pull requests while pushing, there should be no restrictions on creating a pull request for the user who created the token.

  • Note the expiration period. When it expires, the token will no longer be valid, and the integration will break.

3. Open the SqlDBM Account - User Connections - page in a different browser tab.

4. Choose the "Gitlab" option.

5. Enter your token in the "Personal Access Token" field.

6. Open GitLab again and create a repository.

7. Copy the link with HTTPS.

8. Open SqlDBM "Integrations" with the specified token.

9. Select a project.

10.Specify the repository URL.

11. Select users who will have push permissions (modelers or project owner only.)

12. Unmark the checkbox if you don't need to create pull requests.

13. Click Connect Integration button.

14. Done.

Notice, you can add links only to those repositories that are related to the organization under the specified Personal Acess Token.

Project users will now see a "Push to GitLab" button on the Forward engineering page. It will become active after generating DDL through Create or Alter scripts.

The same behavior in the DataOps page (alter script popup).

After a successful push request, find your script in the repository files:
Code -> Overview -> Your branch -> Branch name -> there should be a commit with your SQL script.

Otherwise, if you selected the 'Create Pull Request' option in the Integration page, go to: Merge requests/open.

See also:

Did this answer your question?