Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixup migration

  • Loading branch information...
commit 3729771c09f4cfecb292aeb13d74e0280f7e6b52 1 parent dbbe2c0
@jackdempsey authored
Showing with 6 additions and 7 deletions.
  1. +6 −7 lib/sequel_taggable/migration.rb
View
13 lib/sequel_taggable/migration.rb
@@ -2,19 +2,18 @@ class CreateTags < Sequel::Migration
def up
create_table :tags do
primary_key :id, :integer, :auto_increment => true
- integer :tag_id
- varchar :name
-
- index :tag_id
+ varchar :name, :null => false
end
create_table :taggings do
primary_key :id, :integer, :auto_increment => true
- integer :taggable_id
- varchar :taggable_type
+ integer :tag_id, :null => false
+ integer :taggable_id, :null => false
+ varchar :taggable_type, :null => false
+ varchar :tag_context, :null => false
datetime :created_at
- index [:taggable_id, :taggable_type]
+ index [:tag_id, :taggable_id, :taggable_type]
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.