From bf5c3435155c0ee9c2172bea6b6b3c5dec2c2463 Mon Sep 17 00:00:00 2001 From: mo khan Date: Fri, 21 Feb 2014 22:40:59 -0700 Subject: use a uuid as the primary key for locations. --- db/migrate/20140222053352_create_locations.rb | 2 +- db/schema.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'db') diff --git a/db/migrate/20140222053352_create_locations.rb b/db/migrate/20140222053352_create_locations.rb index c5faa93..fb2bca2 100644 --- a/db/migrate/20140222053352_create_locations.rb +++ b/db/migrate/20140222053352_create_locations.rb @@ -1,6 +1,6 @@ class CreateLocations < ActiveRecord::Migration def change - create_table :locations do |t| + create_table :locations, id: :uuid do |t| t.uuid :license_id t.float :latitude t.float :longitude diff --git a/db/schema.rb b/db/schema.rb index f34633a..c9d8190 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -33,7 +33,7 @@ ActiveRecord::Schema.define(version: 20140222053352) do t.integer "well_type_id" end - create_table "locations", force: true do |t| + create_table "locations", id: :uuid, default: "uuid_generate_v4()", force: true do |t| t.uuid "license_id" t.float "latitude" t.float "longitude" -- cgit v1.2.3