append used Rails version to ActiveRecord::Migration

This commit is contained in:
Andreas Nedbal 2020-04-19 18:10:31 +02:00
parent eee7493c91
commit e1f775d955
51 changed files with 256 additions and 269 deletions

View File

@ -1,4 +1,4 @@
class CreateThemesTable < ActiveRecord::Migration class CreateThemesTable < ActiveRecord::Migration[4.2]
def change def change
create_table :themes do |t| create_table :themes do |t|
end end

View File

@ -1,4 +1,4 @@
class DeviseCreateUsers < ActiveRecord::Migration class DeviseCreateUsers < ActiveRecord::Migration[4.2]
def change def change
create_table(:users) do |t| create_table(:users) do |t|
## Database authenticatable ## Database authenticatable

View File

@ -1,4 +1,4 @@
class AddScreenNameToUsers < ActiveRecord::Migration class AddScreenNameToUsers < ActiveRecord::Migration[4.2]
def change def change
add_column :users, :screen_name, :string add_column :users, :screen_name, :string
add_index :users, :screen_name, unique: true add_index :users, :screen_name, unique: true

View File

@ -1,4 +1,4 @@
class CreateQuestions < ActiveRecord::Migration class CreateQuestions < ActiveRecord::Migration[4.2]
def change def change
create_table :questions do |t| create_table :questions do |t|
t.string :content t.string :content

View File

@ -1,4 +1,4 @@
class CreateAnswers < ActiveRecord::Migration class CreateAnswers < ActiveRecord::Migration[4.2]
def change def change
create_table :answers do |t| create_table :answers do |t|
t.string :content t.string :content

View File

@ -1,4 +1,4 @@
class CreateComments < ActiveRecord::Migration class CreateComments < ActiveRecord::Migration[4.2]
def change def change
create_table :comments do |t| create_table :comments do |t|
t.string :content t.string :content

View File

@ -1,4 +1,4 @@
class AddCountsToUsers < ActiveRecord::Migration class AddCountsToUsers < ActiveRecord::Migration[4.2]
def change def change
add_column :users, :friend_count, :integer, default: 0, null: false add_column :users, :friend_count, :integer, default: 0, null: false
add_column :users, :follower_count, :integer, default: 0, null: false add_column :users, :follower_count, :integer, default: 0, null: false

View File

@ -1,4 +1,4 @@
class AddDisplayNameToUsers < ActiveRecord::Migration class AddDisplayNameToUsers < ActiveRecord::Migration[4.2]
def change def change
add_column :users, :display_name, :string add_column :users, :display_name, :string
end end

View File

@ -1,4 +1,4 @@
class CreateInboxes < ActiveRecord::Migration class CreateInboxes < ActiveRecord::Migration[4.2]
def change def change
create_table :inboxes do |t| create_table :inboxes do |t|
t.integer :user_id t.integer :user_id

View File

@ -1,4 +1,4 @@
class AddSmileCountToAnswers < ActiveRecord::Migration class AddSmileCountToAnswers < ActiveRecord::Migration[4.2]
def change def change
add_column :answers, :smile_count, :integer, default: 0, null: false add_column :answers, :smile_count, :integer, default: 0, null: false
end end

View File

@ -1,4 +1,4 @@
class AddSmiledCountToUsers < ActiveRecord::Migration class AddSmiledCountToUsers < ActiveRecord::Migration[4.2]
def change def change
add_column :users, :smiled_count, :integer, default: 0, null: false add_column :users, :smiled_count, :integer, default: 0, null: false
end end

View File

@ -1,4 +1,4 @@
class AddAdminToUsers < ActiveRecord::Migration class AddAdminToUsers < ActiveRecord::Migration[4.2]
def change def change
add_column :users, :admin, :boolean, default: false, null: false add_column :users, :admin, :boolean, default: false, null: false
end end

View File

@ -1,4 +1,4 @@
class AddMotivationHeaderToUsers < ActiveRecord::Migration class AddMotivationHeaderToUsers < ActiveRecord::Migration[4.2]
def change def change
add_column :users, :motivation_header, :string, default: '', null: false add_column :users, :motivation_header, :string, default: '', null: false
end end

View File

@ -1,4 +1,4 @@
class CreateRelationships < ActiveRecord::Migration class CreateRelationships < ActiveRecord::Migration[4.2]
def change def change
create_table :relationships do |t| create_table :relationships do |t|
t.integer :source_id t.integer :source_id

View File

@ -1,4 +1,4 @@
class CreateSmiles < ActiveRecord::Migration class CreateSmiles < ActiveRecord::Migration[4.2]
def change def change
create_table :smiles do |t| create_table :smiles do |t|
t.integer :user_id t.integer :user_id

View File

@ -1,4 +1,4 @@
class RenameColumnsInAnswers < ActiveRecord::Migration class RenameColumnsInAnswers < ActiveRecord::Migration[4.2]
def change def change
rename_column :answers, :comments, :comment_count rename_column :answers, :comments, :comment_count
remove_column :answers, :likes remove_column :answers, :likes

View File

@ -1,4 +1,4 @@
class AddFieldsToUsers < ActiveRecord::Migration class AddFieldsToUsers < ActiveRecord::Migration[4.2]
def change def change
add_column :users, :website, :string, default: '', null: false add_column :users, :website, :string, default: '', null: false
add_column :users, :location, :string, default: '', null: false add_column :users, :location, :string, default: '', null: false

View File

@ -1,4 +1,4 @@
class AddAnswerCountToQuestions < ActiveRecord::Migration class AddAnswerCountToQuestions < ActiveRecord::Migration[4.2]
def change def change
add_column :questions, :answer_count, :integer, default: 0, null: false add_column :questions, :answer_count, :integer, default: 0, null: false
end end

View File

@ -1,4 +1,4 @@
class ChangeAnswerContentColumnType < ActiveRecord::Migration class ChangeAnswerContentColumnType < ActiveRecord::Migration[4.2]
def change def change
change_table :answers do |t| change_table :answers do |t|
t.change :content, :text t.change :content, :text

View File

@ -1,4 +1,4 @@
class CreateServices < ActiveRecord::Migration class CreateServices < ActiveRecord::Migration[4.2]
def change def change
create_table :services do |t| create_table :services do |t|
t.string :type, null: false t.string :type, null: false

View File

@ -1,4 +1,4 @@
class CreateNotifications < ActiveRecord::Migration class CreateNotifications < ActiveRecord::Migration[4.2]
def change def change
create_table :notifications do |t| create_table :notifications do |t|
t.string :target_type t.string :target_type

View File

@ -1,4 +1,4 @@
class AddModeratorToUsers < ActiveRecord::Migration class AddModeratorToUsers < ActiveRecord::Migration[4.2]
def change def change
add_column :users, :moderator, :boolean, default: false, null: false add_column :users, :moderator, :boolean, default: false, null: false
end end

View File

@ -1,4 +1,4 @@
class CreateReports < ActiveRecord::Migration class CreateReports < ActiveRecord::Migration[4.2]
def change def change
create_table :reports do |t| create_table :reports do |t|
t.string :type, null: false t.string :type, null: false

View File

@ -1,4 +1,4 @@
class CreateModerationVotes < ActiveRecord::Migration class CreateModerationVotes < ActiveRecord::Migration[4.2]
def change def change
create_table :moderation_votes do |t| create_table :moderation_votes do |t|
t.integer :report_id, null: false t.integer :report_id, null: false

View File

@ -1,4 +1,4 @@
class CreateModerationComments < ActiveRecord::Migration class CreateModerationComments < ActiveRecord::Migration[4.2]
def change def change
create_table :moderation_comments do |t| create_table :moderation_comments do |t|
t.integer :report_id t.integer :report_id

View File

@ -1,4 +1,4 @@
class AddDeletedToReports < ActiveRecord::Migration class AddDeletedToReports < ActiveRecord::Migration[4.2]
def change def change
add_column :reports, :deleted, :boolean, default: false add_column :reports, :deleted, :boolean, default: false
end end

View File

@ -1,4 +1,4 @@
class AddAttachmentProfilePictureToUsers < ActiveRecord::Migration class AddAttachmentProfilePictureToUsers < ActiveRecord::Migration[4.2]
def self.up def self.up
change_table :users do |t| change_table :users do |t|
t.attachment :profile_picture t.attachment :profile_picture

View File

@ -1,4 +1,4 @@
class AddProfilePictureProcessingToUsers < ActiveRecord::Migration class AddProfilePictureProcessingToUsers < ActiveRecord::Migration[4.2]
def change def change
add_column :users, :profile_picture_processing, :boolean add_column :users, :profile_picture_processing, :boolean
end end

View File

@ -1,4 +1,4 @@
class AddCropValuesToUsers < ActiveRecord::Migration class AddCropValuesToUsers < ActiveRecord::Migration[4.2]
def change def change
# this is a ugly hack and will stay until I find a way to pass parameters # this is a ugly hack and will stay until I find a way to pass parameters
# to the paperclip Sidekiq worker. oh well. # to the paperclip Sidekiq worker. oh well.

View File

@ -1,4 +1,4 @@
class AddSupporterToUsers < ActiveRecord::Migration class AddSupporterToUsers < ActiveRecord::Migration[4.2]
def change def change
add_column :users, :supporter, :boolean, default: false add_column :users, :supporter, :boolean, default: false
end end

View File

@ -1,4 +1,4 @@
class AddPrivacyOptionsToUsers < ActiveRecord::Migration class AddPrivacyOptionsToUsers < ActiveRecord::Migration[4.2]
def change def change
%i{ %i{
privacy_allow_anonymous_questions privacy_allow_anonymous_questions

View File

@ -1,4 +1,4 @@
class AddBannedToUsers < ActiveRecord::Migration class AddBannedToUsers < ActiveRecord::Migration[4.2]
def change def change
add_column :users, :banned, :boolean, default: false add_column :users, :banned, :boolean, default: false
end end

View File

@ -1,4 +1,4 @@
class CreateGroups < ActiveRecord::Migration class CreateGroups < ActiveRecord::Migration[4.2]
def change def change
create_table :groups do |t| create_table :groups do |t|
t.integer :user_id, null: false t.integer :user_id, null: false

View File

@ -1,4 +1,4 @@
class AddBloggerToUsers < ActiveRecord::Migration class AddBloggerToUsers < ActiveRecord::Migration[4.2]
def change def change
add_column :users, :blogger, :boolean, default: :false add_column :users, :blogger, :boolean, default: :false
end end

View File

@ -1,4 +1,4 @@
class AddContributorToUsers < ActiveRecord::Migration class AddContributorToUsers < ActiveRecord::Migration[4.2]
def change def change
add_column :users, :contributor, :boolean, default: :false add_column :users, :contributor, :boolean, default: :false
end end

View File

@ -1,4 +1,4 @@
class CreateSubscriptions < ActiveRecord::Migration class CreateSubscriptions < ActiveRecord::Migration[4.2]
def change def change
create_table :subscriptions do |t| create_table :subscriptions do |t|
t.integer :user_id, null: false t.integer :user_id, null: false

View File

@ -1,4 +1,4 @@
class AddIsActiveToSubscriptions < ActiveRecord::Migration class AddIsActiveToSubscriptions < ActiveRecord::Migration[4.2]
def change def change
add_column :subscriptions, :is_active, :boolean, default: :true add_column :subscriptions, :is_active, :boolean, default: :true
end end

View File

@ -1,4 +1,4 @@
class AddReasonToReport < ActiveRecord::Migration class AddReasonToReport < ActiveRecord::Migration[4.2]
def change def change
add_column :reports, :reason, :string, default: nil add_column :reports, :reason, :string, default: nil
end end

View File

@ -1,4 +1,4 @@
class RenameBannedToPermanentlyBannedInUsers < ActiveRecord::Migration class RenameBannedToPermanentlyBannedInUsers < ActiveRecord::Migration[4.2]
def up def up
rename_column :users, :banned, :permanently_banned rename_column :users, :banned, :permanently_banned
end end

View File

@ -1,4 +1,4 @@
class AddBanReasonAndBannedUntilToUsers < ActiveRecord::Migration class AddBanReasonAndBannedUntilToUsers < ActiveRecord::Migration[4.2]
def change def change
add_column :users, :ban_reason, :string, default: nil add_column :users, :ban_reason, :string, default: nil
add_column :users, :banned_until, :datetime, default: nil add_column :users, :banned_until, :datetime, default: nil

View File

@ -1,4 +1,4 @@
class CreateCommentSmiles < ActiveRecord::Migration class CreateCommentSmiles < ActiveRecord::Migration[4.2]
def change def change
create_table :comment_smiles do |t| create_table :comment_smiles do |t|
t.integer :user_id t.integer :user_id

View File

@ -1,4 +1,4 @@
class AddAttachmentProfileHeaderToUsers < ActiveRecord::Migration class AddAttachmentProfileHeaderToUsers < ActiveRecord::Migration[4.2]
def change def change
change_table :users do |t| change_table :users do |t|
t.attachment :profile_header t.attachment :profile_header

View File

@ -1,4 +1,4 @@
class AddLocaleToUser < ActiveRecord::Migration class AddLocaleToUser < ActiveRecord::Migration[4.2]
def change def change
add_column :users, :locale, :string add_column :users, :locale, :string
end end

View File

@ -1,4 +1,4 @@
class AddTranslatorToUsers < ActiveRecord::Migration class AddTranslatorToUsers < ActiveRecord::Migration[4.2]
def change def change
add_column :users, :translator, :boolean, default: :false add_column :users, :translator, :boolean, default: :false
end end

View File

@ -1,4 +1,4 @@
class ChangeDefaultValueOfLocale < ActiveRecord::Migration class ChangeDefaultValueOfLocale < ActiveRecord::Migration[4.2]
def change def change
change_column :users, :locale, :string, :default => 'en' change_column :users, :locale, :string, :default => 'en'
end end

View File

@ -1,4 +1,4 @@
class AddConfirmableToDevise < ActiveRecord::Migration class AddConfirmableToDevise < ActiveRecord::Migration[4.2]
def up def up
add_column :users, :confirmation_token, :string add_column :users, :confirmation_token, :string
add_column :users, :confirmed_at, :datetime add_column :users, :confirmed_at, :datetime

View File

@ -1,4 +1,4 @@
class CreateThemes < ActiveRecord::Migration class CreateThemes < ActiveRecord::Migration[4.2]
def change def change
create_table :themes do |t| create_table :themes do |t|
t.integer :user_id, null: false t.integer :user_id, null: false

View File

@ -1,4 +1,4 @@
class AddShowForeignThemesToUsers < ActiveRecord::Migration class AddShowForeignThemesToUsers < ActiveRecord::Migration[4.2]
def change def change
add_column :users, :show_foreign_themes, :boolean, default: true, null: false add_column :users, :show_foreign_themes, :boolean, default: true, null: false
end end

View File

@ -1,4 +1,4 @@
class AddInputAndOutlineToTheme < ActiveRecord::Migration class AddInputAndOutlineToTheme < ActiveRecord::Migration[4.2]
def change def change
add_column :themes, :input_color, :integer, default: 0xFFFFFF, null: false add_column :themes, :input_color, :integer, default: 0xFFFFFF, null: false
add_column :themes, :input_text, :integer, default: 0x000000, null: false add_column :themes, :input_text, :integer, default: 0x000000, null: false

View File

@ -1,4 +1,4 @@
class AddExportFieldsToUsers < ActiveRecord::Migration class AddExportFieldsToUsers < ActiveRecord::Migration[4.2]
def change def change
add_column :users, :export_url, :string add_column :users, :export_url, :string
add_column :users, :export_processing, :boolean, default: false, null: false add_column :users, :export_processing, :boolean, default: false, null: false

View File

@ -1,4 +1,3 @@
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead # This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to # of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition. # incrementally modify your database, and then regenerate this schema definition.
@ -11,276 +10,264 @@
# #
# 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: 20160105165913) do ActiveRecord::Schema.define(version: 2016_01_05_165913) 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"
create_table "answers", force: :cascade do |t| create_table "answers", id: :serial, force: :cascade do |t|
t.text "content" t.text "content"
t.integer "question_id" t.integer "question_id"
t.integer "comment_count", default: 0, null: false t.integer "comment_count", default: 0, null: false
t.integer "user_id" t.integer "user_id"
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
t.integer "smile_count", default: 0, null: false t.integer "smile_count", default: 0, null: false
t.index ["user_id", "created_at"], name: "index_answers_on_user_id_and_created_at"
end end
add_index "answers", ["user_id", "created_at"], name: "index_answers_on_user_id_and_created_at", using: :btree create_table "comment_smiles", id: :serial, force: :cascade do |t|
t.integer "user_id"
create_table "comment_smiles", force: :cascade do |t| t.integer "comment_id"
t.integer "user_id"
t.integer "comment_id"
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["comment_id"], name: "index_comment_smiles_on_comment_id"
t.index ["user_id", "comment_id"], name: "index_comment_smiles_on_user_id_and_comment_id", unique: true
t.index ["user_id"], name: "index_comment_smiles_on_user_id"
end end
add_index "comment_smiles", ["comment_id"], name: "index_comment_smiles_on_comment_id", using: :btree create_table "comments", id: :serial, force: :cascade do |t|
add_index "comment_smiles", ["user_id", "comment_id"], name: "index_comment_smiles_on_user_id_and_comment_id", unique: true, using: :btree t.string "content"
add_index "comment_smiles", ["user_id"], name: "index_comment_smiles_on_user_id", using: :btree t.integer "answer_id"
t.integer "user_id"
create_table "comments", force: :cascade do |t|
t.string "content"
t.integer "answer_id"
t.integer "user_id"
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
t.integer "smile_count", default: 0, null: false t.integer "smile_count", default: 0, null: false
t.index ["user_id", "created_at"], name: "index_comments_on_user_id_and_created_at"
end end
add_index "comments", ["user_id", "created_at"], name: "index_comments_on_user_id_and_created_at", using: :btree create_table "group_members", id: :serial, force: :cascade do |t|
t.integer "group_id", null: false
t.integer "user_id", null: false
t.datetime "created_at"
t.datetime "updated_at"
t.index ["group_id", "user_id"], name: "index_group_members_on_group_id_and_user_id", unique: true
t.index ["group_id"], name: "index_group_members_on_group_id"
t.index ["user_id"], name: "index_group_members_on_user_id"
end
create_table "group_members", force: :cascade do |t| create_table "groups", id: :serial, force: :cascade do |t|
t.integer "group_id", null: false t.integer "user_id", null: false
t.integer "user_id", null: false t.string "name"
t.string "display_name"
t.boolean "private", default: true
t.datetime "created_at"
t.datetime "updated_at"
t.index ["name"], name: "index_groups_on_name"
t.index ["user_id", "name"], name: "index_groups_on_user_id_and_name", unique: true
t.index ["user_id"], name: "index_groups_on_user_id"
end
create_table "inboxes", id: :serial, force: :cascade do |t|
t.integer "user_id"
t.integer "question_id"
t.boolean "new"
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
end end
add_index "group_members", ["group_id", "user_id"], name: "index_group_members_on_group_id_and_user_id", unique: true, using: :btree create_table "moderation_comments", id: :serial, force: :cascade do |t|
add_index "group_members", ["group_id"], name: "index_group_members_on_group_id", using: :btree t.integer "report_id"
add_index "group_members", ["user_id"], name: "index_group_members_on_user_id", using: :btree t.integer "user_id"
t.string "content"
t.datetime "created_at"
t.datetime "updated_at"
t.index ["user_id", "created_at"], name: "index_moderation_comments_on_user_id_and_created_at"
end
create_table "groups", force: :cascade do |t| create_table "moderation_votes", id: :serial, force: :cascade do |t|
t.integer "user_id", null: false t.integer "report_id", null: false
t.string "name" t.integer "user_id", null: false
t.string "display_name" t.boolean "upvote", default: false, null: false
t.boolean "private", default: true t.datetime "created_at"
t.datetime "updated_at"
t.index ["report_id"], name: "index_moderation_votes_on_report_id"
t.index ["user_id", "report_id"], name: "index_moderation_votes_on_user_id_and_report_id", unique: true
t.index ["user_id"], name: "index_moderation_votes_on_user_id"
end
create_table "notifications", id: :serial, force: :cascade do |t|
t.string "target_type"
t.integer "target_id"
t.integer "recipient_id"
t.boolean "new"
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
end end
add_index "groups", ["name"], name: "index_groups_on_name", using: :btree create_table "questions", id: :serial, force: :cascade do |t|
add_index "groups", ["user_id", "name"], name: "index_groups_on_user_id_and_name", unique: true, using: :btree t.string "content"
add_index "groups", ["user_id"], name: "index_groups_on_user_id", using: :btree t.boolean "author_is_anonymous"
t.string "author_name"
t.string "author_email"
t.integer "user_id"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "answer_count", default: 0, null: false
t.index ["user_id", "created_at"], name: "index_questions_on_user_id_and_created_at"
end
create_table "inboxes", force: :cascade do |t| create_table "relationships", id: :serial, force: :cascade do |t|
t.integer "user_id" t.integer "source_id"
t.integer "question_id" t.integer "target_id"
t.boolean "new" t.datetime "created_at"
t.datetime "updated_at"
t.index ["source_id", "target_id"], name: "index_relationships_on_source_id_and_target_id", unique: true
t.index ["source_id"], name: "index_relationships_on_source_id"
t.index ["target_id"], name: "index_relationships_on_target_id"
end
create_table "reports", id: :serial, force: :cascade do |t|
t.string "type", null: false
t.integer "target_id", null: false
t.integer "user_id", null: false
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "deleted", default: false
t.string "reason"
end
create_table "services", id: :serial, force: :cascade do |t|
t.string "type", null: false
t.integer "user_id", null: false
t.string "uid"
t.string "access_token"
t.string "access_secret"
t.string "nickname"
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
end end
create_table "moderation_comments", force: :cascade do |t| create_table "smiles", id: :serial, force: :cascade do |t|
t.integer "report_id" t.integer "user_id"
t.integer "user_id" t.integer "answer_id"
t.string "content"
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
t.index ["answer_id"], name: "index_smiles_on_answer_id"
t.index ["user_id", "answer_id"], name: "index_smiles_on_user_id_and_answer_id", unique: true
t.index ["user_id"], name: "index_smiles_on_user_id"
end end
add_index "moderation_comments", ["user_id", "created_at"], name: "index_moderation_comments_on_user_id_and_created_at", using: :btree create_table "subscriptions", id: :serial, force: :cascade do |t|
t.integer "user_id", null: false
create_table "moderation_votes", force: :cascade do |t| t.integer "answer_id", null: false
t.integer "report_id", null: false t.datetime "created_at", null: false
t.integer "user_id", null: false t.datetime "updated_at", null: false
t.boolean "upvote", default: false, null: false t.boolean "is_active", default: true
t.datetime "created_at"
t.datetime "updated_at"
end end
add_index "moderation_votes", ["report_id"], name: "index_moderation_votes_on_report_id", using: :btree create_table "themes", id: :serial, force: :cascade do |t|
add_index "moderation_votes", ["user_id", "report_id"], name: "index_moderation_votes_on_user_id_and_report_id", unique: true, using: :btree t.integer "user_id", null: false
add_index "moderation_votes", ["user_id"], name: "index_moderation_votes_on_user_id", using: :btree t.integer "primary_color", default: 6174129
t.integer "primary_text", default: 16777215
create_table "notifications", force: :cascade do |t| t.integer "danger_color", default: 16711737
t.string "target_type" t.integer "danger_text", default: 16777215
t.integer "target_id" t.integer "success_color", default: 4175384
t.integer "recipient_id" t.integer "success_text", default: 16777215
t.boolean "new" t.integer "warning_color", default: 16741656
t.datetime "created_at" t.integer "warning_text", default: 16777215
t.datetime "updated_at" t.integer "info_color", default: 10048699
end t.integer "info_text", default: 16777215
t.integer "default_color", default: 2236962
create_table "questions", force: :cascade do |t| t.integer "default_text", default: 15658734
t.string "content" t.integer "panel_color", default: 16382457
t.boolean "author_is_anonymous" t.integer "panel_text", default: 1381653
t.string "author_name" t.integer "link_color", default: 6174129
t.string "author_email" t.integer "background_color", default: 16777215
t.integer "user_id" t.integer "background_text", default: 2236962
t.datetime "created_at" t.integer "background_muted", default: 12303291
t.datetime "updated_at" t.string "css_file_name"
t.integer "answer_count", default: 0, null: false t.string "css_content_type"
end t.integer "css_file_size"
add_index "questions", ["user_id", "created_at"], name: "index_questions_on_user_id_and_created_at", using: :btree
create_table "relationships", force: :cascade do |t|
t.integer "source_id"
t.integer "target_id"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "relationships", ["source_id", "target_id"], name: "index_relationships_on_source_id_and_target_id", unique: true, using: :btree
add_index "relationships", ["source_id"], name: "index_relationships_on_source_id", using: :btree
add_index "relationships", ["target_id"], name: "index_relationships_on_target_id", using: :btree
create_table "reports", force: :cascade do |t|
t.string "type", null: false
t.integer "target_id", null: false
t.integer "user_id", null: false
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "deleted", default: false
t.string "reason"
end
create_table "services", force: :cascade do |t|
t.string "type", null: false
t.integer "user_id", null: false
t.string "uid"
t.string "access_token"
t.string "access_secret"
t.string "nickname"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "smiles", force: :cascade do |t|
t.integer "user_id"
t.integer "answer_id"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "smiles", ["answer_id"], name: "index_smiles_on_answer_id", using: :btree
add_index "smiles", ["user_id", "answer_id"], name: "index_smiles_on_user_id_and_answer_id", unique: true, using: :btree
add_index "smiles", ["user_id"], name: "index_smiles_on_user_id", using: :btree
create_table "subscriptions", force: :cascade do |t|
t.integer "user_id", null: false
t.integer "answer_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.boolean "is_active", default: true
end
create_table "themes", force: :cascade do |t|
t.integer "user_id", null: false
t.integer "primary_color", default: 6174129
t.integer "primary_text", default: 16777215
t.integer "danger_color", default: 16711737
t.integer "danger_text", default: 16777215
t.integer "success_color", default: 4175384
t.integer "success_text", default: 16777215
t.integer "warning_color", default: 16741656
t.integer "warning_text", default: 16777215
t.integer "info_color", default: 10048699
t.integer "info_text", default: 16777215
t.integer "default_color", default: 2236962
t.integer "default_text", default: 15658734
t.integer "panel_color", default: 16382457
t.integer "panel_text", default: 1381653
t.integer "link_color", default: 6174129
t.integer "background_color", default: 16777215
t.integer "background_text", default: 2236962
t.integer "background_muted", default: 12303291
t.string "css_file_name"
t.string "css_content_type"
t.integer "css_file_size"
t.datetime "css_updated_at" t.datetime "css_updated_at"
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.integer "input_color", default: 16777215, null: false t.integer "input_color", default: 16777215, null: false
t.integer "input_text", default: 0, null: false t.integer "input_text", default: 0, null: false
t.integer "outline_color", default: 6174129, null: false t.integer "outline_color", default: 6174129, null: false
t.index ["user_id", "created_at"], name: "index_themes_on_user_id_and_created_at"
end end
add_index "themes", ["user_id", "created_at"], name: "index_themes_on_user_id_and_created_at", using: :btree create_table "users", id: :serial, force: :cascade do |t|
t.string "email", default: "", null: false
create_table "users", force: :cascade do |t| t.string "encrypted_password", default: "", null: false
t.string "email", default: "", null: false t.string "reset_password_token"
t.string "encrypted_password", default: "", null: false
t.string "reset_password_token"
t.datetime "reset_password_sent_at" t.datetime "reset_password_sent_at"
t.datetime "remember_created_at" t.datetime "remember_created_at"
t.integer "sign_in_count", default: 0, null: false t.integer "sign_in_count", default: 0, null: false
t.datetime "current_sign_in_at" t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at" t.datetime "last_sign_in_at"
t.string "current_sign_in_ip" t.string "current_sign_in_ip"
t.string "last_sign_in_ip" t.string "last_sign_in_ip"
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
t.string "screen_name" t.string "screen_name"
t.integer "friend_count", default: 0, null: false t.integer "friend_count", default: 0, null: false
t.integer "follower_count", default: 0, null: false t.integer "follower_count", default: 0, null: false
t.integer "asked_count", default: 0, null: false t.integer "asked_count", default: 0, null: false
t.integer "answered_count", default: 0, null: false t.integer "answered_count", default: 0, null: false
t.integer "commented_count", default: 0, null: false t.integer "commented_count", default: 0, null: false
t.string "display_name" t.string "display_name"
t.integer "smiled_count", default: 0, null: false t.integer "smiled_count", default: 0, null: false
t.boolean "admin", default: false, null: false t.boolean "admin", default: false, null: false
t.string "motivation_header", default: "", null: false t.string "motivation_header", default: "", null: false
t.string "website", default: "", null: false t.string "website", default: "", null: false
t.string "location", default: "", null: false t.string "location", default: "", null: false
t.text "bio", default: "", null: false t.text "bio", default: "", null: false
t.boolean "moderator", default: false, null: false t.boolean "moderator", default: false, null: false
t.string "profile_picture_file_name" t.string "profile_picture_file_name"
t.string "profile_picture_content_type" t.string "profile_picture_content_type"
t.integer "profile_picture_file_size" t.integer "profile_picture_file_size"
t.datetime "profile_picture_updated_at" t.datetime "profile_picture_updated_at"
t.boolean "profile_picture_processing" t.boolean "profile_picture_processing"
t.integer "crop_x" t.integer "crop_x"
t.integer "crop_y" t.integer "crop_y"
t.integer "crop_w" t.integer "crop_w"
t.integer "crop_h" t.integer "crop_h"
t.boolean "supporter", default: false t.boolean "supporter", default: false
t.boolean "privacy_allow_anonymous_questions", default: true t.boolean "privacy_allow_anonymous_questions", default: true
t.boolean "privacy_allow_public_timeline", default: true t.boolean "privacy_allow_public_timeline", default: true
t.boolean "privacy_allow_stranger_answers", default: true t.boolean "privacy_allow_stranger_answers", default: true
t.boolean "privacy_show_in_search", default: true t.boolean "privacy_show_in_search", default: true
t.boolean "permanently_banned", default: false t.boolean "permanently_banned", default: false
t.boolean "blogger", default: false t.boolean "blogger", default: false
t.boolean "contributor", default: false t.boolean "contributor", default: false
t.string "ban_reason" t.string "ban_reason"
t.datetime "banned_until" t.datetime "banned_until"
t.integer "comment_smiled_count", default: 0, null: false t.integer "comment_smiled_count", default: 0, null: false
t.string "profile_header_file_name" t.string "profile_header_file_name"
t.string "profile_header_content_type" t.string "profile_header_content_type"
t.integer "profile_header_file_size" t.integer "profile_header_file_size"
t.datetime "profile_header_updated_at" t.datetime "profile_header_updated_at"
t.boolean "profile_header_processing" t.boolean "profile_header_processing"
t.integer "crop_h_x" t.integer "crop_h_x"
t.integer "crop_h_y" t.integer "crop_h_y"
t.integer "crop_h_w" t.integer "crop_h_w"
t.integer "crop_h_h" t.integer "crop_h_h"
t.string "locale", default: "en" t.string "locale", default: "en"
t.boolean "translator", default: false t.boolean "translator", default: false
t.string "confirmation_token" t.string "confirmation_token"
t.datetime "confirmed_at" t.datetime "confirmed_at"
t.datetime "confirmation_sent_at" t.datetime "confirmation_sent_at"
t.string "unconfirmed_email" t.string "unconfirmed_email"
t.boolean "show_foreign_themes", default: true, null: false t.boolean "show_foreign_themes", default: true, null: false
t.string "export_url" t.string "export_url"
t.boolean "export_processing", default: false, null: false t.boolean "export_processing", default: false, null: false
t.datetime "export_created_at" t.datetime "export_created_at"
t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true
t.index ["email"], name: "index_users_on_email", unique: true
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
t.index ["screen_name"], name: "index_users_on_screen_name", unique: true
end end
add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true, using: :btree
add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
add_index "users", ["screen_name"], name: "index_users_on_screen_name", unique: true, using: :btree
end end