diff options
| author | mo khan <mo@mokhan.ca> | 2015-02-03 20:52:31 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2015-02-03 20:52:31 -0700 |
| commit | f73d0b92873a46d1fade3184c464b1bfe909fecb (patch) | |
| tree | 579f8c94504f809bb755bcb6fe2d415188385bfb /db | |
| parent | fe7d2f8b8d806c65899c42d215cdd1578b3a108d (diff) | |
add scaffold for dispositions.
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrate/20150204033540_create_dispositions.rb | 11 | ||||
| -rw-r--r-- | db/schema.rb | 9 |
2 files changed, 19 insertions, 1 deletions
diff --git a/db/migrate/20150204033540_create_dispositions.rb b/db/migrate/20150204033540_create_dispositions.rb new file mode 100644 index 0000000..32d8a68 --- /dev/null +++ b/db/migrate/20150204033540_create_dispositions.rb @@ -0,0 +1,11 @@ +class CreateDispositions < ActiveRecord::Migration + def change + create_table :dispositions, id: :uuid, default: 'uuid_generate_v4()' do |t| + t.string :fingerprint + t.integer :state + + t.timestamps null: false + end + add_index :dispositions, :fingerprint, unique: true + end +end diff --git a/db/schema.rb b/db/schema.rb index 1ca961b..1c756d5 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,12 +11,19 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20150203043317) do +ActiveRecord::Schema.define(version: 20150204033540) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" enable_extension "uuid-ossp" + create_table "dispositions", id: :uuid, default: "uuid_generate_v4()", force: :cascade do |t| + t.string "fingerprint" + t.integer "state" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + create_table "events", id: :uuid, default: "uuid_generate_v4()", force: :cascade do |t| t.string "name" t.json "data" |
