Class: Rails::DataMapper::Storage::Postgres

Inherits:
Rails::DataMapper::Storage show all
Defined in:
lib/dm-rails/storage.rb

Instance Attribute Summary

Attributes inherited from Rails::DataMapper::Storage

#config, #name

Instance Method Summary collapse

Methods inherited from Rails::DataMapper::Storage

#charset, #create, create_all, create_environment, #create_message, #database, #drop, drop_all, drop_environment, #drop_message, #initialize, new, #password, #username

Constructor Details

This class inherits a constructor from Rails::DataMapper::Storage

Instance Method Details

#_createObject



186
187
188
189
190
191
192
193
194
195
# File 'lib/dm-rails/storage.rb', line 186

def _create
  system(
    'createdb',
    '-E',
    charset,
    '-U',
    username,
    database
  )
end

#_dropObject



197
198
199
200
201
202
203
204
# File 'lib/dm-rails/storage.rb', line 197

def _drop
  system(
    'dropdb',
    '-U',
    username,
    database
  )
end