Module: Radd::Schema
- Defined in:
- lib/radd/schema.rb
Class Method Summary collapse
Class Method Details
.create ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/radd/schema.rb', line 3 def self.create if DB.table_exists?(:records) puts "Database #{Radd.db} exists" exit(1) end DB.create_table?(:records) do String :name, primary_key: true String :password_hash String :ip DateTime :updated_at end puts "Created database #{Radd.db}" end |