summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20140222194718_add_location_id_to_licenses.rb6
-rw-r--r--db/schema.rb4
2 files changed, 8 insertions, 2 deletions
diff --git a/db/migrate/20140222194718_add_location_id_to_licenses.rb b/db/migrate/20140222194718_add_location_id_to_licenses.rb
new file mode 100644
index 0000000..067e7e4
--- /dev/null
+++ b/db/migrate/20140222194718_add_location_id_to_licenses.rb
@@ -0,0 +1,6 @@
+class AddLocationIdToLicenses < ActiveRecord::Migration
+ def change
+ add_column :licenses, :location_id, :uuid
+ remove_column :locations, :license_id
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index f102db8..b397f77 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20140222145409) do
+ActiveRecord::Schema.define(version: 20140222194718) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -32,10 +32,10 @@ ActiveRecord::Schema.define(version: 20140222145409) do
t.boolean "confidential", default: false
t.integer "well_type_id"
t.uuid "user_id"
+ t.uuid "location_id"
end
create_table "locations", id: :uuid, default: "uuid_generate_v4()", force: true do |t|
- t.uuid "license_id"
t.float "latitude"
t.float "longitude"
t.string "township"