diff options
| author | Michel Etienne | 2012-09-05 15:44:40 +0200 |
|---|---|---|
| committer | Michel Etienne | 2012-09-05 15:44:40 +0200 |
| commit | e524f087ae7fe7543bffbdf281ed9e07c00b9418 (patch) | |
| tree | cf452640b261c1c6beb9a3dd7bb743bdd4eb7aa3 /db | |
| parent | f19f90ee215a6019a6647b0b23d03a06a3458aa6 (diff) | |
| download | chouette-core-e524f087ae7fe7543bffbdf281ed9e07c00b9418.tar.bz2 | |
affect file_validation to organisation
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrate/20120905125251_add_organisation_id_to_file_validation.rb | 12 | ||||
| -rw-r--r-- | db/schema.rb | 5 |
2 files changed, 15 insertions, 2 deletions
diff --git a/db/migrate/20120905125251_add_organisation_id_to_file_validation.rb b/db/migrate/20120905125251_add_organisation_id_to_file_validation.rb new file mode 100644 index 000000000..996bf8dba --- /dev/null +++ b/db/migrate/20120905125251_add_organisation_id_to_file_validation.rb @@ -0,0 +1,12 @@ +class AddOrganisationIdToFileValidation < ActiveRecord::Migration + def change + change_table :file_validations do |f| + f.belongs_to :organisation + end + + FileValidation.reset_column_information + organisation = Organisation.find_or_create_by_name!("Chouette") + FileValidation.update_all :organisation_id => organisation.id + + end +end diff --git a/db/schema.rb b/db/schema.rb index 044415bce..2895423a1 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20120830095442) do +ActiveRecord::Schema.define(:version => 20120905125251) do create_table "access_links", :force => true do |t| t.integer "access_point_id", :limit => 8 @@ -192,11 +192,12 @@ ActiveRecord::Schema.define(:version => 20120830095442) do create_table "file_validations", :force => true do |t| t.string "status" - t.string "options", :limit => 2000 + t.string "options", :limit => 2000 t.string "file_name" t.string "file_type" t.datetime "created_at" t.datetime "updated_at" + t.integer "organisation_id" end create_table "group_of_lines", :force => true do |t| |
