aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorRobert2017-07-14 10:25:32 +0200
committerRobert2017-07-17 13:13:29 +0200
commit03c2dcba29f1d6b4a8d22bd091e036fcf5600924 (patch)
treee384d5a4203bb607839a0727ff856d1eecdde759 /db
parentdf21b37cb3f4c4b56a4873247c5bb2759fd549f7 (diff)
downloadchouette-core-03c2dcba29f1d6b4a8d22bd091e036fcf5600924.tar.bz2
Fixes: #3555@1h
- Import#parent_id & #parent_type migration generated - Import#belongs_to :parent, class_name: to_s specified - Import#belongs_to :parent, class_name: to_s implemented
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20170715041954_add_parent_type_and_parent_id_to_imports.rb6
-rw-r--r--db/schema.rb4
2 files changed, 9 insertions, 1 deletions
diff --git a/db/migrate/20170715041954_add_parent_type_and_parent_id_to_imports.rb b/db/migrate/20170715041954_add_parent_type_and_parent_id_to_imports.rb
new file mode 100644
index 000000000..96c1c2a59
--- /dev/null
+++ b/db/migrate/20170715041954_add_parent_type_and_parent_id_to_imports.rb
@@ -0,0 +1,6 @@
+class AddParentTypeAndParentIdToImports < ActiveRecord::Migration
+ def change
+ add_column :imports, :parent_id, :bigint
+ add_column :imports, :parent_type, :string
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index e64e5c04a..b56027f48 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: 20170607141317) do
+ActiveRecord::Schema.define(version: 20170715041954) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -285,6 +285,8 @@ ActiveRecord::Schema.define(version: 20170607141317) do
t.datetime "ended_at"
t.string "token_download"
t.string "type", limit: 255
+ t.integer "parent_id", limit: 8
+ t.string "parent_type"
end
add_index "imports", ["referential_id"], name: "index_imports_on_referential_id", using: :btree