Skip to content

Commit 86ecc22

Browse files
committed
move migrations to where they can be embedded
1 parent 30c9478 commit 86ecc22

File tree

12 files changed

+14
-14
lines changed

12 files changed

+14
-14
lines changed

taco/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ atlas-diff-all: ## Generate migrations for all databases (use: make atlas-diff-a
111111
echo "⚠️ Using auto-generated name: $(NAME)"; \
112112
echo "💡 Tip: Use 'make atlas-diff-all name=descriptive_name' for better naming"; \
113113
fi
114-
@mkdir -p migrations/postgres migrations/mysql migrations/sqlite
114+
@mkdir -p internal/query/migration/atlas/migrations/postgres internal/query/migration/atlas/migrations/mysql internal/query/migration/atlas/migrations/sqlite
115115
@echo "\n📊 PostgreSQL..." && atlas migrate diff $(NAME) --env postgres
116116
@echo "\n📊 MySQL..." && atlas migrate diff $(NAME) --env mysql
117117
@echo "\n📊 SQLite..." && atlas migrate diff $(NAME) --env sqlite
@@ -129,6 +129,6 @@ atlas-lint-all: ## Validate and lint all migration files
129129

130130
# Update migration directory hashes (called automatically by atlas-diff-all)
131131
atlas-hash-all:
132-
@atlas migrate hash --dir file://migrations/postgres 2>/dev/null || true
133-
@atlas migrate hash --dir file://migrations/mysql 2>/dev/null || true
134-
@atlas migrate hash --dir file://migrations/sqlite 2>/dev/null || true
132+
@atlas migrate hash --dir file://internal/query/migration/atlas/migrations/postgres 2>/dev/null || true
133+
@atlas migrate hash --dir file://internal/query/migration/atlas/migrations/mysql 2>/dev/null || true
134+
@atlas migrate hash --dir file://internal/query/migration/atlas/migrations/sqlite 2>/dev/null || true

taco/atlas.hcl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ variable "DB_URL" {
55

66
variable "POSTGRES_MIGRATIONS_DIR" {
77
type = string
8-
default = "file://migrations/postgres"
8+
default = "file://internal/query/migration/atlas/migrations/postgres"
99
}
1010

1111
variable "MYSQL_MIGRATIONS_DIR" {
1212
type = string
13-
default = "file://migrations/mysql"
13+
default = "file://internal/query/migration/atlas/migrations/mysql"
1414
}
1515

1616
variable "SQLITE_MIGRATIONS_DIR" {
1717
type = string
18-
default = "file://migrations/sqlite"
18+
default = "file://internal/query/migration/atlas/migrations/sqlite"
1919
}
2020

2121
data "external_schema" "gorm_postgres" {
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
h1:TqWsSSrvStVJy99B0M6Vov+q8i0BUboyMpjB6QfgC48=
2+
20251024212103_20251024142054.sql h1:Ssf6f2bT1UPjppPHz6RXx5CUEPeJ9Yzd1AKkCjinIkw=
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
h1:W16VbKbaAbfAF5Nc1s+GUsf3YnAexb7gIwfbdBTZun0=
2+
20251024212059_20251024142054.sql h1:49FDG7WvsrG78nflUczSGv+E8GFmPtsyPL8rbgDSCW0=
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
h1:mQg5smP8RIJOKoW0nsLZ3KIjX7EPC889CFlhauHzYIU=
2+
20251024212104_20251024142054.sql h1:MI4PJhmXjDTY3GA06AgVLttdSlicPLEcP3ZeWvb4M+8=

taco/internal/query/migration/atlas/migrator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"gorm.io/gorm"
1616
)
1717

18-
//go:embed ../../../../../migrations
18+
//go:embed migrations
1919
var migrationsFS embed.FS
2020

2121
// Migration directory paths (embedded in binary)

taco/migrations/mysql/atlas.sum

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)