diff options
| author | Xinhui | 2016-11-15 16:39:26 +0100 | 
|---|---|---|
| committer | Xinhui | 2016-11-15 16:39:30 +0100 | 
| commit | aa6a6f3aabb621e8697cc91bb9760d086678ca89 (patch) | |
| tree | 83cd246ce0ed657746f50a5015c71159104e46b3 /db | |
| parent | cddd627eacd1a0bf252494fd7394438f958d53ab (diff) | |
| download | chouette-core-aa6a6f3aabb621e8697cc91bb9760d086678ca89.tar.bz2 | |
Refactoring CleanUpResult as ActiveRecord model
Refs #1933
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrate/20161115142708_create_clean_up_results.rb | 10 | ||||
| -rw-r--r-- | db/schema.rb | 12 | 
2 files changed, 21 insertions, 1 deletions
diff --git a/db/migrate/20161115142708_create_clean_up_results.rb b/db/migrate/20161115142708_create_clean_up_results.rb new file mode 100644 index 000000000..689fb1268 --- /dev/null +++ b/db/migrate/20161115142708_create_clean_up_results.rb @@ -0,0 +1,10 @@ +class CreateCleanUpResults < ActiveRecord::Migration +  def change +    create_table :clean_up_results do |t| +      t.string :message_key +      t.hstore :message_attributs +      t.references :clean_up, index: true +      t.timestamps +    end +  end +end diff --git a/db/schema.rb b/db/schema.rb index 9d86632b7..e4b85109c 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: 20161115141625) do +ActiveRecord::Schema.define(version: 20161115142708) do    # These are extensions that must be enabled in order to support this database    enable_extension "plpgsql" @@ -77,6 +77,16 @@ ActiveRecord::Schema.define(version: 20161115141625) do      t.datetime "updated_at"    end +  create_table "clean_up_results", force: true do |t| +    t.string   "message_key" +    t.hstore   "message_attributs" +    t.integer  "clean_up_id" +    t.datetime "created_at" +    t.datetime "updated_at" +  end + +  add_index "clean_up_results", ["clean_up_id"], :name => "index_clean_up_results_on_clean_up_id" +    create_table "clean_ups", force: true do |t|      t.string   "status"      t.datetime "started_at"  | 
