Opened 15 years ago
Last modified 7 years ago
#122 reopened defect
scripts-remove doesn't delete Rails databases
Reported by: | adehnert | Owned by: | elefthei |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | autoinstallers | Keywords: | starter, shell |
Cc: |
Description
If you autoinstall a Rails app and then remove it, you'll still be left with the *_development, *_test, and *_production databases.
Attachments (1)
Change History (11)
comment:1 Changed 13 years ago by ezyang
- Keywords starter shell added
comment:2 Changed 12 years ago by elefthei
- Owner set to elefthei
- Status changed from new to assigned
comment:3 Changed 12 years ago by elefthei
comment:4 Changed 12 years ago by elefthei
- Resolution set to fixed
- Status changed from assigned to closed
comment:5 Changed 12 years ago by mitchb
- Resolution fixed deleted
- Status changed from closed to reopened
comment:6 Changed 12 years ago by achernya
As per conversation on zephyr, the current patch was NAK'd by Adam, as it hardcodes the rails databases. Instead, the database names should be pulled out from config/database.yml.
Also, it has bashisms in it, but we don't care as this is a bash script.
comment:7 Changed 12 years ago by geofft
Also a nitpick:
railsuffixes=( "test" "development" "production" ) for dbsuffix in ${railsuffixes[@]}; do
As a matter of quoting hygiene (though it doesn't really matter here), you should quote "${railsuffixes[@]}", and you don't need to quote the elements of the array. (Although for this, it's simpler to just say for dbsuffix in test development production, but you might end up changing that per Adam's suggestion.)
comment:8 Changed 12 years ago by elefthei
Note to future self; Pull db names from config/databases.yml instead of hardcoding them, to deal with potential updates in rails' policy.
Changed 12 years ago by elefthei
fixed version of scripts-remove that deletes rails dbs as documented on config/databases.yml
comment:9 Changed 7 years ago by elefthei
Ping? :P
comment:10 Changed 7 years ago by andersk
Ohai! Sorry we forgot about this. Now that we’ve moved to GitHub, are you interested in submitting this as a pull request to https://github.com/mit-scripts/scripts-locker?
Patch: http://web.mit.edu/elefthei/scripts-remove.patch