Method: Mongrel2::Config.init_database!
- Defined in:
- lib/mongrel2/config.rb
.init_database! ⇒ Object
Initialize the currently-configured database, dropping any existing tables.
210 211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/mongrel2/config.rb', line 210 def self::init_database! sql = self.load_config_schema mimetypes_sql = self.load_mimetypes_sql self.log.warn "Installing config schema." self.db.execute_ddl( sql ) self.db.run( mimetypes_sql ) # Force the associations to reset self.db = db self.log_action( "Initialized the config database." ) end |