Tag Archive for 'regular-expressions'

Adventures With s/re/g

January 29th, 2008 by peasleer

While working on our independent study, Dave suggested we use foreign keys to establish relationships between our databases. We were using the MyISAM engine by default, which doesn’t support foreign keys. The fix to the problem was simple. Since our database doesn’t have much useful data in it, popping open the createdb.sql script we are using in Vim and issuing one quick command took care of everything:

:%s/);/) ENGINE=InnoDB;/g

Now all of our tables are using the InnoDB storage engine. I love Vim!