Remove empty pod and make pod host NOT NULL

This commit is contained in:
Benjamin Neff 2016-10-15 21:04:51 +02:00 committed by Dennis Schubert
parent f90812671c
commit 4480f59e6e
No known key found for this signature in database
GPG key ID: 5A0304BEA7966D7E
2 changed files with 13 additions and 2 deletions

View file

@ -0,0 +1,11 @@
class RemoveEmptyPod < ActiveRecord::Migration
def up
Pod.delete_all("host IS NULL")
change_column :pods, :host, :string, null: false
end
def down
change_column :pods, :host, :string, null: true
end
end

View file

@ -11,7 +11,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20160906225138) do ActiveRecord::Schema.define(version: 20161015174300) do
create_table "account_deletions", force: :cascade do |t| create_table "account_deletions", force: :cascade do |t|
t.string "diaspora_handle", limit: 255 t.string "diaspora_handle", limit: 255
@ -358,7 +358,7 @@ ActiveRecord::Schema.define(version: 20160906225138) do
add_index "photos", ["status_message_guid"], name: "index_photos_on_status_message_guid", length: {"status_message_guid"=>191}, using: :btree add_index "photos", ["status_message_guid"], name: "index_photos_on_status_message_guid", length: {"status_message_guid"=>191}, using: :btree
create_table "pods", force: :cascade do |t| create_table "pods", force: :cascade do |t|
t.string "host", limit: 255 t.string "host", limit: 255, null: false
t.boolean "ssl" t.boolean "ssl"
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false