1// +build ignore 2// This file and its contents are licensed under the Apache License 2.0. 3// Please see the included NOTICE for copyright information and 4// LICENSE for a copy of the license. 5 6// This file is a binary that generates migration_files_generated.go 7// it is not built by default, but rather invoked by the go:generate command 8// defined in migrations.go 9package main 10 11import ( 12 "log" 13 "net/http" 14 15 "github.com/shurcooL/vfsgen" 16 "github.com/timescale/promscale/pkg/migrations" 17) 18 19var Assets http.FileSystem = migrations.NewModTimeFs(http.Dir("sql")) 20 21func main() { 22 err := vfsgen.Generate(Assets, vfsgen.Options{ 23 Filename: "migration_files_generated.go", 24 PackageName: "migrations", 25 VariableName: "MigrationFiles", 26 }) 27 if err != nil { 28 log.Fatalln(err) 29 } 30} 31