Skip to content

Instantly share code, notes, and snippets.

@eval
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eval/4db895457e8b25c31037 to your computer and use it in GitHub Desktop.
Save eval/4db895457e8b25c31037 to your computer and use it in GitHub Desktop.
Gem::Specification.new do |s|
s.name = 'rubytapas-sequel'
s.description = 'Follow along with http://devblog.avdi.org/2015/05/26/rubytapas-freebie-sequel/'
s.version = '0.0.1'
s.require_path = '.'
s.add_dependency "sequel"
s.add_dependency "sqlite3"
end
require "sequel"
DB = Sequel.sqlite
DB.create_table :people do
primary_key :id
String :name
end
DB.create_table :items do
foreign_key :person_id, :people
String :name
Integer :quantity, default: 1
unique [:person_id, :name]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment