From 4cb6a5952f341741ef2728fb39acb7f19de61ba9 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sun, 31 May 2026 18:13:15 +0200 Subject: Add migration reading This prepares the infrastructure to place migration SQL code in the source repository with paths formatted as `sql/migrations/%04d.sqlite3`. The numbers need to be counting up from 1. They are embedded with Go's embed package and are parsed into a slice of strings where the migration number minus one is the slice index and the value is the migrations file as string. This makes handling of migrations in code as easy as possible. This commit adds also tests for this functionality. --- meson.build | 1 + 1 file changed, 1 insertion(+) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 0bd75d3..ba66106 100644 --- a/meson.build +++ b/meson.build @@ -11,6 +11,7 @@ finserv_linux_amd64 = custom_target( input : [ meson.current_source_dir() / 'main.go', meson.current_source_dir() / 'handlers.go', + meson.current_source_dir() / 'database.go', ], output : 'finserv-linux-amd64', env : {'GOOS': 'linux', 'GOARCH': 'amd64'}, -- cgit v1.3.1