All Collections
Integrations
Pushing DDL code to a Repository
Pushing DDL code to a Repository

Options and naming conventions for git branches and file names

S
Written by Serge Gershkovich
Updated over a week ago

Once the integration has been configured between the SqlDBM project and a git repository (see links below), you will be able to push changes to your repository in single and/or multi-file formats.

The push to git function works in either single-file or multi-file options, which are described below. Both options work by creating a branch and (optionally) opening a pull/merge request.

Multi-file (Source DDL Files)

The Source DDL option is intended for pushing the complete (CREATE) object definition to git as a separate file and is, therefore, disabled for ALTER scripts. This integration pushes DDL for generated objects as individual files to a destination in the connected repository.

This option should be used if wishing to keep a parallel object history in git in addition to the project history enabled through SqlDBM project revisions.

Files

Files are created in the "SqlDBM/src" (default) subdirectory within the git repository and can be further segmented into subfolders by object type.

The subdirectories can be configured from the generation options.

Source files are named after their respective objects and do not follow a naming convention. Ex. the DWH.DIM_CUSTOMER table generates a "DWH.DIM_CUSTOMER.sql" file.

The full file list can be viewed using the "Preview" button.

Branches

Branches will be named in the following pattern:

  • Timestamp of date and time of creation: < yyyy/mm/dd_hh-mm-ss >

  • ex. "2022/11/29_16-41-20"

Pull/merge requests

Pull/merge requests will be named in the following pattern:

  • Generated by SqlDBM: <Project_Name> by <"user">

  • ex. Generated by SqlDBM: Sample_Project by Dave@Yew.inc

Single-file (Migrations)

Please refer to the respective product websites for instructions on how to set up these tools to perform automated deployments. Both tools use the same naming conventions detailed below.

This option will generate a single file (with multiple DML statements) within a branch. It is enabled for both create and alter scripts.

Both branch and file names will vary depending on whether generating create or alter SQL.

Files

Files are created in the "Migrations/" subdirectory within the git repository and follow the following naming pattern:

Create

  • Migrations/<version>__<Project_Name>_<version>.sql

  • ex. Migrations/V15__SampleProject_V15.sql

Alter

  • Migrations/<from_version>.<to_version>__<Project_Name>_<from_version>_vs_<to_version>.sql

  • ex. Migrations/V10.15__SampleProject_V10_vs_V15.sql

Branches

Branches will be named in the following pattern:

  • Timestamp of date and time of creation: < yyyy/mm/dd_hh-mm-ss >

  • ex. "2022/11/29_16-41-20"

Pull/merge requests

Pull/merge requests will be named in the following pattern:

Create

For create SQL, pull/merge requests will be named in the following pattern:

  • Generated by SqlDBM: <Project_Name> by <"user">

  • ex. Generated by SqlDBM: Sample_Project by Dave@Yew.inc

Alter

For alter SQL, pull/merge requests will be named in the following pattern:

  • Generated by SqlDBM: <Project_Name>_<from_version>_<to_version>_by <"user">

  • ex. Generated by SqlDBM: SampleProject_V10_vs_V15 by Dave@Yew.inc

See also:

Did this answer your question?