Skip to content

Commit

Permalink
Add id to opt_links table
Browse files Browse the repository at this point in the history
The model gets real screwy without this. Should be backwards compatible.
  • Loading branch information
iangreenleaf committed Dec 7, 2015
1 parent 7062998 commit a854495
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions db/migrate/20151207075209_add_id_to_opt_links.rb
@@ -0,0 +1,5 @@
class AddIdToOptLinks < ActiveRecord::Migration
def change
add_column :opt_links, :id, :primary_key
end
end
4 changes: 2 additions & 2 deletions db/schema.rb
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20150912233905) do
ActiveRecord::Schema.define(version: 20151207075209) do

create_table "accounts", primary_key: "userid", force: :cascade do |t|
t.string "username", limit: 16, default: "", null: false
Expand Down Expand Up @@ -103,7 +103,7 @@
t.integer "version"
end

create_table "opt_links", id: false, force: :cascade do |t|
create_table "opt_links", force: :cascade do |t|
t.integer "userid", limit: 2, default: 0, null: false
t.integer "linknum", limit: 1
end
Expand Down

0 comments on commit a854495

Please sign in to comment.