The script should be given a base branch to compare against, if not set
it defaults to main. The script will apply the schema migrations for
both the base branch and the current commit and generate dumps that are
then compared to create a diff. The dumps are left in a temporary
directory so that they can be compared using a users preferred diff tool.
For example, generate the dumps and diff against main
./scripts/schema-diff.sh main
Examine the diff to database functions using delta:
delta .schema-diff/funcs_$(git rev-parse main) .schema-diff/funcs_$(git rev-parse HEAD)
This also adds a github action that runs the script on pull-requests
that contain schema changes and reports the diffs as a comment on the
pull-request.
Co-authored-by: Hugo Vieira <hugoamvieira@users.noreply.github.com>
148 lines
1.8 KiB
Plaintext
148 lines
1.8 KiB
Plaintext
# Folders
|
|
_obj
|
|
_test
|
|
.cover
|
|
|
|
# IntelliJ IDEA project files
|
|
.idea
|
|
*.ipr
|
|
*.iml
|
|
*.iws
|
|
|
|
### Logs ###
|
|
*.log
|
|
logs/
|
|
|
|
### direnv ###
|
|
.envrc
|
|
.direnv/
|
|
|
|
### Temp directories ###
|
|
tmp/
|
|
temp/
|
|
|
|
### Visual Studio ###
|
|
.vscode/
|
|
|
|
### macOS ###
|
|
# General
|
|
.DS_Store
|
|
.AppleDouble
|
|
.LSOverride
|
|
|
|
# Icon must end with two \r
|
|
Icon
|
|
|
|
|
|
# Thumbnails
|
|
._*
|
|
|
|
### Git ###
|
|
# Created by git for backups. To disable backups in Git:
|
|
# $ git config --global mergetool.keepBackup false
|
|
*.orig
|
|
|
|
# Created by git when using merge tools for conflicts
|
|
*.BACKUP.*
|
|
*.BASE.*
|
|
*.LOCAL.*
|
|
*.REMOTE.*
|
|
*_BACKUP_*.txt
|
|
*_BASE_*.txt
|
|
*_LOCAL_*.txt
|
|
*_REMOTE_*.txt
|
|
|
|
### Go ###
|
|
# Binaries for programs and plugins
|
|
*.exe
|
|
*.exe~
|
|
*.dll
|
|
*.so
|
|
*.dylib
|
|
|
|
# Test binary, built with `go test -c`
|
|
*.test
|
|
|
|
# Output of the go coverage tool, specifically when used with LiteIDE
|
|
*.out
|
|
|
|
### Tags ###
|
|
# Ignore tags created by etags, ctags, gtags (GNU global) and cscope
|
|
TAGS
|
|
.TAGS
|
|
!TAGS/
|
|
tags
|
|
.tags
|
|
!tags/
|
|
gtags.files
|
|
GTAGS
|
|
GRTAGS
|
|
GPATH
|
|
GSYMS
|
|
cscope.files
|
|
cscope.out
|
|
cscope.in.out
|
|
cscope.po.out
|
|
|
|
### Vagrant ###
|
|
# General
|
|
.vagrant/
|
|
|
|
# Log files (if you are creating logs in debug mode, uncomment this)
|
|
# *.log
|
|
|
|
### Vagrant Patch ###
|
|
*.box
|
|
|
|
### Vim ###
|
|
# Swap
|
|
[._]*.s[a-v][a-z]
|
|
[._]*.sw[a-p]
|
|
[._]s[a-rt-v][a-z]
|
|
[._]ss[a-gi-z]
|
|
[._]sw[a-p]
|
|
|
|
# Session
|
|
Session.vim
|
|
Sessionx.vim
|
|
|
|
# Temporary
|
|
.netrwhist
|
|
*~
|
|
|
|
# Auto-generated tag files
|
|
# Persistent undo
|
|
[._]*.un~
|
|
|
|
# Compilation outputs
|
|
main
|
|
/pkg/
|
|
/bin/
|
|
update-ui-assets*
|
|
/plugins/kms/assets/boundary-plugin*
|
|
/plugins/host/assets/boundary-plugin*
|
|
|
|
# Test config file
|
|
test*.hcl
|
|
|
|
# Enos
|
|
/enos/**/.enos
|
|
/enos/terraform-plugin-cache
|
|
/enos/*.zip
|
|
/enos/support
|
|
# Enos local Terraform files
|
|
enos/.terraform/*
|
|
enos/.terraform.lock.hcl
|
|
enos/*.tfstate
|
|
enos/*.tfstate.*
|
|
enos/ci/*/.terraform/*
|
|
enos/ci/*/.terraform.lock.hcl
|
|
# vim: set filetype=conf :
|
|
|
|
# CRT (Common Release Tooling)
|
|
!.release/ci.hcl
|
|
dist
|
|
out
|
|
|
|
.schema-diff/
|