schema

package
v0.0.0-...-4313cc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SchemasFS embed.FS

SchemasFS holds the embedded Fluxbase internal schema SQL files. These files are baked into the binary and extracted to a temporary directory at runtime so they work regardless of deployment path.

Functions

func ExtractSchemas

func ExtractSchemas() (string, error)

ExtractSchemas writes all embedded schema SQL files to a temporary directory and returns the path to that directory. The caller should call Cleanup when done.

func MakeSQLIdempotent

func MakeSQLIdempotent(sql string) string

MakeSQLIdempotent transforms SQL to be idempotent by prepending DROP IF EXISTS statements before CREATE POLICY and ALTER TABLE ADD CONSTRAINT statements. This allows schema SQL files to be safely re-applied to existing databases.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL