diff options
| author | Zog | 2018-03-02 11:16:33 +0100 |
|---|---|---|
| committer | Zog | 2018-03-02 11:16:33 +0100 |
| commit | 4e0ef1700c8c105f5e5a7e4c3af20f6065bef461 (patch) | |
| tree | 759bdc67544dc3d657ce05ef2bcb8dac0c3e1f63 /db | |
| parent | 4acb5a53da2995aacc7b6ce2c802ad16fa563bf8 (diff) | |
| download | chouette-core-4e0ef1700c8c105f5e5a7e4c3af20f6065bef461.tar.bz2 | |
Refs #6068; Create a SimpleExporter model
This is an STI model, inheriting from SimpleInterface
SimpleImporter has been updated to work likewise
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrate/20180301142531_create_simple_exporters.rb | 7 | ||||
| -rw-r--r-- | db/schema.rb | 7 |
2 files changed, 11 insertions, 3 deletions
diff --git a/db/migrate/20180301142531_create_simple_exporters.rb b/db/migrate/20180301142531_create_simple_exporters.rb new file mode 100644 index 000000000..c007546c2 --- /dev/null +++ b/db/migrate/20180301142531_create_simple_exporters.rb @@ -0,0 +1,7 @@ +class CreateSimpleExporters < ActiveRecord::Migration + def change + rename_table :simple_importers, :simple_interfaces + add_column :simple_interfaces, :type, :string + SimpleInterface.update_all type: :SimpleImporter + end +end diff --git a/db/schema.rb b/db/schema.rb index 045fc658d..d6f3cdbe0 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: 20180227151937) do +ActiveRecord::Schema.define(version: 20180301142531) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -90,9 +90,9 @@ ActiveRecord::Schema.define(version: 20180227151937) do t.integer "organisation_id", limit: 8 t.datetime "created_at" t.datetime "updated_at" + t.integer "workgroup_id", limit: 8 t.integer "int_day_types" t.date "excluded_dates", array: true - t.integer "workgroup_id", limit: 8 end add_index "calendars", ["organisation_id"], name: "index_calendars_on_organisation_id", using: :btree @@ -725,11 +725,12 @@ ActiveRecord::Schema.define(version: 20180227151937) do t.integer "line_id", limit: 8 end - create_table "simple_importers", id: :bigserial, force: :cascade do |t| + create_table "simple_interfaces", id: :bigserial, force: :cascade do |t| t.string "configuration_name" t.string "filepath" t.string "status" t.json "journal" + t.string "type" end create_table "stop_area_referential_memberships", id: :bigserial, force: :cascade do |t| |
