From 46ead9bed7df8e122c2851e1febec4d73d01eab8 Mon Sep 17 00:00:00 2001 From: echarp Date: Mon, 11 Jan 2016 13:57:10 +0100 Subject: [PATCH] City is no more required at the database level. Refs #51 --- db/migrate/20160111124855_modify_city_nullable.rb | 7 +++++++ db/schema.rb | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 db/migrate/20160111124855_modify_city_nullable.rb diff --git a/db/migrate/20160111124855_modify_city_nullable.rb b/db/migrate/20160111124855_modify_city_nullable.rb new file mode 100644 index 00000000..12d5eba3 --- /dev/null +++ b/db/migrate/20160111124855_modify_city_nullable.rb @@ -0,0 +1,7 @@ +# Events and orgas do not require a city anymore +class ModifyCityNullable < ActiveRecord::Migration + def change + change_column :events, :city, :string, default: '', null: true + change_column :orgas, :city, :string, default: '', null: true + end +end diff --git a/db/schema.rb b/db/schema.rb index bacefd2b..b639a1f1 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: 20160109203136) do +ActiveRecord::Schema.define(version: 20160111124855) do create_table "active_admin_comments", force: :cascade do |t| t.string "namespace", limit: 255 @@ -63,7 +63,7 @@ ActiveRecord::Schema.define(version: 20160109203136) do t.text "description", limit: 65535, null: false t.datetime "start_time", null: false t.datetime "end_time", null: false - t.string "city", limit: 255, default: "", null: false + t.string "city", limit: 255, default: "" t.integer "region_id", limit: 4, default: 0, null: false t.integer "locality", limit: 4, default: 0, null: false t.string "url", limit: 255, default: "", null: false @@ -104,7 +104,7 @@ ActiveRecord::Schema.define(version: 20160109203136) do t.string "department", limit: 4, default: "0", null: false t.string "name", limit: 255, default: "", null: false t.string "url", limit: 255, default: "", null: false - t.string "city", limit: 255, default: "", null: false + t.string "city", limit: 255, default: "" t.integer "kind_id", limit: 4 t.string "feed", limit: 255 t.string "contact", limit: 255