feat(legacy): helpers: update log, unefficient but works

This commit is contained in:
2025-11-16 15:50:54 +00:00
parent 33cdebb64a
commit bb99ef9a8a
6 changed files with 243 additions and 29 deletions

View File

@@ -1,6 +1,16 @@
if ! migration_table_sql="$(migrator --inherits tablename --inherits 'table name' --init-dry-run)"; then
#!/bin/dash
log info "hectic.migration table inheritance"
if ! migration_table_sql="$(migrator --inherits tablename --inherits 'table name' init --dry-run)"; then
log error "test failed: error on migration table init dry run"
fi
printf '%s' "$migration_table_sql" | grep -Eq 'INHERITS[[:space:]]*\([[:space:]]*"tablename"[[:space:]]*,[[:space:]]*"table name"[[:space:]]*\)' ||
{ log error "not correct migration table inherits"; exit 1; }
log info "init"
if ! migrator --inherits tablename --inherits 'table name' init; then
log error "test failed: error on init sql"
fi
printf 'SELECT * FROM hectic.migration' | psql -v ON_ERROR_STOP=1 "$DATABASE_URL"

View File

@@ -1 +1 @@
migrator list
#migrator list