Remove empty pod and make pod host NOT NULL
This commit is contained in:
parent
f90812671c
commit
4480f59e6e
2 changed files with 13 additions and 2 deletions
11
db/migrate/20161015174300_remove_empty_pod.rb
Normal file
11
db/migrate/20161015174300_remove_empty_pod.rb
Normal 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
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue