replaces organization migrations with a new table
This commit is contained in:
@@ -1,7 +0,0 @@
|
|||||||
class AddOrganizationToUsers < ActiveRecord::Migration
|
|
||||||
def change
|
|
||||||
add_column :users, :organization_name, :string, limit: 80
|
|
||||||
add_column :users, :organization_verified_at, :datetime
|
|
||||||
add_column :users, :phone_number, :string, limit: 30
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
class AddOrganizationRejectedAtToUsers < ActiveRecord::Migration
|
|
||||||
def change
|
|
||||||
add_column :users, :organization_rejected_at, :datetime
|
|
||||||
end
|
|
||||||
end
|
|
||||||
10
db/migrate/20150813142213_create_organizations.rb
Normal file
10
db/migrate/20150813142213_create_organizations.rb
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
class CreateOrganizations < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
create_table :organizations do |t|
|
||||||
|
t.belongs_to :user, index: true, foreign_key: true
|
||||||
|
t.string :name, limit: 80
|
||||||
|
t.datetime :verified_at
|
||||||
|
t.datetime :rejected_at
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
5
db/migrate/20150813161654_add_phone_number_to_users.rb
Normal file
5
db/migrate/20150813161654_add_phone_number_to_users.rb
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
class AddPhoneNumberToUsers < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :users, :phone_number, :string, limit: 30
|
||||||
|
end
|
||||||
|
end
|
||||||
16
db/schema.rb
16
db/schema.rb
@@ -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: 20150812104712) do
|
ActiveRecord::Schema.define(version: 20150813161654) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
@@ -34,6 +34,7 @@ ActiveRecord::Schema.define(version: 20150812104712) do
|
|||||||
t.integer "rgt"
|
t.integer "rgt"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
|
t.integer "children_count", default: 0
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "comments", ["commentable_id", "commentable_type"], name: "index_comments_on_commentable_id_and_commentable_type", using: :btree
|
add_index "comments", ["commentable_id", "commentable_type"], name: "index_comments_on_commentable_id_and_commentable_type", using: :btree
|
||||||
@@ -53,6 +54,15 @@ ActiveRecord::Schema.define(version: 20150812104712) do
|
|||||||
|
|
||||||
add_index "moderators", ["user_id"], name: "index_moderators_on_user_id", using: :btree
|
add_index "moderators", ["user_id"], name: "index_moderators_on_user_id", using: :btree
|
||||||
|
|
||||||
|
create_table "organizations", force: :cascade do |t|
|
||||||
|
t.integer "user_id"
|
||||||
|
t.string "name", limit: 80
|
||||||
|
t.datetime "verified_at"
|
||||||
|
t.datetime "rejected_at"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "organizations", ["user_id"], name: "index_organizations_on_user_id", using: :btree
|
||||||
|
|
||||||
create_table "simple_captcha_data", force: :cascade do |t|
|
create_table "simple_captcha_data", force: :cascade do |t|
|
||||||
t.string "key", limit: 40
|
t.string "key", limit: 40
|
||||||
t.string "value", limit: 6
|
t.string "value", limit: 6
|
||||||
@@ -105,10 +115,7 @@ ActiveRecord::Schema.define(version: 20150812104712) do
|
|||||||
t.boolean "use_nickname", default: false, null: false
|
t.boolean "use_nickname", default: false, null: false
|
||||||
t.boolean "email_on_debate_comment", default: false
|
t.boolean "email_on_debate_comment", default: false
|
||||||
t.boolean "email_on_comment_reply", default: false
|
t.boolean "email_on_comment_reply", default: false
|
||||||
t.string "organization_name", limit: 80
|
|
||||||
t.datetime "organization_verified_at"
|
|
||||||
t.string "phone_number", limit: 30
|
t.string "phone_number", limit: 30
|
||||||
t.datetime "organization_rejected_at"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true, using: :btree
|
add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true, using: :btree
|
||||||
@@ -132,4 +139,5 @@ ActiveRecord::Schema.define(version: 20150812104712) do
|
|||||||
|
|
||||||
add_foreign_key "administrators", "users"
|
add_foreign_key "administrators", "users"
|
||||||
add_foreign_key "moderators", "users"
|
add_foreign_key "moderators", "users"
|
||||||
|
add_foreign_key "organizations", "users"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user