aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorGuillaume2017-11-09 15:20:54 +0100
committerGuillaume2017-11-09 15:21:01 +0100
commitaafda8b5d8e6dbd80ed56fd469d5ada5dceb3a67 (patch)
tree6e63632be099a8a86fcca69bcc2814efbff57c0a /db
parent4dbe0a7b5acf4e244016d58d59a96aca36035263 (diff)
downloadchouette-core-aafda8b5d8e6dbd80ed56fd469d5ada5dceb3a67.tar.bz2
add object_id_format to migrations, create module for call Referential, Line Referential, StopAreaReferential in models, add Enumerize in models Refs #4941
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20171109100955_add_object_id_format_to_workbenches.rb5
-rw-r--r--db/migrate/20171109101523_add_object_id_format_to_referential.rb5
-rw-r--r--db/migrate/20171109101545_add_object_id_format_to_line_referential.rb5
-rw-r--r--db/migrate/20171109101605_add_object_id_format_to_stop_area_referential.rb5
-rw-r--r--db/schema.rb10
5 files changed, 27 insertions, 3 deletions
diff --git a/db/migrate/20171109100955_add_object_id_format_to_workbenches.rb b/db/migrate/20171109100955_add_object_id_format_to_workbenches.rb
new file mode 100644
index 000000000..0e5e57643
--- /dev/null
+++ b/db/migrate/20171109100955_add_object_id_format_to_workbenches.rb
@@ -0,0 +1,5 @@
+class AddObjectIdFormatToWorkbenches < ActiveRecord::Migration
+ def change
+ add_column :workbenches, :objectid_format, :string
+ end
+end
diff --git a/db/migrate/20171109101523_add_object_id_format_to_referential.rb b/db/migrate/20171109101523_add_object_id_format_to_referential.rb
new file mode 100644
index 000000000..fed630b75
--- /dev/null
+++ b/db/migrate/20171109101523_add_object_id_format_to_referential.rb
@@ -0,0 +1,5 @@
+class AddObjectIdFormatToReferential < ActiveRecord::Migration
+ def change
+ add_column :referentials, :objectid_format, :string
+ end
+end
diff --git a/db/migrate/20171109101545_add_object_id_format_to_line_referential.rb b/db/migrate/20171109101545_add_object_id_format_to_line_referential.rb
new file mode 100644
index 000000000..5d2fc9f4f
--- /dev/null
+++ b/db/migrate/20171109101545_add_object_id_format_to_line_referential.rb
@@ -0,0 +1,5 @@
+class AddObjectIdFormatToLineReferential < ActiveRecord::Migration
+ def change
+ add_column :line_referentials, :objectid_format, :string
+ end
+end
diff --git a/db/migrate/20171109101605_add_object_id_format_to_stop_area_referential.rb b/db/migrate/20171109101605_add_object_id_format_to_stop_area_referential.rb
new file mode 100644
index 000000000..ffa77e2ed
--- /dev/null
+++ b/db/migrate/20171109101605_add_object_id_format_to_stop_area_referential.rb
@@ -0,0 +1,5 @@
+class AddObjectIdFormatToStopAreaReferential < ActiveRecord::Migration
+ def change
+ add_column :stop_area_referentials, :objectid_format, :string
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 050e81ad5..d71a2def3 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: 20171106111448) do
+ActiveRecord::Schema.define(version: 20171109101605) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -408,9 +408,9 @@ ActiveRecord::Schema.define(version: 20171106111448) 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
@@ -503,7 +503,8 @@ ActiveRecord::Schema.define(version: 20171106111448) do
t.string "name"
t.datetime "created_at"
t.datetime "updated_at"
- t.integer "sync_interval", default: 1
+ t.integer "sync_interval", default: 1
+ t.string "objectid_format"
end
create_table "lines", id: :bigserial, force: :cascade do |t|
@@ -647,6 +648,7 @@ ActiveRecord::Schema.define(version: 20171106111448) do
t.integer "created_from_id", limit: 8
t.boolean "ready", default: false
t.integer "referential_suite_id", limit: 8
+ t.string "objectid_format"
end
add_index "referentials", ["created_from_id"], name: "index_referentials_on_created_from_id", using: :btree
@@ -746,6 +748,7 @@ ActiveRecord::Schema.define(version: 20171106111448) do
t.string "name"
t.datetime "created_at"
t.datetime "updated_at"
+ t.string "objectid_format"
end
create_table "stop_areas", id: :bigserial, force: :cascade do |t|
@@ -984,6 +987,7 @@ ActiveRecord::Schema.define(version: 20171106111448) do
t.integer "line_referential_id", limit: 8
t.integer "stop_area_referential_id", limit: 8
t.integer "output_id", limit: 8
+ t.string "objectid_format"
end
add_index "workbenches", ["line_referential_id"], name: "index_workbenches_on_line_referential_id", using: :btree