aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorcedricnjanga2018-01-23 22:46:16 -0800
committercedricnjanga2018-01-23 22:46:16 -0800
commit0f59b9c1d0133393f68194a366aafc27ca23392b (patch)
treeab04bbd04b977a683ee181f0b0bc38c47c2db7f0 /db
parent5ecadfdead964381304fcf56a2564e2045988ef7 (diff)
downloadchouette-core-0f59b9c1d0133393f68194a366aafc27ca23392b.tar.bz2
First draft for including calendars into workgroup for having appropriate scoping
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20180123174450_add_workgroup_id_to_calendars.rb6
-rw-r--r--db/schema.rb6
2 files changed, 10 insertions, 2 deletions
diff --git a/db/migrate/20180123174450_add_workgroup_id_to_calendars.rb b/db/migrate/20180123174450_add_workgroup_id_to_calendars.rb
new file mode 100644
index 000000000..64ad1a752
--- /dev/null
+++ b/db/migrate/20180123174450_add_workgroup_id_to_calendars.rb
@@ -0,0 +1,6 @@
+class AddWorkgroupIdToCalendars < ActiveRecord::Migration
+ def change
+ add_column :calendars, :workgroup_id, :integer, limit: 8
+ add_index :calendars, :workgroup_id
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 2c5520110..11fb96ee3 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: 20180111200406) do
+ActiveRecord::Schema.define(version: 20180123174450) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -90,10 +90,12 @@ ActiveRecord::Schema.define(version: 20180111200406) do
t.integer "organisation_id", limit: 8
t.datetime "created_at"
t.datetime "updated_at"
+ t.integer "workgroup_id", limit: 8
end
add_index "calendars", ["organisation_id"], name: "index_calendars_on_organisation_id", using: :btree
add_index "calendars", ["short_name"], name: "index_calendars_on_short_name", unique: true, using: :btree
+ add_index "calendars", ["workgroup_id"], name: "index_calendars_on_workgroup_id", using: :btree
create_table "clean_up_results", id: :bigserial, force: :cascade do |t|
t.string "message_key"
@@ -416,9 +418,9 @@ ActiveRecord::Schema.define(version: 20180111200406) do
t.string "type"
t.integer "parent_id", limit: 8
t.string "parent_type"
- t.datetime "notified_parent_at"
t.integer "current_step", default: 0
t.integer "total_steps", default: 0
+ t.datetime "notified_parent_at"
t.string "creator"
end