-
-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to list ALL migrations considered by migratus #240
Comments
Feedback from Sean Corfield
|
pending list does not work quite as expected IMO.
So trying to
|
That makes sense to me, any chance you could do a PR for this? It should be a pretty simple addition, the migrations namespace has |
I also noticed that the commands to create a migration do not print out anything. |
From @yogthos , on Slack:
|
Oh yeah, adding a message for creating the files sounds like a good idea as well. |
Hi, i would like to work on this issue. migratus --config CONFIG init
migratus create NAME
migratus migrate
migratus migrate --until-just-before ID
migratus reset
migratus rollback
migratus rollback --until-just-after ID
migratus up IDS
migratus down IDS
migratus list list
filter
migratus list --filter=available format
migratus list
MIGRATION-ID DESCRIPTION APPLYED PATH
20231002193400 create-user 2023-10-02 16:06:33.594 path/to/file
20231102193400 articles 2023-11-02 16:06:33.594
20231202193400 create-user
20231204193400 articles What do you guys think? |
That sounds reasonable, I think maybe first step could be to handle this at the API level, and then add a CLI namespace that would allow running the commands from the command line. I think for the API part, I'd like to just keep adding flags to the existing config map. |
Hello, i have made a PR #244 with some work in progress. |
Hi, I have implemented a CLI option to set the log level with --verbose:
It could be valuable to be able to show in CLI more info when using migratus:
I propose to create another function, similar to migratus.database/completed-ids* -> completed* What do you think? |
I think a PR to add |
yeah that sounds good to me 👍 |
#251
It is a draft at the moment; Thanks. |
* BREAKING? Enhanced Store protocol with close alias for disconnect * BREAKING? connect now returns the store (this) * create (migration) fn now resolves absolute file path for migration * Enhanced docs for Store protocol * CLI can load config from file * CLI can load config from env * CLI can load config from cli args * CLI merges configs in this order: file, env, args * Added some tests for CLI parsing * Added status command, to display migration status: - connection info - so we know which server we are connecting to - migrations directory - so we know where we get migrations from - the latest applied migration - the list of not-applied migrations - any migrations applied and not present ?!
* BREAKING? Enhanced Store protocol with close alias for disconnect * BREAKING? connect now returns the store (this) * create (migration) fn now resolves absolute file path for migration * Enhanced docs for Store protocol * CLI can load config from file * CLI can load config from env * CLI can load config from cli args * CLI merges configs in this order: file, env, args * Added some tests for CLI parsing * Added status command, to display migration status: - connection info - so we know which server we are connecting to - migrations directory - so we know where we get migrations from - the latest applied migration - the list of not-applied migrations - any migrations applied and not present ?!
* BREAKING? Enhanced Store protocol with close alias for disconnect * BREAKING? connect now returns the store (this) * create (migration) fn now resolves absolute file path for migration * Enhanced docs for Store protocol * CLI can load config from file * CLI can load config from env * CLI can load config from cli args * CLI merges configs in this order: file, env, args * Added some tests for CLI parsing * Added status command, to display migration status: - connection info - so we know which server we are connecting to - migrations directory - so we know where we get migrations from - the latest applied migration - the list of not-applied migrations - any migrations applied and not present ?!
* Implemnted status command that works mostly like list
* BREAKING? Enhanced Store protocol with close alias for disconnect * BREAKING? connect now returns the store (this) * create (migration) fn now resolves absolute file path for migration * Enhanced docs for Store protocol * CLI can load config from file * CLI can load config from env * CLI can load config from cli args * CLI merges configs in this order: file, env, args * Added some tests for CLI parsing * Added status command, to display migration status: - connection info - so we know which server we are connecting to - migrations directory - so we know where we get migrations from - the latest applied migration - the list of not-applied migrations - any migrations applied and not present ?!
* Implemnted status command that works mostly like list
I think it would be very useful to have a way to list the migration ids that migratus knows about (maybe with file path?)
Migrations up / down can use the ID's but to my knowledge there is no easy way to print them.
I'm using clj-migratus, but I think this should be part of core and exposed in clj-migratus.
Searching the filesystem will not necessarily give me the migrations that migratus discovers / considers .
Brought this up on the list as well: https://clojurians.slack.com/archives/C1Q164V29/p1686770183348569
The text was updated successfully, but these errors were encountered: