diff options
| author | Xinhui | 2016-12-28 12:14:19 +0100 |
|---|---|---|
| committer | Xinhui | 2016-12-28 13:00:47 +0100 |
| commit | 15e221c2fe06ebd6ca18d7a392ab05f95b59be74 (patch) | |
| tree | 130db86de564b4aff40b9df8ee61119dd54263ef /db | |
| parent | b6129f04b5f9b5a4c325c43d1a13b0e9b7d48647 (diff) | |
| download | chouette-core-15e221c2fe06ebd6ca18d7a392ab05f95b59be74.tar.bz2 | |
Model ImportMessage ImportResource
Refs #2261
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrate/20161228102458_create_import_messages.rb | 13 | ||||
| -rw-r--r-- | db/migrate/20161228103628_create_import_resources.rb | 10 | ||||
| -rw-r--r-- | db/schema.rb | 24 |
3 files changed, 46 insertions, 1 deletions
diff --git a/db/migrate/20161228102458_create_import_messages.rb b/db/migrate/20161228102458_create_import_messages.rb new file mode 100644 index 000000000..53a26cbd2 --- /dev/null +++ b/db/migrate/20161228102458_create_import_messages.rb @@ -0,0 +1,13 @@ +class CreateImportMessages < ActiveRecord::Migration + def change + create_table :import_messages do |t| + t.integer :criticity + t.string :message_key + t.hstore :message_attributs + t.references :import, index: true + t.references :resource, index: true + + t.timestamps + end + end +end diff --git a/db/migrate/20161228103628_create_import_resources.rb b/db/migrate/20161228103628_create_import_resources.rb new file mode 100644 index 000000000..ef9c3563f --- /dev/null +++ b/db/migrate/20161228103628_create_import_resources.rb @@ -0,0 +1,10 @@ +class CreateImportResources < ActiveRecord::Migration + def change + create_table :import_resources do |t| + t.references :import, index: true + t.string :status + + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 734dde1de..829b235d3 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: 20161227104741) do +ActiveRecord::Schema.define(version: 20161228103628) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -224,6 +224,28 @@ ActiveRecord::Schema.define(version: 20161227104741) do t.integer "line_id", limit: 8 end + create_table "import_messages", force: true do |t| + t.integer "criticity" + t.string "message_key" + t.hstore "message_attributs" + t.integer "import_id" + t.integer "resource_id" + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "import_messages", ["import_id"], :name => "index_import_messages_on_import_id" + add_index "import_messages", ["resource_id"], :name => "index_import_messages_on_resource_id" + + create_table "import_resources", force: true do |t| + t.integer "import_id" + t.string "status" + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "import_resources", ["import_id"], :name => "index_import_resources_on_import_id" + create_table "imports", force: true do |t| t.string "status" t.string "current_step_id" |
