Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (23 sloc) 457 Bytes
require "sequel"
db = Sequel.sqlite "hangman.db"
db.create_table :games do
primary_key :id
String :token
Integer :word_id
Boolean :finished
end
db.create_table :words do
primary_key :id
String :content
end
db.create_table :guesses do
primary_key :id
Integer :game_id
String :letter
end
db.create_table :matches do
primary_key :id
Integer :game_id
Integer :guess_id
Integer :position
end