Yesterday’s Note for Dense Summer Interns got us thinking about the future. The way I fixed yesterday’s error was to delete the table, allowing Hibernate to re-create it, this time with the correct property tag.
In a production environment, this could have less than desirable, perhaps even catastrophic consequences. For example, had the table I deleted contained the validation information for real users’ pending accounts, they would have found themselves unable to get their accounts working. For bigger databases, say, those that store our prayer requests, we would wipe every users’ data from memory if we made the change by this method.
What we need is some way to submit our database schemata, tables, and properties to version control.
We thought at first that we would have to design our own tool for this, but an hour or so of online digging turned up enough software already available to make a google notebook look crowded. We are currently trying out a couple of database diff tools. Tomorrow, we intend to alter some of the database properties on the local version of the app, and use diff tools to generate the SQL script to update the web-deployed app.
Today’s Terminal command: ‘ps -ef |grep’, ‘kill’, and ‘kill -9′
Is there a pesky project on your Linux box that just won’t go away? Use ps -ef in conjunction with |grep (“pipe grep”) followed by the name of the process you want to end. This will search for processes running under this name and display the process number. Type the ‘kill’ command, followed by the number of the process you want to destroy, and viola, it’s gone. If even that won’t kill it, try using the ‘kill -9′ command. Followed by the process number, this closes the process and all children processes. Something like killing a cat nine times. Not only do these commands instill a sense of power in the user, they are also great for accidentally crashing your machine.
Filed under: Jobber's Log | Tagged: Database, Diff Tools, SQL, Version Control
