diff options
| author | mo khan <mo@mokhan.ca> | 2014-02-21 22:57:51 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-02-21 22:57:51 -0700 |
| commit | 33cb4e479decb1f7e15048b8c81924fe7498aec1 (patch) | |
| tree | 0ce2c2e506e95fa2d1146e9b5505f0d718529bae /db | |
| parent | bf5c3435155c0ee9c2172bea6b6b3c5dec2c2463 (diff) | |
create users table and save applicant with the license.
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrate/20140222054248_create_users.rb | 8 | ||||
| -rw-r--r-- | db/migrate/20140222055630_add_applicant_to_licenses.rb | 5 | ||||
| -rw-r--r-- | db/schema.rb | 9 |
3 files changed, 21 insertions, 1 deletions
diff --git a/db/migrate/20140222054248_create_users.rb b/db/migrate/20140222054248_create_users.rb new file mode 100644 index 0000000..791bf2f --- /dev/null +++ b/db/migrate/20140222054248_create_users.rb @@ -0,0 +1,8 @@ +class CreateUsers < ActiveRecord::Migration + def change + create_table :users, id: :uuid do |t| + t.uuid :company_id + t.timestamps + end + end +end diff --git a/db/migrate/20140222055630_add_applicant_to_licenses.rb b/db/migrate/20140222055630_add_applicant_to_licenses.rb new file mode 100644 index 0000000..ca96b8f --- /dev/null +++ b/db/migrate/20140222055630_add_applicant_to_licenses.rb @@ -0,0 +1,5 @@ +class AddApplicantToLicenses < ActiveRecord::Migration + def change + add_column :licenses, :user_id, :uuid + end +end diff --git a/db/schema.rb b/db/schema.rb index c9d8190..d58c3ae 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: 20140222053352) do +ActiveRecord::Schema.define(version: 20140222055630) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -31,6 +31,7 @@ ActiveRecord::Schema.define(version: 20140222053352) do t.uuid "company_id" t.boolean "confidential", default: false t.integer "well_type_id" + t.uuid "user_id" end create_table "locations", id: :uuid, default: "uuid_generate_v4()", force: true do |t| @@ -42,6 +43,12 @@ ActiveRecord::Schema.define(version: 20140222053352) do t.datetime "updated_at" end + create_table "users", id: :uuid, default: "uuid_generate_v4()", force: true do |t| + t.uuid "company_id" + t.datetime "created_at" + t.datetime "updated_at" + end + create_table "well_types", force: true do |t| t.string "name" t.string "acronym" |
