purcell / postgresql-migrations

Simple Schema Migrations for PostgreSQL
MIT License
47 stars 2 forks source link

Better logging? #1

Open bnolan opened 6 years ago

bnolan commented 6 years ago

Would it be possible to get some better logging when running the migration?

psql:db/migrations.sql:60: NOTICE:  relation "applied_migrations" already exists, skipping
 apply_migration 
-----------------
 f
(1 row)

Maybe we could suppress the NOTICE and instead log out:

skipping migration abc
running migration xyz
running migration wuv

And maybe even print out the run time of each migration? 😲

ps: Awesome tool, really loving it.

purcell commented 6 years ago

Yeah, I'd like that too! Will see what I can do.

purcell commented 6 years ago

This is partly done in a8e5420, but the RAISE NOTICE output is kinda ugly, and so I'm only printing out the applied migrations, not the skipped ones.