Last active
August 29, 2015 14:22
Revisions
-
eval revised this gist
May 31, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,4 +4,5 @@ Gem::Specification.new do |s| s.version = '0.0.1' s.require_path = '.' s.add_dependency "sequel" s.add_dependency "sqlite3" end -
eval created this gist
May 31, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ 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" end This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ 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