diff options
| author | mo khan <mo@mokhan.ca> | 2014-02-21 22:27:13 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-02-21 22:27:13 -0700 |
| commit | 60aa8fa77deaf9d4c90c1ede37caeeff13ee283d (patch) | |
| tree | 2e2783442eb09d58e4257bf4f256ecc4ce25aa6b /db | |
| parent | 476bee1ff1e1c0d4fe553898f5f029530a41919c (diff) | |
define well types table.
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrate/20140222051253_create_well_types.rb | 8 | ||||
| -rw-r--r-- | db/schema.rb | 7 | ||||
| -rw-r--r-- | db/seeds.rb | 10 |
3 files changed, 19 insertions, 6 deletions
diff --git a/db/migrate/20140222051253_create_well_types.rb b/db/migrate/20140222051253_create_well_types.rb new file mode 100644 index 0000000..aa22bca --- /dev/null +++ b/db/migrate/20140222051253_create_well_types.rb @@ -0,0 +1,8 @@ +class CreateWellTypes < ActiveRecord::Migration + def change + create_table :well_types do |t| + t.string :name + t.string :acronym + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 453bf07..aa1c471 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: 20140222032401) do +ActiveRecord::Schema.define(version: 20140222051253) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -32,4 +32,9 @@ ActiveRecord::Schema.define(version: 20140222032401) do t.boolean "confidential", default: false end + create_table "well_types", force: true do |t| + t.string "name" + t.string "acronym" + end + end diff --git a/db/seeds.rb b/db/seeds.rb index 4edb1e8..b9d9ff1 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -1,7 +1,7 @@ # This file should contain all the record creation needed to seed the database with its default values. # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). -# -# Examples: -# -# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) -# Mayor.create(name: 'Emanuel', city: cities.first) +WellType.create(id: 1, acronym: "NFW", name: "New Field Wildcat") unless WellType.exists?(1) +WellType.create(id: 2, acronym: "NPW", name: "New Pool Wildcat") unless WellType.exists?(2) +WellType.create(id: 3, acronym: "DPT", name: "Deeper Pool Test") unless WellType.exists?(3) +WellType.create(id: 4, acronym: "SPT", name: "Shallower Pool Test") unless WellType.exists?(4) +WellType.create(id: 5, acronym: "DEV", name: "Development Well") unless WellType.exists?(5) |
