Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadSchema ¶
LoadSchema runs database migrations using fern-reporter's embedded migration files
func SeedFlakyTests ¶
func LoadSchema(ctx context.Context, db *pgxpool.Pool) error {
driver, _ := postgres.WithInstance(db, &postgres.Config{})
source, _ := iofs.New(fernmigrations.Migrations, ".")
m, _ := migrate.NewWithInstance("iofs", source, "postgres", driver)
return m.Up()
// path, _ := filepath.Abs("fixtures/schema.sql")
// schemaBytes, err := os.ReadFile(path)
// if err != nil {
// return err
// }
// _, err = db.Exec(ctx, string(schemaBytes))
// return err
}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.