Skip to content

Commit

Permalink
fixup! Add access_token field to people table w/ tokens migration
Browse files Browse the repository at this point in the history
  • Loading branch information
jnv committed Sep 17, 2015
1 parent d37acbd commit 2b38ad3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db/migrate/1442325052_add_access_token_to_people.rb
Expand Up @@ -4,12 +4,12 @@
alter_table(:people) do
add_column :access_token, :uuid, default: Sequel.function(:gen_random_uuid), unique: true
end
self << <<-eos
self << <<-EOS
UPDATE people
SET access_token = tokens.uuid
FROM tokens
WHERE people.id = tokens.username
eos
EOS
end

down do
Expand Down

0 comments on commit 2b38ad3

Please sign in to comment.