Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
cf8fdd4
Initial pass of moving from gorm to golang-migrate + sqlc
iplay88keys Mar 27, 2026
fbde2c7
Remove unnecessary timout change
iplay88keys Mar 27, 2026
7f5d714
Use pgx instead of lib/sql
iplay88keys Mar 30, 2026
0e3e1e9
Merge branch 'main' into iplay88keys/replace-gorm-with-sqlc-migrations
iplay88keys Mar 30, 2026
3421e26
Simplify migrations by requiring kagent 0.8.0+ before upgrade
iplay88keys Mar 30, 2026
9951ef0
Better matching of what GORM produces for initial migrations
iplay88keys Mar 30, 2026
2707135
Merge branch 'main' into iplay88keys/replace-gorm-with-sqlc-migrations
iplay88keys Mar 30, 2026
81c041d
Remove github workflow check for migration changes on 0.7.x release b…
iplay88keys Mar 30, 2026
e9aa20d
Add new db migrations skill info and add force command to migrator
iplay88keys Mar 31, 2026
e4bd217
Remove temporary upgrade test
iplay88keys Mar 31, 2026
1d5564d
Merge branch 'main' into iplay88keys/replace-gorm-with-sqlc-migrations
iplay88keys Mar 31, 2026
7034b1c
Switch to using in-app migration with extension
iplay88keys Apr 1, 2026
bb1281d
Updates based on review and sqlc generate
iplay88keys Apr 1, 2026
6ddc959
Add additional checks and update skills for migration safety
iplay88keys Apr 2, 2026
d0b1a53
Merge branch 'main' into iplay88keys/replace-gorm-with-sqlc-migrations
iplay88keys Apr 3, 2026
5d08355
Updates to simplify
iplay88keys Apr 3, 2026
217a91b
Remove unused code
iplay88keys Apr 3, 2026
b093c8b
Merge branch 'main' into iplay88keys/replace-gorm-with-sqlc-migrations
iplay88keys Apr 3, 2026
46f9fb7
Updates based on review
iplay88keys Apr 3, 2026
ffcafc0
Small update
iplay88keys Apr 3, 2026
f54084a
Split out a few column modifications to bring gorm in-line with clean…
iplay88keys Apr 3, 2026
ede7508
Check vector plugin before migrations and don't drop db on initial/up…
iplay88keys Apr 6, 2026
cf05a35
Add flag to allow for rolling back on initial migrations
iplay88keys Apr 6, 2026
3338c5d
Remove flag for rolling back initial migrations
iplay88keys Apr 6, 2026
f41fca4
Merge branch 'main' into iplay88keys/replace-gorm-with-sqlc-migrations
iplay88keys Apr 6, 2026
97f414c
Remove stale reference in comment
iplay88keys Apr 6, 2026
8d934bd
Fix unit tests and add a few more for the migration runner
iplay88keys Apr 6, 2026
f28d679
Address feedback comments
iplay88keys Apr 7, 2026
b701aba
Merge branch 'main' into iplay88keys/replace-gorm-with-sqlc-migrations
EItanya Apr 7, 2026
c9736b9
Add sqlc-generate make target, update ci, and run generate
iplay88keys Apr 7, 2026
ddefb70
Merge branch 'main' into iplay88keys/replace-gorm-with-sqlc-migrations
EItanya Apr 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/migration-immutability.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Migration Immutability

on:
pull_request:
branches: [main, release/v0.7.x]
paths:
- "go/core/pkg/migrations/**"

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Fail if any existing migration file was modified
run: |
# List files under go/core/pkg/migrations/ that were changed relative
# to the merge base of this PR. We only care about modifications (M)
# and renames (R); additions (A) are fine.
BASE=$(git merge-base HEAD origin/${{ github.base_ref }})
MODIFIED=$(git diff --name-only --diff-filter=MR "$BASE" HEAD \
-- 'go/core/pkg/migrations/**/*.sql')

if [ -n "$MODIFIED" ]; then
echo "ERROR: The following migration files were modified."
echo "Migration files are immutable once merged."
echo "Fix bugs with a new migration instead."
echo ""
echo "$MODIFIED"
exit 1
fi

echo "OK: no existing migration files were modified."
1 change: 1 addition & 0 deletions .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
matrix:
image:
- controller
- migrate
- ui
- app
- golang-adk
Expand Down
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,23 @@ APP_IMAGE_NAME ?= app
KAGENT_ADK_IMAGE_NAME ?= kagent-adk
GOLANG_ADK_IMAGE_NAME ?= golang-adk
SKILLS_INIT_IMAGE_NAME ?= skills-init
MIGRATE_IMAGE_NAME ?= migrate

CONTROLLER_IMAGE_TAG ?= $(VERSION)
UI_IMAGE_TAG ?= $(VERSION)
APP_IMAGE_TAG ?= $(VERSION)
KAGENT_ADK_IMAGE_TAG ?= $(VERSION)
GOLANG_ADK_IMAGE_TAG ?= $(VERSION)
SKILLS_INIT_IMAGE_TAG ?= $(VERSION)
MIGRATE_IMAGE_TAG ?= $(VERSION)

CONTROLLER_IMG ?= $(DOCKER_REGISTRY)/$(DOCKER_REPO)/$(CONTROLLER_IMAGE_NAME):$(CONTROLLER_IMAGE_TAG)
UI_IMG ?= $(DOCKER_REGISTRY)/$(DOCKER_REPO)/$(UI_IMAGE_NAME):$(UI_IMAGE_TAG)
APP_IMG ?= $(DOCKER_REGISTRY)/$(DOCKER_REPO)/$(APP_IMAGE_NAME):$(APP_IMAGE_TAG)
KAGENT_ADK_IMG ?= $(DOCKER_REGISTRY)/$(DOCKER_REPO)/$(KAGENT_ADK_IMAGE_NAME):$(KAGENT_ADK_IMAGE_TAG)
GOLANG_ADK_IMG ?= $(DOCKER_REGISTRY)/$(DOCKER_REPO)/$(GOLANG_ADK_IMAGE_NAME):$(GOLANG_ADK_IMAGE_TAG)
SKILLS_INIT_IMG ?= $(DOCKER_REGISTRY)/$(DOCKER_REPO)/$(SKILLS_INIT_IMAGE_NAME):$(SKILLS_INIT_IMAGE_TAG)
MIGRATE_IMG ?= $(DOCKER_REGISTRY)/$(DOCKER_REPO)/$(MIGRATE_IMAGE_NAME):$(MIGRATE_IMAGE_TAG)

#take from go/go.mod
AWK ?= $(shell command -v gawk || command -v awk)
Expand Down Expand Up @@ -219,7 +222,7 @@ prune-docker-images:
docker images --filter dangling=true -q | xargs -r docker rmi || :

.PHONY: build
build: buildx-create build-controller build-ui build-app build-golang-adk build-skills-init
build: buildx-create build-controller build-migrate build-ui build-app build-golang-adk build-skills-init
@echo "Build completed successfully."
@echo "Controller Image: $(CONTROLLER_IMG)"
@echo "UI Image: $(UI_IMG)"
Expand Down Expand Up @@ -267,6 +270,10 @@ controller-manifests:
build-controller: buildx-create controller-manifests
$(DOCKER_BUILDER) build $(DOCKER_BUILD_ARGS) $(TOOLS_IMAGE_BUILD_ARGS) --build-arg BUILD_PACKAGE=core/cmd/controller/main.go -t $(CONTROLLER_IMG) -f go/Dockerfile ./go

.PHONY: build-migrate
build-migrate: buildx-create
$(DOCKER_BUILDER) build $(DOCKER_BUILD_ARGS) $(TOOLS_IMAGE_BUILD_ARGS) --build-arg BUILD_PACKAGE=core/cmd/migrate/main.go -t $(MIGRATE_IMG) -f go/Dockerfile ./go

.PHONY: build-ui
build-ui: buildx-create
$(DOCKER_BUILDER) build $(DOCKER_BUILD_ARGS) $(TOOLS_IMAGE_BUILD_ARGS) -t $(UI_IMG) -f ui/Dockerfile ./ui
Expand Down
Loading
Loading