From 2be1e1c2bc313f586c4e0385d90a8cfbcd9ab609 Mon Sep 17 00:00:00 2001 From: Robert Date: Tue, 9 Jan 2018 15:49:02 +0100 Subject: Refs: #5505@1h; Spec discussed, model scaffolded [amend me] [skip-ci] --- db/migrate/20180109144120_create_custom_fields.rb | 14 ++++++++++++++ db/schema.rb | 13 ++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20180109144120_create_custom_fields.rb (limited to 'db') diff --git a/db/migrate/20180109144120_create_custom_fields.rb b/db/migrate/20180109144120_create_custom_fields.rb new file mode 100644 index 000000000..49df645c5 --- /dev/null +++ b/db/migrate/20180109144120_create_custom_fields.rb @@ -0,0 +1,14 @@ +class CreateCustomFields < ActiveRecord::Migration + def change + create_table :custom_fields do |t| + t.string :code + t.string :resource_type + t.string :name + t.string :field_type + t.json :options + t.bigint :workgroup_id + + t.timestamps null: false + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 19af8690b..99493260d 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: 20180109133022) do +ActiveRecord::Schema.define(version: 20180109144120) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -281,6 +281,17 @@ ActiveRecord::Schema.define(version: 20180109133022) do add_index "connection_links", ["objectid"], name: "connection_links_objectid_key", unique: true, using: :btree + create_table "custom_fields", id: :bigserial, force: :cascade do |t| + t.string "code" + t.string "resource_type" + t.string "name" + t.string "field_type" + t.json "options" + t.integer "workgroup_id", limit: 8 + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + create_table "exports", id: :bigserial, force: :cascade do |t| t.integer "referential_id", limit: 8 t.string "status" -- cgit v1.2.3