feat(legacy): helpers: update log, unefficient but works
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -1 +1 @@
|
||||
migrator list
|
||||
#migrator list
|
||||
|
||||
Reference in New Issue
Block a user