Module: Imba::DataStore
- Defined in:
- lib/imba/data_store.rb
Class Method Summary collapse
Class Method Details
.init ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/imba/data_store.rb', line 4 def init ActiveRecord::Base.establish_connection( adapter: 'sqlite3', database: "#{DIRECTORY}/data.sqlite3", pool: 5, timeout: 5000 ) end |
.migrate ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/imba/data_store.rb', line 13 def migrate ActiveRecord::Schema.define do create_table :movies do |t| t.integer :uniq_id t.string :name t.string :year t.text :genres t.float :rating end end end |