widefix / actual_db_schema

Wipe out inconsistent DB and schema.rb when switching branches. To do that, install this gem and use the standard rake db:migrate command.
https://blog.widefix.com/actual-db-schema/
MIT License
295 stars 6 forks source link

Add migrations controller #73

Closed VladislavSokov closed 2 months ago

VladislavSokov commented 2 months ago
VladislavSokov commented 2 months ago

image

VladislavSokov commented 2 months ago

image

ka8725 commented 2 months ago

@VladislavSokov is there a point in showing a phantom migration that's down? When can it be useful and why?

image
VladislavSokov commented 2 months ago

@VladislavSokov is there a point in showing a phantom migration that's down? When can it be useful and why?

On the migrations page, we display all migrations, regardless of their status or type. I think a developer should see such a list somewhere. However, on the phantom_migrations page, we only show phantom migrations with a status of "up."

ka8725 commented 2 months ago

@VladislavSokov another question - what will happen if irreversible migration is tried to rollback via UI? Is UI ready for that scenario (at least showing a meaningful error for user)?

VladislavSokov commented 2 months ago

@VladislavSokov another question - what will happen if irreversible migration is tried to rollback via UI? Is UI ready for that scenario (at least showing a meaningful error for user)?

It's a good question. I'll handle it.

ka8725 commented 2 months ago

@VladislavSokov can the tests improvements changes be removed from here? They were in a separate PR