Skip to content

Commit 7e50bff

Browse files
committed
feat(db): add migrations folder support to load SQL files via .Files.Glob pattern
1 parent cc4ee2b commit 7e50bff

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

charts/supabase/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.2.2
18+
version: 0.2.3
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
2424
# Not used because too difficult to follow correctly
25-
# appVersion: "1.16.0"
25+
# appVersion: "1.16.0
2626

2727
# A URL to an SVG or PNG image to be used as an icon
2828
icon: https://avatars.githubusercontent.com/u/54469796?s=280&v=4
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.sql

charts/supabase/templates/db/migration.config.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,11 @@ metadata:
66
labels:
77
{{- include "supabase.labels" . | nindent 4 }}
88
data:
9-
{{- toYaml .Values.db.config | nindent 2 }}
9+
{{- range $path, $_ := .Files.Glob "migrations/*.sql" }}
10+
{{ base $path }}: |
11+
{{ $.Files.Get $path | indent 4 }}
1012
{{- end }}
13+
{{- if .Values.db.config }}
14+
{{- toYaml .Values.db.config | nindent 2 }}
15+
{{- end }}
16+
{{- end }}

0 commit comments

Comments
 (0)