Few fixes in scripts/add_migration.sh
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
6361ebbe76
commit
aed95202ce
@ -30,7 +30,7 @@ popd >/dev/null
|
||||
# echo "${SQL_FILES[@]}"
|
||||
|
||||
# Remove anything after first numbers
|
||||
MIGRATION_NUMBERS=("${SQL_FILES[@]%%*([!0-9])}")
|
||||
MIGRATION_NUMBERS=("${SQL_FILES[@]%%-*.sql}")
|
||||
|
||||
# echo "MIGRATION_NUMBERS: "
|
||||
# echo "${MIGRATION_NUMBERS[@]}"
|
||||
@ -61,4 +61,5 @@ LINE_TO_INSERT=" migs.add(include_file_migration!($NEXT_MIGRATION, \"$NEXT_MI
|
||||
|
||||
MIGRATIONS_RS="$PROJECT_ROOT/src/db.rs"
|
||||
echo "Inserting line in $MIGRATIONS_RS"
|
||||
sed -i "/INSERT MIGRATION ABOVE/i $LINE_TO_INSERT" "$MIGRATIONS_RS"
|
||||
sed -i "/INSERT MIGRATION ABOVE/i \
|
||||
$LINE_TO_INSERT" "$MIGRATIONS_RS"
|
||||
|
Loading…
x
Reference in New Issue
Block a user