Class: WordSmith::Migrations::Words
- Inherits:
-
Object
- Object
- WordSmith::Migrations::Words
- Defined in:
- lib/migrations/1_words.rb
Class Method Summary collapse
Class Method Details
.up ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/migrations/1_words.rb', line 9 def self.up Services::DB.instance.execute " CREATE TABLE IF NOT EXISTS words (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n word TEXT NOT NULL,\n pronunciation TEXT NOT NULL,\n meaning TEXT NOT NULL,\n example TEXT NOT NULL,\n context TEXT DEFAULT NULL,\n target_language TEXT DEFAULT NULL,\n translation_to_target_language TEXT DEFAULT NULL,\n created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n )\n SQL\nend\n" |