Ubuntu 14.04 Trusty 64bits

Logs

====== Attempt #1

-----> Fetching repository

Cloning into '/tmp/d20180111-2197-1q14gzz/input'...

Checking out files: 40% (10193/24867) Checking out files: 41% (10196/24867) Checking out files: 42% (10445/24867) Checking out files: 43% (10693/24867) Checking out files: 44% (10942/24867) Checking out files: 45% (11191/24867) Checking out files: 46% (11439/24867) Checking out files: 47% (11688/24867) Checking out files: 48% (11937/24867) Checking out files: 49% (12185/24867) Checking out files: 50% (12434/24867) Checking out files: 51% (12683/24867) Checking out files: 52% (12931/24867) Checking out files: 53% (13180/24867) Checking out files: 54% (13429/24867) Checking out files: 55% (13677/24867) Checking out files: 56% (13926/24867) Checking out files: 57% (14175/24867) Checking out files: 58% (14423/24867) Checking out files: 59% (14672/24867) Checking out files: 60% (14921/24867) Checking out files: 61% (15169/24867) Checking out files: 62% (15418/24867) Checking out files: 63% (15667/24867) Checking out files: 64% (15915/24867) Checking out files: 65% (16164/24867) Checking out files: 66% (16413/24867) Checking out files: 67% (16661/24867) Checking out files: 68% (16910/24867) Checking out files: 69% (17159/24867) Checking out files: 70% (17407/24867) Checking out files: 71% (17656/24867) Checking out files: 72% (17905/24867) Checking out files: 73% (18153/24867) Checking out files: 74% (18402/24867) Checking out files: 75% (18651/24867) Checking out files: 76% (18899/24867) Checking out files: 77% (19148/24867) Checking out files: 78% (19397/24867) Checking out files: 79% (19645/24867) Checking out files: 80% (19894/24867) Checking out files: 81% (20143/24867) Checking out files: 82% (20391/24867) Checking out files: 83% (20640/24867) Checking out files: 84% (20889/24867) Checking out files: 85% (21137/24867) Checking out files: 86% (21386/24867) Checking out files: 87% (21635/24867) Checking out files: 88% (21883/24867) Checking out files: 89% (22132/24867) Checking out files: 90% (22381/24867) Checking out files: 91% (22629/24867) Checking out files: 92% (22878/24867) Checking out files: 93% (23127/24867) Checking out files: 94% (23375/24867) Checking out files: 95% (23624/24867) Checking out files: 96% (23873/24867) Checking out files: 97% (24121/24867) Checking out files: 98% (24370/24867) Checking out files: 99% (24619/24867) Checking out files: 100% (24867/24867) Checking out files: 100% (24867/24867), done.

-----> Setting up package repository...

-----> Starting packaging process

-----> Starting service postgres...

-----> Starting service redis...

-----> Additional environment variables

UUID=d5bdb571-249b-4e4c-8d38-4cd96fe34c87

DATABASE_URL=postgres://postgres:DDX6z_Gt7D-wgtlO@8.26.94.84:35681/postgres

DATABASE_HOST=8.26.94.84

DATABASE_PORT=35681

REDIS_URL=redis://8.26.94.84:35683

REDIS_HOST=8.26.94.84

REDIS_PORT=35683

HOME=/home/pkgr

-----> Reusing cache

-----> Fetching pkgr aed4fae521d50143d1ea391fcf06f078d2d1a013...

-----> Starting packaging process...

-----> Fetching buildpack https://github.com/pkgr/heroku-buildpack-ruby.git at v164-1

-----> Running hook: "./packaging/setup.sh"

-----> Ruby app

-----> Compiling Ruby/Rails

-----> Using Ruby version: ruby-2.4.1

-----> Installing dependencies using bundler 1.15.1

cp: ‘/entrypoint/cache/vendor/bundle/.’ and ‘/entrypoint/cache/vendor/bundle/.’ are the same file

Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment

Warning: the running version of Bundler (1.15.1) is older than the version that created the lockfile (1.16.0). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.

Fetching gem metadata from https://rubygems.org/.......

Fetching version metadata from https://rubygems.org/..

Fetching dependency metadata from https://rubygems.org/.

Using rake 12.1.0

Using msgpack 1.1.0

Using concurrent-ruby 1.0.5

Using i18n 0.8.6

Using minitest 5.10.3

Using thread_safe 0.3.6

Using builder 3.2.3

Using erubi 1.6.1

Using mini_portile2 2.3.0

Using crass 1.0.2

Using rack 2.0.3

Using mime-types-data 3.2016.0521

Using arel 8.0.0

Using method_source 0.8.2

Using thor 0.19.4

Using mini_mime 0.1.3

Using ffi 1.9.18

Using hiredis 0.6.1

Using redis 3.3.5

Using fast_blank 1.0.0

Using htmlentities 4.3.4

Using moneta 1.0.0

Using multi_json 1.12.1

Using mustache 1.0.5

Using http_accept_language 2.0.5

Using ember-source 2.13.3

Using execjs 2.7.0

Using fast_xs 0.8.0

Using discourse_fastimage 2.1.0

Using aws-partitions 1.24.0

Using aws-sigv4 1.0.2

Using jmespath 1.3.1

Using excon 0.56.0

Using unf_ext 0.0.7.4

Using email_reply_trimmer 0.1.8

Using exifr 1.2.5

Using fspath 3.1.0

Using image_size 1.5.0

Using in_threads 1.4.0

Using progress 3.3.1

Using ast 2.3.0

Using ansi 1.5.0

Using hashie 3.5.5

Using ruby-openid 2.7.0

Using multipart-post 2.0.0

Using jwt 1.5.6

Using multi_xml 0.6.0

Using oauth 0.5.1

Using oj 3.1.0

Using pg 0.20.0

Using coderay 1.1.1

Using slop 3.6.0

Using r2 0.2.6

Using rinku 2.0.2

Using connection_pool 2.2.1

Using tilt 2.0.7

Using libv8 5.9.211.38.1 (x86_64-linux)

Using highline 1.7.8

Using rtlit 0.0.5

Using lru_redux 1.1.0

Using flamegraph 0.9.5

Using kgio 2.11.0

Using raindrops 0.19.0

Using puma 3.9.1

Using trollop 2.1.2

Using gc_tracer 1.5.1

Using guess_html_encoding 0.0.11

Using stackprof 0.2.10

Using memory_profiler 0.9.8

Using cppjieba_rb 0.3.0

Using request_store 1.3.2

Using logstash-event 1.2.02

Using logster 1.2.9

Using sass 3.4.24

Using bundler 1.15.1

Using rake-compiler 1.0.4

Using bootsnap 1.0.0

Using tzinfo 1.2.3

Using nokogiri 1.8.1

Using mime-types 3.1

Using rack-test 0.7.0

Using sprockets 3.7.1

Using message_bus 2.1.1

Using rack-protection 2.0.0

Using rack-mini-profiler 0.10.7

Using redis-namespace 1.5.3

Using mini_suffix 0.3.0

Using ember-data-source 2.2.1

Using barber 0.11.2

Using uglifier 3.2.0

Using aws-sdk-core 3.6.0

Using unf 0.1.4

Using ruby-ll 2.1.2

Using omniauth 1.6.1

Using rack-openid 1.3.1

Using openid-redis-store 0.0.2

Using discourse_image_optim 0.24.5

Using pry 0.10.4

Using faraday 0.11.0

Using mini_racer 0.1.11

Using unicorn 5.3.1

Using rbtrace 0.4.8

Using logstash-logger 0.25.1

Using fast_xor 1.1.3

Using loofah 2.1.1

Using nokogumbo 1.4.13

Using ruby-readability 0.7.0

Using activesupport 5.1.4

Using sassc 1.11.2

Using mail 2.6.6

Using sidekiq 5.0.5

Using ember-handlebars-template 0.7.5

Using aws-sdk-kms 1.2.0

Using oga 2.10

Using omniauth-oauth 1.1.0

Using omniauth-openid 1.0.1

Using pry-rails 0.3.4

Using oauth2 1.3.1

Using rails-html-sanitizer 1.0.3

Using sanitize 4.5.0

Using rails-dom-testing 2.0.3

Using globalid 0.4.0

Using activemodel 5.1.4

Using aws-sdk-s3 1.4.0

Using omniauth-twitter 1.3.0

Using omniauth-oauth2 1.4.0

Using onebox 1.8.33

Using actionview 5.1.4

Using activejob 5.1.4

Using activerecord 5.1.4

Using active_model_serializers 0.8.3

Using omniauth-facebook 4.0.0

Using omniauth-instagram 1.0.2

Using omniauth-github 1.3.0

Using omniauth-google-oauth2 0.3.1

Using actionpack 5.1.4

Using seed-fu 2.3.7

Using railties 5.1.4

Using sprockets-rails 3.2.0

Using jquery-rails 4.3.1

Using rails_multisite 1.1.2

Using lograge 0.7.1

Using ember-rails 0.18.5

Using actionmailer 5.1.4

Bundle complete! 105 Gemfile dependencies, 144 gems now installed.

Gems in the groups development and test were not installed.

Bundled gems are installed into ./vendor/bundle.

The latest bundler is 1.16.1, but you are currently running 1.15.1.

To update, run `gem install bundler`

Bundle completed (8.19s)

Cleaning up the bundler cache.

Warning: the running version of Bundler (1.15.1) is older than the version that created the lockfile (1.16.0). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.

The latest bundler is 1.16.1, but you are currently running 1.15.1.

To update, run `gem install bundler`

-----> Installing node-v6.10.0-linux-x64

-----> Detecting rake tasks

-----> Preparing app for Rails asset pipeline

Running: rake assets:precompile

fatal: Not a git repository (or any of the parent directories): .git

== 20000225050318 AddSchemaMigrationDetails: migrating ========================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:schema_migration_details, {:id=>:integer})

-> 0.0032s

-- add_index(:schema_migration_details, [:version])

-> 0.0026s

-- execute("INSERT INTO schema_migration_details(version, created_at)n SELECT version, current_timestampn FROM schema_migrationsn ORDER BY versionn ")

-> 0.0003s

== 20000225050318 AddSchemaMigrationDetails: migrated (0.0092s) ===============

== 20120311163914 CreateForumThreads: migrating ===============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:forum_threads, {:id=>:integer})

-> 0.0027s

== 20120311163914 CreateForumThreads: migrated (0.0050s) ======================

== 20120311164326 CreatePosts: migrating ======================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:posts, {:id=>:integer})

-> 0.0029s

-- add_index(:posts, [:forum_thread_id, :created_at])

-> 0.0021s

== 20120311164326 CreatePosts: migrated (0.0068s) =============================

== 20120311170118 CreateUsers: migrating ======================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:users, {:id=>:integer})

-> 0.0030s

== 20120311170118 CreateUsers: migrated (0.0044s) =============================

== 20120311201341 CreateForums: migrating =====================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:forums, {:id=>:integer})

-> 0.0020s

== 20120311201341 CreateForums: migrated (0.0059s) ============================

== 20120311210245 CreateSites: migrating ======================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:sites, {:id=>:integer})

-> 0.0021s

== 20120311210245 CreateSites: migrated (0.0035s) =============================

== 20120416201606 AddReplyToToPosts: migrating ================================

-- add_column(:posts, :reply_to_post_number, :integer, {:null=>true})

-> 0.0004s

-- add_index(:posts, :reply_to_post_number)

-> 0.0020s

== 20120416201606 AddReplyToToPosts: migrated (0.0048s) =======================

== 20120420183447 AddViewsToForumThreads: migrating ===========================

-- add_column(:forum_threads, :views, :integer, {:default=>0, :null=>false})

-> 0.0034s

== 20120420183447 AddViewsToForumThreads: migrated (0.0101s) ==================

== 20120423140906 AddPostsCountToForumThreads: migrating ======================

-- add_column(:forum_threads, :posts_count, :integer, {:default=>0, :null=>false})

-> 0.0034s

-- execute("UPDATE forum_threads SET posts_count = (SELECT count(*) FROM posts WHERE posts.forum_thread_id = forum_threads.id)")

-> 0.0007s

== 20120423140906 AddPostsCountToForumThreads: migrated (0.0096s) =============

== 20120423142820 FixPostIndices: migrating ===================================

-- index_name(:posts, {:column=>[:forum_thread_id, :created_at]})

-> 0.0000s

-- index_name_exists?(:posts, "index_posts_on_forum_thread_id_and_created_at")

-> 0.0008s

-- remove_index(:posts, {:column=>[:forum_thread_id, :created_at], :name=>"index_posts_on_forum_thread_id_and_created_at"})

-> 0.0039s

-- add_index(:posts, [:forum_thread_id, :post_number])

-> 0.0048s

== 20120423142820 FixPostIndices: migrated (0.0111s) ==========================

== 20120423151548 RemoveLastPostId: migrating =================================

-- remove_column(:forum_threads, :last_post_id)

-> 0.0004s

== 20120423151548 RemoveLastPostId: migrated (0.0046s) ========================

== 20120425145456 AddDisplayUsernameToUsers: migrating ========================

-- add_column(:users, :display_username, :string)

-> 0.0050s

-- execute("UPDATE users SET display_username = username")

-> 0.0005s

-- execute("UPDATE users SET username = REPLACE(username, ' ', '')")

-> 0.0003s

-- add_index(:users, :username, {:unique=>true})

-> 0.0024s

== 20120425145456 AddDisplayUsernameToUsers: migrated (0.0137s) ===============

== 20120427150624 AddUserIdIndexToPosts: migrating ============================

-- add_index(:posts, :user_id)

-> 0.0023s

== 20120427150624 AddUserIdIndexToPosts: migrated (0.0151s) ===================

== 20120427151452 CookedMigration: migrating ==================================

-- rename_column(:posts, :content, :raw)

-> 0.0027s

-- rename_column(:posts, :formatted_content, :cooked)

-> 0.0026s

== 20120427151452 CookedMigration: migrated (0.0072s) =========================

== 20120427154330 CreateVestalVersions: migrating =============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:versions, {:id=>:integer})

-> 0.0029s

-- change_table(:versions, {})

-> 0.0156s

== 20120427154330 CreateVestalVersions: migrated (0.0211s) ====================

== 20120427172031 AddVersionToPosts: migrating ================================

-- add_column(:posts, :cached_version, :integer, {:null=>false, :default=>1})

-> 0.0040s

== 20120427172031 AddVersionToPosts: migrated (0.0060s) =======================

== 20120502183240 AddCreatedByToForumThreads: migrating =======================

-- add_column(:forum_threads, :user_id, :integer)

-> 0.0005s

-- execute("update forum_threads tn set user_id = (select user_id from posts where forum_thread_id = t.Id order by post_number asc limit 1)")

-> 0.0007s

-- change_column(:forum_threads, :user_id, :integer, {:null=>false})

-> 0.0005s

== 20120502183240 AddCreatedByToForumThreads: migrated (0.0037s) ==============

== 20120502192121 AddLastPostUserIdToForumThreads: migrating ==================

-- add_column(:forum_threads, :last_post_user_id, :integer)

-> 0.0004s

-- execute("update forum_threads tn set last_post_user_id = (select user_id from posts where forum_thread_id = t.Id order by post_number desc limit 1)")

-> 0.0004s

-- change_column(:forum_threads, :last_post_user_id, :integer, {:null=>false})

-> 0.0005s

== 20120502192121 AddLastPostUserIdToForumThreads: migrated (0.0025s) =========

== 20120503205521 AddSiteIdToUsers: migrating =================================

-- add_column(:users, :site_id, :integer)

-> 0.0004s

-- add_column(:users, :bio, :text)

-> 0.0003s

-- add_index(:users, :site_id)

-> 0.0035s

-- execute("UPDATE users SET site_id = 1")

-> 0.0004s

== 20120503205521 AddSiteIdToUsers: migrated (0.0063s) ========================

== 20120507144132 CreateExpressions: migrating ================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:expressions, {:id=>false, :force=>true})

-> 0.0010s

-- add_index(:expressions, [:parent_id, :parent_type, :expression_type_id, :user_id], {:unique=>true, :name=>"expressions_pk"})

-> 0.0023s

== 20120507144132 CreateExpressions: migrated (0.0046s) =======================

== 20120507144222 CreateExpressionTypes: migrating ============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:expression_types, {:id=>:integer})

-> 0.0020s

-- add_index(:expression_types, [:site_id, :name], {:unique=>true})

-> 0.0022s

== 20120507144222 CreateExpressionTypes: migrated (0.0059s) ===================

== 20120514144549 AddReplyCountToPosts: migrating =============================

-- add_column(:posts, :reply_count, :integer, {:null=>false, :default=>0})

-> 0.0039s

-- execute("UPDATE postsn SET reply_count = (SELECT count(*) FROM posts AS p2 WHERE p2.reply_to_post_number = posts.post_number)")

-> 0.0005s

== 20120514144549 AddReplyCountToPosts: migrated (0.0057s) ====================

== 20120514173920 AddFlagToExpressionTypes: migrating =========================

-- add_column(:expression_types, :flag, :boolean, {:default=>false})

-> 0.0026s

== 20120514173920 AddFlagToExpressionTypes: migrated (0.0039s) ================

== 20120514204934 AddDescriptionToExpressionTypes: migrating ==================

-- add_column(:expression_types, :description, :text, {:null=>true})

-> 0.0016s

== 20120514204934 AddDescriptionToExpressionTypes: migrated (0.0034s) =========

== 20120517200130 AddQuotelessToPost: migrating ===============================

-- add_column(:posts, :quoteless, :boolean, {:default=>false})

-> 0.0041s

== 20120517200130 AddQuotelessToPost: migrated (0.0054s) ======================

== 20120518200115 CreateReadPosts: migrating ==================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:read_posts, {:id=>false})

-> 0.0008s

-- add_index(:read_posts, [:forum_thread_id, :user_id, :page], {:unique=>true})

-> 0.0024s

== 20120518200115 CreateReadPosts: migrated (0.0047s) =========================

== 20120519182212 CreateLastReadPosts: migrating ==============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:last_read_posts, {:id=>:integer})

-> 0.0021s

-- add_index(:last_read_posts, [:user_id, :forum_thread_id], {:unique=>true})

-> 0.0021s

== 20120519182212 CreateLastReadPosts: migrated (0.0058s) =====================

== 20120523180723 CreateViews: migrating ======================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:views, {:id=>false})

-> 0.0008s

-- add_index(:views, [:parent_id, :parent_type])

-> 0.0022s

-- add_index(:views, [:parent_id, :parent_type, :ip, :viewed_at], {:unique=>true, :name=>"unique_views"})

-> 0.0023s

== 20120523180723 CreateViews: migrated (0.0068s) =============================

== 20120523184307 AddRepliesToForumThreads: migrating =========================

-- add_column(:forum_threads, :reply_count, :integer, {:default=>0, :null=>false})

-> 0.0029s

-- execute("UPDATE forum_threads SET reply_count = (SELECT COUNT(*) FROM posts WHERE posts.reply_to_post_number IS NOT NULL AND posts.forum_thread_id = forum_threads.id)")

-> 0.0006s

== 20120523184307 AddRepliesToForumThreads: migrated (0.0061s) ================

== 20120523201329 AddFeaturedToForumThreads: migrating ========================

-- add_column(:forum_threads, :featured_user1_id, :integer, {:null=>true})

-> 0.0005s

-- add_column(:forum_threads, :featured_user2_id, :integer, {:null=>true})

-> 0.0003s

-- add_column(:forum_threads, :featured_user3_id, :integer, {:null=>true})

-> 0.0003s

== 20120523201329 AddFeaturedToForumThreads: migrated (0.0028s) ===============

== 20120525194845 AddAvgTimeToForumThreads: migrating =========================

-- add_column(:forum_threads, :avg_time, :integer)

-> 0.0004s

-- execute("update forum_threads SET avg_time = abs(random() * 1200)")

-> 0.0005s

== 20120525194845 AddAvgTimeToForumThreads: migrated (0.0022s) ================

== 20120529175956 CreateUploads: migrating ====================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:uploads, {:id=>:integer})

-> 0.0035s

-- add_index(:uploads, :forum_thread_id)

-> 0.0023s

-- add_index(:uploads, :user_id)

-> 0.0021s

== 20120529175956 CreateUploads: migrated (0.0097s) ===========================

== 20120529202707 CreateStars: migrating ======================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:stars, {:id=>false})

-> 0.0009s

-- add_index(:stars, [:parent_id, :parent_type, :user_id])

-> 0.0023s

== 20120529202707 CreateStars: migrated (0.0054s) =============================

== 20120530150726 CreateForumThreadUser: migrating ============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:forum_thread_users, {:id=>false})

-> 0.0017s

-- execute("DELETE FROM read_posts")

-> 0.0004s

-- add_index(:forum_thread_users, [:forum_thread_id, :user_id], {:unique=>true})

-> 0.0021s

-- drop_table(:stars)

-> 0.0004s

-- drop_table(:last_read_posts)

-> 0.0007s

== 20120530150726 CreateForumThreadUser: migrated (0.0067s) ===================

== 20120530160745 MigratePosted: migrating ====================================

== 20120530160745 MigratePosted: migrated (0.0016s) ===========================

== 20120530200724 AddIndexToForumThreads: migrating ===========================

-- add_index(:forum_threads, :last_posted_at)

-> 0.0113s

== 20120530200724 AddIndexToForumThreads: migrated (0.0137s) ==================

== 20120530212912 CreateForumThreadLinks: migrating ===========================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:forum_thread_links, {:id=>:integer})

-> 0.0032s

-- add_index(:forum_thread_links, :forum_thread_id)

-> 0.0024s

== 20120530212912 CreateForumThreadLinks: migrated (0.0069s) ==================

== 20120614190726 AddTagsToForumThreads: migrating ============================

-- add_column(:forum_threads, :tag, :string, {:null=>true, :limit=>25})

-> 0.0004s

== 20120614190726 AddTagsToForumThreads: migrated (0.0021s) ===================

== 20120614202024 AddQuoteCountToPosts: migrating =============================

-- add_column(:posts, :quote_count, :integer, {:default=>0, :null=>false})

-> 0.0041s

-- execute("UPDATE posts SET quote_count = 1 WHERE quoteless = 'f'")

-> 0.0004s

-- remove_column(:posts, :quoteless)

-> 0.0003s

== 20120614202024 AddQuoteCountToPosts: migrated (0.0065s) ====================

== 20120615180517 CreateBookmarks: migrating ==================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:bookmarks, {:id=>:integer})

-> 0.0025s

-- add_index(:bookmarks, [:user_id, :post_id], {:unique=>true})

-> 0.0023s

== 20120615180517 CreateBookmarks: migrated (0.0063s) =========================

== 20120618152946 AddReplyBelowToPosts: migrating =============================

-- add_column(:posts, :reply_below_post_number, :integer, {:null=>true})

-> 0.0004s

== 20120618152946 AddReplyBelowToPosts: migrated (0.0025s) ====================

== 20120618212349 CreatePostTimings: migrating ================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:post_timings, {:id=>:integer})

-> 0.0019s

-- add_index(:post_timings, [:thread_id, :post_number])

-> 0.0022s

-- add_index(:post_timings, [:thread_id, :post_number, :user_id], {:unique=>true})

-> 0.0020s

== 20120618212349 CreatePostTimings: migrated (0.0079s) =======================

== 20120618214856 CreateMessageBus: migrating =================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:message_bus, {:id=>:integer})

-> 0.0025s

-- add_index(:message_bus, [:created_at])

-> 0.0023s

== 20120618214856 CreateMessageBus: migrated (0.0067s) ========================

== 20120619150807 FixPostTimings: migrating ===================================

-- index_name(:post_timings, {:column=>[:thread_id, :post_number]})

-> 0.0000s

-- index_name_exists?(:post_timings, "index_post_timings_on_thread_id_and_post_number")

-> 0.0009s

-- remove_index(:post_timings, {:column=>[:thread_id, :post_number], :name=>"index_post_timings_on_thread_id_and_post_number"})

-> 0.0027s

-- index_name(:post_timings, {:column=>[:thread_id, :post_number, :user_id]})

-> 0.0000s

-- index_name_exists?(:post_timings, "index_post_timings_on_thread_id_and_post_number_and_user_id")

-> 0.0007s

-- remove_index(:post_timings, {:column=>[:thread_id, :post_number, :user_id], :name=>"index_post_timings_on_thread_id_and_post_number_and_user_id"})

-> 0.0020s

-- rename_column(:post_timings, :thread_id, :forum_thread_id)

-> 0.0012s

-- add_index(:post_timings, [:forum_thread_id, :post_number], {:name=>"post_timings_summary"})

-> 0.0022s

-- add_index(:post_timings, [:forum_thread_id, :post_number, :user_id], {:unique=>true, :name=>"post_timings_unique"})

-> 0.0020s

== 20120619150807 FixPostTimings: migrated (0.0143s) ==========================

== 20120619153349 DropReadPosts: migrating ====================================

-- drop_table(:read_posts)

-> 0.0005s

== 20120619153349 DropReadPosts: migrated (0.0023s) ===========================

== 20120619172714 AddPostNumberToBookmarks: migrating =========================

-- drop_table(:bookmarks)

-> 0.0009s

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:bookmarks, {:id=>:integer})

-> 0.0024s

-- add_index(:bookmarks, [:user_id, :forum_thread_id, :post_number], {:unique=>true})

-> 0.0022s

== 20120619172714 AddPostNumberToBookmarks: migrated (0.0070s) ================

== 20120621155351 AddSeenPostCountToForumThreadUsers: migrating ===============

-- remove_column(:post_timings, :id)

-> 0.0007s

-- remove_column(:forum_thread_users, :created_at)

-> 0.0005s

-- remove_column(:forum_thread_users, :updated_at)

-> 0.0002s

-- add_column(:forum_thread_users, :seen_post_count, :integer)

-> 0.0003s

== 20120621155351 AddSeenPostCountToForumThreadUsers: migrated (0.0044s) ======

== 20120621190310 AddDeletedAtToForumThreads: migrating =======================

-- add_column(:forum_threads, :deleted_at, :datetime)

-> 0.0005s

== 20120621190310 AddDeletedAtToForumThreads: migrated (0.0028s) ==============

== 20120622200242 CreateNotifications: migrating ==============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:notifications, {:id=>:integer})

-> 0.0035s

-- add_index(:notifications, [:user_id, :created_at])

-> 0.0071s

== 20120622200242 CreateNotifications: migrated (0.0131s) =====================

== 20120625145714 AddSeenNotificationIdToUsers: migrating =====================

-- execute("TRUNCATE TABLE notifications")

-> 0.0017s

-- add_column(:users, :seen_notificaiton_id, :integer, {:default=>0, :null=>false})

-> 0.0042s

-- add_column(:notifications, :forum_thread_id, :integer, {:null=>true})

-> 0.0004s

-- add_column(:notifications, :post_number, :integer, {:null=>true})

-> 0.0003s

== 20120625145714 AddSeenNotificationIdToUsers: migrated (0.0095s) ============

== 20120625162318 AddDeletedAtToPosts: migrating ==============================

-- add_column(:posts, :deleted_at, :datetime)

-> 0.0005s

== 20120625162318 AddDeletedAtToPosts: migrated (0.0020s) =====================

== 20120625174544 AddHighestPostNumberToForumThreads: migrating ===============

-- add_column(:forum_threads, :highest_post_number, :integer, {:default=>0, :null=>false})

-> 0.0045s

-- execute("UPDATE forum_threads SET highest_post_number = (SELECT MAX(post_number) FROM posts WHERE posts.forum_thread_id = forum_threads.id)")

-> 0.0008s

== 20120625174544 AddHighestPostNumberToForumThreads: migrated (0.0066s) ======

== 20120625195326 AddImageUrlToForumThreads: migrating ========================

-- add_column(:forum_threads, :image_url, :string)

-> 0.0005s

== 20120625195326 AddImageUrlToForumThreads: migrated (0.0016s) ===============

== 20120629143908 RenameExpressionTypeId: migrating ===========================

-- add_column(:expression_types, :expression_index, :integer)

-> 0.0004s

-- execute("UPDATE expression_types SET expression_index = id")

-> 0.0003s

-- remove_column(:expression_types, :id)

-> 0.0005s

-- add_index(:expression_types, [:site_id, :expression_index], {:unique=>true})

-> 0.0023s

== 20120629143908 RenameExpressionTypeId: migrated (0.0052s) ==================

== 20120629150253 DenormalizeExpressions: migrating ===========================

-- add_column(:posts, :expression1_count, :integer, {:null=>false, :default=>0})

-> 0.0048s

-- add_column(:posts, :expression2_count, :integer, {:null=>false, :default=>0})

-> 0.0042s

-- add_column(:posts, :expression3_count, :integer, {:null=>false, :default=>0})

-> 0.0044s

-- add_column(:posts, :expression4_count, :integer, {:null=>false, :default=>0})

-> 0.0040s

-- add_column(:posts, :expression5_count, :integer, {:null=>false, :default=>0})

-> 0.0042s

-- add_column(:forum_threads, :expression1_count, :integer, {:null=>false, :default=>0})

-> 0.0035s

-- add_column(:forum_threads, :expression2_count, :integer, {:null=>false, :default=>0})

-> 0.0036s

-- add_column(:forum_threads, :expression3_count, :integer, {:null=>false, :default=>0})

-> 0.0051s

-- add_column(:forum_threads, :expression4_count, :integer, {:null=>false, :default=>0})

-> 0.0035s

-- add_column(:forum_threads, :expression5_count, :integer, {:null=>false, :default=>0})

-> 0.0037s

-- execute("update posts set expression1_count = (select count(*) from expressions where parent_id = posts.id and expression_type_id = 1)")

-> 0.0007s

-- execute("update forum_threads set expression1_count = (select sum(expression1_count) from posts where forum_thread_id = forum_threads.id)")

-> 0.0005s

-- execute("update posts set expression2_count = (select count(*) from expressions where parent_id = posts.id and expression_type_id = 2)")

-> 0.0003s

-- execute("update forum_threads set expression2_count = (select sum(expression2_count) from posts where forum_thread_id = forum_threads.id)")

-> 0.0003s

-- execute("update posts set expression3_count = (select count(*) from expressions where parent_id = posts.id and expression_type_id = 3)")

-> 0.0003s

-- execute("update forum_threads set expression3_count = (select sum(expression3_count) from posts where forum_thread_id = forum_threads.id)")

-> 0.0003s

-- execute("update posts set expression4_count = (select count(*) from expressions where parent_id = posts.id and expression_type_id = 4)")

-> 0.0003s

-- execute("update forum_threads set expression4_count = (select sum(expression4_count) from posts where forum_thread_id = forum_threads.id)")

-> 0.0003s

-- execute("update posts set expression5_count = (select count(*) from expressions where parent_id = posts.id and expression_type_id = 5)")

-> 0.0003s

-- execute("update forum_threads set expression5_count = (select sum(expression5_count) from posts where forum_thread_id = forum_threads.id)")

-> 0.0003s

== 20120629150253 DenormalizeExpressions: migrated (0.0466s) ==================

== 20120629151243 MakeExpressionsLessGeneric: migrating =======================

-- rename_column(:expressions, :parent_id, :post_id)

-> 0.0022s

-- rename_column(:expressions, :expression_type_id, :expression_index)

-> 0.0020s

-- remove_column(:expressions, :parent_type)

-> 0.0004s

-- add_index(:expressions, [:post_id, :expression_index, :user_id], {:unique=>true, :name=>"unique_by_user"})

-> 0.0021s

== 20120629151243 MakeExpressionsLessGeneric: migrated (0.0081s) ==============

== 20120629182637 CreateIncomingLinks: migrating ==============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:incoming_links, {:id=>:integer})

-> 0.0031s

-- add_index(:incoming_links, [:site_id, :forum_thread_id, :post_number], {:name=>"incoming_index"})

-> 0.0021s

== 20120629182637 CreateIncomingLinks: migrated (0.0069s) =====================

== 20120702211427 CreateReplies: migrating ====================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:post_replies, {:id=>false})

-> 0.0008s

-- add_index(:post_replies, [:post_id, :reply_id], {:unique=>true})

-> 0.0021s

-- execute("INSERT INTO post_replies (post_id, reply_id, created_at, updated_at)n SELECT p2.id, p.id, CURRENT_TIMESTAMP, CURRENT_TIMESTAMPn FROM posts AS pn INNER JOIN posts AS p2 on p2.post_number = p.reply_to_post_number AND p2.forum_thread_id = P.forum_thread_idn WHERE p.forum_thread_id IS NOT NULL")

-> 0.0006s

== 20120702211427 CreateReplies: migrated (0.0084s) ===========================

== 20120703184734 AddReflectionToForumThreadLinks: migrating ==================

-- add_column(:forum_thread_links, :reflection, :boolean, {:default=>false})

-> 0.0048s

-- change_column(:forum_thread_links, :post_id, :integer, {:null=>true})

-> 0.0005s

== 20120703184734 AddReflectionToForumThreadLinks: migrated (0.0101s) =========

== 20120703201312 AddIncomingLinkCountToPosts: migrating ======================

-- add_column(:posts, :incoming_link_count, :integer, {:default=>0, :null=>false})

-> 0.0053s

== 20120703201312 AddIncomingLinkCountToPosts: migrated (0.0101s) =============

== 20120703203623 AddIncomingLinkCountToForumThreads: migrating ===============

-- add_column(:forum_threads, :incoming_link_count, :integer, {:default=>0, :null=>false})

-> 0.0035s

== 20120703203623 AddIncomingLinkCountToForumThreads: migrated (0.0049s) ======

== 20120703210004 AddBookmarkCountToPosts: migrating ==========================

-- add_column(:posts, :bookmark_count, :integer, {:default=>0, :null=>false})

-> 0.0044s

-- add_column(:forum_threads, :bookmark_count, :integer, {:default=>0, :null=>false})

-> 0.0036s

-- add_column(:forum_threads, :star_count, :integer, {:default=>0, :null=>false})

-> 0.0032s

-- execute("UPDATE posts SET bookmark_count = (SELECT COUNT(*)n FROM bookmarksn WHERE post_number = posts.post_number AND forum_thread_id = posts.forum_thread_id)")

-> 0.0006s

-- execute("UPDATE forum_threads SET bookmark_count = (SELECT COUNT(*)n FROM bookmarksn WHERE forum_thread_id = forum_threads.id)")

-> 0.0004s

-- execute("UPDATE forum_threads SET star_count = (SELECT COUNT(*)n FROM forum_thread_usersn WHERE forum_thread_id = forum_threads.id AND starred = true)")

-> 0.0004s

== 20120703210004 AddBookmarkCountToPosts: migrated (0.0145s) =================

== 20120704160659 AddAvgTimeToPosts: migrating ================================

-- add_column(:posts, :avg_time, :integer, {:null=>true})

-> 0.0004s

-- add_column(:posts, :score, :float, {:null=>true})

-> 0.0003s

== 20120704160659 AddAvgTimeToPosts: migrated (0.0025s) =======================

== 20120704201743 AddViewCountToPosts: migrating ==============================

-- add_column(:posts, :views, :integer, {:default=>0, :null=>false})

-> 0.0052s

-- execute("UPDATE posts SET views =n (SELECT COUNT(*) FROM post_timings WHERE forum_thread_id = posts.forum_thread_id AND post_number = posts.post_number)")

-> 0.0007s

== 20120704201743 AddViewCountToPosts: migrated (0.0071s) =====================

== 20120705181724 AddUserToVersions: migrating ================================

-- execute("UPDATE versions SET user_type = 'User', user_id = posts.user_idn FROM postsn WHERE posts.id = versions.versioned_id")

-> 0.0008s

== 20120705181724 AddUserToVersions: migrated (0.0025s) =======================

== 20120708210305 AddLastPostedAtToUsers: migrating ===========================

-- add_column(:users, :last_posted_at, :datetime, {:null=>true})

-> 0.0004s

-- add_index(:users, :last_posted_at)

-> 0.0020s

-- execute("UPDATE usersn SET last_posted_at = (SELECT MAX(posts.created_at)n FROM postsn WHERE posts.user_id = users.id)")

-> 0.0006s

== 20120708210305 AddLastPostedAtToUsers: migrated (0.0050s) ==================

== 20120712150500 CreateCategories: migrating =================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:categories, {:id=>:integer})

-> 0.0028s

-- add_index(:categories, :name, {:unique=>true})

-> 0.0021s

-- add_index(:categories, :forum_thread_count)

-> 0.0020s

-- execute("INSERT INTO categories (name, forum_thread_count, created_at, updated_At)n SELECT tag, count(*), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP from forum_threadsn WHERE tag IS NOT NULL AND tag <> 'null'n GROUP BY tag")

-> 0.0006s

== 20120712150500 CreateCategories: migrated (0.0111s) ========================

== 20120712151934 AddCategoryIdToForumThreads: migrating ======================

-- add_column(:forum_threads, :category_id, :integer)

-> 0.0004s

-- execute("UPDATE forum_threads SET category_id =n (SELECT idn FROM categoriesn WHERE name = forum_threads.tag)")

-> 0.0006s

-- remove_column(:forum_threads, :tag)

-> 0.0003s

== 20120712151934 AddCategoryIdToForumThreads: migrated (0.0043s) =============

== 20120713201324 CreateCategoryFeaturedThreads: migrating ====================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:category_featured_threads, {:id=>false})

-> 0.0008s

-- add_index(:category_featured_threads, [:category_id, :forum_thread_id], {:unique=>true, :name=>"cat_featured_threads"})

-> 0.0020s

== 20120713201324 CreateCategoryFeaturedThreads: migrated (0.0049s) ===========

== 20120716020835 CreateSiteSettings: migrating ===============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:site_settings, {:id=>:integer})

-> 0.0029s

== 20120716020835 CreateSiteSettings: migrated (0.0059s) ======================

== 20120716173544 AddStatsToCategories: migrating =============================

-- add_column(:categories, :posts_year, :integer)

-> 0.0004s

-- add_column(:categories, :posts_month, :integer)

-> 0.0002s

-- add_column(:categories, :posts_week, :integer)

-> 0.0003s

== 20120716173544 AddStatsToCategories: migrated (0.0028s) ====================

== 20120718044955 CreateUserOpenIds: migrating ================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:user_open_ids, {:id=>:integer})

-> 0.0028s

-- add_index(:user_open_ids, [:url])

-> 0.0029s

== 20120718044955 CreateUserOpenIds: migrated (0.0072s) =======================

== 20120719004636 AddEmailHashedPasswordNameSaltToUsers: migrating ============

-- add_column(:users, :email, :string, {:limit=>256})

-> 0.0004s

-- execute("update users set email= md5(random()::text) 'domain.com'")

-> 0.0004s

-- change_column(:users, :email, :string, {:limit=>256, :null=>false})

-> 0.0005s

-- add_index(:users, [:email], {:unique=>true})

-> 0.0026s

-- rename_column(:users, :display_username, :name)

-> 0.0032s

-- add_column(:users, :password_hash, :string, {:limit=>64})

-> 0.0004s

-- add_column(:users, :salt, :string, {:limit=>32})

-> 0.0003s

-- add_column(:users, :active, :boolean)

-> 0.0002s

-- add_column(:users, :activation_key, :string, {:limit=>32})

-> 0.0002s

-- add_column(:user_open_ids, :active, :boolean, {:null=>false})

-> 0.0003s

== 20120719004636 AddEmailHashedPasswordNameSaltToUsers: migrated (0.0103s) ===

== 20120720013733 AddUsernameLowerToUsers: migrating ==========================

-- add_column(:users, :username_lower, :string, {:limit=>20})

-> 0.0004s

-- execute("update users set username_lower = lower(username)")

-> 0.0004s

-- add_index(:users, [:username_lower], {:unique=>true})

-> 0.0022s

-- change_column(:users, :username_lower, :string, {:limit=>20, :null=>false})

-> 0.0008s

== 20120720013733 AddUsernameLowerToUsers: migrated (0.0054s) =================

== 20120720044246 AddAuthTokenToUsers: migrating ==============================

-- add_column(:users, :auth_token, :string, {:limit=>32})

-> 0.0004s

-- add_index(:users, [:auth_token])

-> 0.0018s

== 20120720044246 AddAuthTokenToUsers: migrated (0.0082s) =====================

== 20120720162422 AddForumIdToCategories: migrating ===========================

-- add_column(:categories, :forum_id, :integer)

-> 0.0005s

-- execute("UPDATE categories SET forum_id = (SELECT MIN(id) FROM forums)")

-> 0.0005s

-- change_column(:categories, :forum_id, :integer, {:null=>false})

-> 0.0005s

== 20120720162422 AddForumIdToCategories: migrated (0.0037s) ==================

== 20120723051512 AddNotNullsToUserOpenIds: migrating =========================

-- change_column(:user_open_ids, :user_id, :integer, {:null=>false})

-> 0.0006s

-- change_column(:user_open_ids, :email, :string, {:null=>false})

-> 0.0004s

-- change_column(:user_open_ids, :url, :string, {:null=>false})

-> 0.0008s

== 20120723051512 AddNotNullsToUserOpenIds: migrated (0.0032s) ================

== 20120724234502 AddLastSeenAtToUsers: migrating =============================

-- add_column(:users, :last_seen_at, :datetime)

-> 0.0004s

== 20120724234502 AddLastSeenAtToUsers: migrated (0.0029s) ====================

== 20120724234711 AddWebsiteToUsers: migrating ================================

-- add_column(:users, :website, :string)

-> 0.0004s

== 20120724234711 AddWebsiteToUsers: migrated (0.0020s) =======================

== 20120725183347 AddExcerptToCategories: migrating ===========================

-- add_column(:categories, :excerpt, :string, {:limit=>250})

-> 0.0004s

== 20120725183347 AddExcerptToCategories: migrated (0.0022s) ==================

== 20120726201830 AddInvisibleToForumThread: migrating ========================

-- add_column(:forum_threads, :invisible, :boolean, {:default=>false, :null=>false})

-> 0.0045s

-- change_column(:categories, :excerpt, :text, {:null=>true})

-> 0.0013s

== 20120726201830 AddInvisibleToForumThread: migrated (0.0079s) ===============

== 20120726235129 AddUserIdToCategories: migrating ============================

-- add_column(:categories, :user_id, :integer)

-> 0.0005s

-- execute("UPDATE categories SET user_id = 1186")

-> 0.0003s

-- change_column(:categories, :user_id, :integer, {:null=>false})

-> 0.0004s

== 20120726235129 AddUserIdToCategories: migrated (0.0053s) ===================

== 20120727005556 RemoveExcerptFromCategories: migrating ======================

-- remove_column(:categories, :excerpt)

-> 0.0004s

== 20120727005556 RemoveExcerptFromCategories: migrated (0.0058s) =============

== 20120727150428 RenameInvisible: migrating ==================================

-- add_column(:forum_threads, :visible, :boolean, {:default=>true, :null=>false})

-> 0.0045s

-- execute("UPDATE forum_threads SET visible = CASE WHEN invisible THEN false ELSE true END")

-> 0.0005s

-- remove_column(:forum_threads, :invisible)

-> 0.0004s

== 20120727150428 RenameInvisible: migrated (0.0092s) =========================

== 20120727213543 AddThreadCountsToCategories: migrating ======================

-- add_column(:categories, :threads_year, :integer)

-> 0.0004s

-- add_column(:categories, :threads_month, :integer)

-> 0.0002s

-- add_column(:categories, :threads_week, :integer)

-> 0.0002s

-- remove_column(:categories, :posts_year)

-> 0.0002s

-- remove_column(:categories, :posts_month)

-> 0.0002s

-- remove_column(:categories, :posts_week)

-> 0.0002s

== 20120727213543 AddThreadCountsToCategories: migrated (0.0042s) =============

== 20120802151210 AddIconToExpressionTypes: migrating =========================

-- add_column(:expression_types, :icon, :string, {:limit=>20})

-> 0.0004s

-- execute("UPDATE expression_types SET icon = 'heart' WHERE expression_index = 1")

-> 0.0004s

== 20120802151210 AddIconToExpressionTypes: migrated (0.0069s) ================

== 20120803191426 AddAdminFlagToUsers: migrating ==============================

-- add_column(:users, :admin, :boolean, {:default=>false, :null=>false})

-> 0.0064s

-- add_column(:users, :moderator, :boolean, {:default=>false, :null=>false})

-> 0.0051s

-- execute("UPDATE users SET admin = TRUE where lower(username) in ('eviltrout', 'codinghorror', 'sam', 'hanzo')")

-> 0.0005s

== 20120803191426 AddAdminFlagToUsers: migrated (0.0143s) =====================

== 20120806030641 AddNewPasswordNewSaltEmailTokenToUsers: migrating ===========

-- add_column(:users, :new_salt, :string, {:limit=>32})

-> 0.0005s

-- add_column(:users, :new_password_hash, :string, {:limit=>64})

-> 0.0003s

-- add_column(:users, :email_token, :string, {:limit=>32})

-> 0.0003s

-- remove_column(:users, :activation_key)

-> 0.0002s

== 20120806030641 AddNewPasswordNewSaltEmailTokenToUsers: migrated (0.0035s) ==

== 20120806062617 RemoveNewPasswordStuffFromUser: migrating ===================

-- remove_column(:users, :new_password_hash)

-> 0.0004s

-- remove_column(:users, :new_salt)

-> 0.0002s

== 20120806062617 RemoveNewPasswordStuffFromUser: migrated (0.0018s) ==========

== 20120807223020 CreateActions: migrating ====================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:actions, {:id=>:integer})

-> 0.0021s

-- add_index(:actions, [:user_id, :action_type])

-> 0.0032s

-- add_index(:actions, [:acting_user_id])

-> 0.0021s

== 20120807223020 CreateActions: migrated (0.0114s) ===========================

== 20120809020415 RemoveSiteId: migrating =====================================

-- drop_table("sites")

-> 0.0007s

-- index_name("incoming_links", {:name=>"incoming_index"})

-> 0.0000s

-- index_name_exists?("incoming_links", "incoming_index")

-> 0.0007s

-- remove_index("incoming_links", {:name=>"incoming_index"})

-> 0.0004s

-- add_index("incoming_links", ["forum_thread_id", "post_number"], {:name=>"incoming_index"})

-> 0.0018s

-- remove_column("incoming_links", "site_id")

-> 0.0003s

-- index_name("users", {:name=>"index_users_on_site_id"})

-> 0.0000s

-- index_name_exists?("users", "index_users_on_site_id")

-> 0.0007s

-- remove_index("users", {:name=>"index_users_on_site_id"})

-> 0.0003s

-- remove_column("users", "site_id")

-> 0.0002s

-- index_name("expression_types", {:name=>"index_expression_types_on_site_id_and_expression_index"})

-> 0.0000s

-- index_name_exists?("expression_types", "index_expression_types_on_site_id_and_expression_index")

-> 0.0007s

-- remove_index("expression_types", {:name=>"index_expression_types_on_site_id_and_expression_index"})

-> 0.0003s

-- index_name("expression_types", {:name=>"index_expression_types_on_site_id_and_name"})

-> 0.0000s

-- index_name_exists?("expression_types", "index_expression_types_on_site_id_and_name")

-> 0.0006s

-- remove_index("expression_types", {:name=>"index_expression_types_on_site_id_and_name"})

-> 0.0003s

-- remove_column("expression_types", "site_id")

-> 0.0002s

-- add_index("expression_types", ["expression_index"], {:unique=>true})

-> 0.0018s

-- add_index("expression_types", ["name"], {:unique=>true})

-> 0.0024s

-- drop_table("forums")

-> 0.0006s

== 20120809020415 RemoveSiteId: migrated (0.0159s) ============================

== 20120809030647 RemoveForumId: migrating ====================================

-- remove_column("forum_threads", "forum_id")

-> 0.0004s

-- remove_column("categories", "forum_id")

-> 0.0003s

== 20120809030647 RemoveForumId: migrated (0.0031s) ===========================

== 20120809053414 CorrectIndexingOnPosts: migrating ===========================

-- execute("update posts ppnset post_number = c.real_numbernfromn(ntselect p1.id, count(*) real_number from posts p1ntjoin posts p2 on p1.forum_thread_id = p2.forum_thread_idntwhere p2.id <= p1.id and p1.forum_thread_id = p2.forum_thread_idn group by p1.idn) as cnwhere pp.id = c.id and pp.post_number <> c.real_number")

-> 0.0007s

-- index_name("posts", {:column=>["forum_thread_id", "post_number"]})

-> 0.0000s

-- index_name_exists?("posts", "index_posts_on_forum_thread_id_and_post_number")

-> 0.0008s

-- remove_index("posts", {:column=>["forum_thread_id", "post_number"], :name=>"index_posts_on_forum_thread_id_and_post_number"})

-> 0.0028s

-- add_index("posts", ["forum_thread_id", "post_number"], {:unique=>true})

-> 0.0027s

== 20120809053414 CorrectIndexingOnPosts: migrated (0.0112s) ==================

== 20120809154750 RemoveIndexForNow: migrating ================================

-- index_name("posts", {:column=>["forum_thread_id", "post_number"]})

-> 0.0000s

-- index_name_exists?("posts", "index_posts_on_forum_thread_id_and_post_number")

-> 0.0008s

-- remove_index("posts", {:column=>["forum_thread_id", "post_number"], :name=>"index_posts_on_forum_thread_id_and_post_number"})

-> 0.0028s

-- add_index("posts", ["forum_thread_id", "post_number"], {:unique=>false})

-> 0.0020s

== 20120809154750 RemoveIndexForNow: migrated (0.0094s) =======================

== 20120809174649 CreatePostActions: migrating ================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:post_actions, {:id=>:integer})

-> 0.0023s

-- add_index(:post_actions, ["post_id"])

-> 0.0021s

-- execute("create unique index idx_unique_actions onn post_actions(user_id, post_action_type_id, post_id) where deleted_at is null")

-> 0.0012s

== 20120809174649 CreatePostActions: migrated (0.0072s) =======================

== 20120809175110 CreatePostActionTypes: migrating ============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:post_action_types, {:id=>false})

-> 0.0020s

== 20120809175110 CreatePostActionTypes: migrated (0.0037s) ===================

== 20120809201855 MigrateBookmarksToPostActions: migrating ====================

-- drop_table("bookmarks")

-> 0.0006s

== 20120809201855 MigrateBookmarksToPostActions: migrated (0.0020s) ===========

== 20120810064839 RenameActionsToUserActions: migrating =======================

-- rename_table("actions", "user_actions")

-> 0.0048s

== 20120810064839 RenameActionsToUserActions: migrated (0.0062s) ==============

== 20120812235417 RetireExpressions: migrating ================================

-- execute("insert into post_actions (post_action_type_id, user_id, post_id, created_at, updated_at)nselectntcasent when expression_index=1 then 3nt when expression_index=2 then 4nt when expression_index=3 then 2ntendnnt, user_id, post_id, created_at, updated_at from expressions")

-> 0.0004s

-- drop_table("expressions")

-> 0.0004s

-- drop_table("expression_types")

-> 0.0006s

== 20120812235417 RetireExpressions: migrated (0.0027s) =======================

== 20120813004347 RenameExpressionColumnsInForumThread: migrating =============

-- rename_column("forum_threads", "expression1_count", "off_topic_count")

-> 0.0022s

-- rename_column("forum_threads", "expression2_count", "offensive_count")

-> 0.0019s

-- rename_column("forum_threads", "expression3_count", "like_count")

-> 0.0019s

-- remove_column("forum_threads", "expression4_count")

-> 0.0004s

-- remove_column("forum_threads", "expression5_count")

-> 0.0003s

== 20120813004347 RenameExpressionColumnsInForumThread: migrated (0.0094s) ====

== 20120813042912 RenameExpressionColumnsInPosts: migrating ===================

-- rename_column("posts", "expression1_count", "off_topic_count")

-> 0.0027s

-- rename_column("posts", "expression2_count", "offensive_count")

-> 0.0026s

-- rename_column("posts", "expression3_count", "like_count")

-> 0.0027s

-- remove_column("posts", "expression4_count")

-> 0.0004s

-- remove_column("posts", "expression5_count")

-> 0.0003s

== 20120813042912 RenameExpressionColumnsInPosts: migrated (0.0101s) ==========

== 20120813201426 CreateForumThreadLinkClicks: migrating ======================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:forum_thread_link_clicks, {:id=>:integer})

-> 0.0021s

-- add_column(:forum_thread_links, :clicks, :integer, {:default=>0, :null=>false})

-> 0.0038s

-- add_index(:forum_thread_link_clicks, :forum_thread_link_id, {:name=>:by_link})

-> 0.0046s

== 20120813201426 CreateForumThreadLinkClicks: migrated (0.0139s) =============

== 20120815004411 AddUniqueIndexToForumThreadLinks: migrating =================

-- execute("DELETE FROM forum_thread_links USING forum_thread_links ftl2n WHERE ftl2.forum_thread_id = forum_thread_links.forum_thread_idn AND ftl2.post_id = forum_thread_links.post_idn AND ftl2.url = forum_thread_links.urln AND ftl2.id < forum_thread_links.id")

-> 0.0021s

-- add_index(:forum_thread_links, [:forum_thread_id, :post_id, :url], {:unique=>true, :name=>"unique_post_links"})

-> 0.0080s

== 20120815004411 AddUniqueIndexToForumThreadLinks: migrated (0.0137s) ========

== 20120815180106 AddPostTypeToPosts: migrating ===============================

-- add_column(:posts, :post_type, :integer, {:default=>1, :null=>false})

-> 0.0046s

== 20120815180106 AddPostTypeToPosts: migrated (0.0070s) ======================

== 20120815204733 AddModeratorPostsCountToForumThreads: migrating =============

-- add_column(:forum_threads, :moderator_posts_count, :integer, {:default=>0, :null=>false})

-> 0.0084s

-- execute("UPDATE forum_threadsn SET moderator_posts_count = (SELECT COUNT(*)n FROM posts WHERE posts.forum_thread_id = forum_threads.idn AND posts.post_type = 2)")

-> 0.0008s

== 20120815204733 AddModeratorPostsCountToForumThreads: migrated (0.0105s) ====

== 20120816050526 AddUniqueConstraintToUserActions: migrating =================

-- add_index(:user_actions, ["action_type", "user_id", "target_forum_thread_id", "target_post_id", "acting_user_id"], {:name=>"idx_unique_rows", :unique=>true})

-> 0.0024s

== 20120816050526 AddUniqueConstraintToUserActions: migrated (0.0039s) ========

== 20120816205537 AddForumThreadStates: migrating =============================

-- add_column(:forum_threads, :closed, :boolean, {:default=>false, :null=>false})

-> 0.0047s

-- add_column(:forum_threads, :sticky, :boolean, {:default=>false, :null=>false})

-> 0.0037s

-- add_column(:forum_threads, :archived, :boolean, {:default=>false, :null=>false})

-> 0.0044s

== 20120816205537 AddForumThreadStates: migrated (0.0160s) ====================

== 20120816205538 AddStarredAtToForumThreadUser: migrating ====================

-- add_column(:forum_thread_users, :starred_at, :datetime)

-> 0.0005s

-- execute("alter table forum_thread_users add constraint test_starred_at check(starred = false or starred_at is not null)")

-> 0.0006s

== 20120816205538 AddStarredAtToForumThreadUser: migrated (0.0050s) ===========

== 20120820191804 AddSearchIndices: migrating =================================

-- execute("CREATE INDEX idx_search_user ON users USING GIN(to_tsvector('english', username))")

-> 0.0015s

-- execute("CREATE INDEX idx_search_thread ON forum_threads USING GIN(to_tsvector('english', title))")

-> 0.0006s

== 20120820191804 AddSearchIndices: migrated (0.0034s) ========================

== 20120821191616 AddBumpedAtToForumThreads: migrating ========================

-- add_column(:forum_threads, :bumped_at, :datetime)

-> 0.0005s

-- execute("UPDATE forum_threads SET bumped_at = last_posted_at")

-> 0.0004s

-- change_column(:forum_threads, :bumped_at, :datetime, {:null=>false})

-> 0.0006s

-- index_name(:forum_threads, {:column=>:last_posted_at})

-> 0.0000s

-- index_name_exists?(:forum_threads, "index_forum_threads_on_last_posted_at")

-> 0.0011s

-- remove_index(:forum_threads, {:column=>:last_posted_at, :name=>"index_forum_threads_on_last_posted_at"})

-> 0.0024s

-- add_index(:forum_threads, :bumped_at, {:order=>{:bumped_at=>:desc}})

-> 0.0025s

== 20120821191616 AddBumpedAtToForumThreads: migrated (0.0089s) ===============

== 20120823205956 AddSlugToCategories: migrating ==============================

-- add_column(:categories, :slug, :string)

-> 0.0004s

-- execute("UPDATE categories SET slug = REPLACE(LOWER(name), ' ', '-')")

-> 0.0003s

-- change_column(:categories, :slug, :string, {:null=>false})

-> 0.0005s

== 20120823205956 AddSlugToCategories: migrated (0.0028s) =====================

== 20120824171908 CreateCategoryFeaturedUsers: migrating ======================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:category_featured_users, {:id=>:integer})

-> 0.0023s

-- add_index(:category_featured_users, [:category_id, :user_id], {:unique=>true})

-> 0.0022s

== 20120824171908 CreateCategoryFeaturedUsers: migrated (0.0058s) =============

== 20120828204209 CreateOneboxRenders: migrating ==============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:onebox_renders, {:id=>:integer})

-> 0.0056s

-- add_index(:onebox_renders, :url, {:unique=>true})

-> 0.0040s

== 20120828204209 CreateOneboxRenders: migrated (0.0134s) =====================

== 20120828204624 CreatePostOneboxRenders: migrating ==========================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:post_onebox_renders, {:id=>false})

-> 0.0012s

-- add_index(:post_onebox_renders, [:post_id, :onebox_render_id], {:unique=>true})

-> 0.0022s

== 20120828204624 CreatePostOneboxRenders: migrated (0.0070s) =================

== 20120830182736 AddPreviewToOneboxRenders: migrating ========================

-- add_column(:onebox_renders, :preview, :text, {:null=>true})

-> 0.0004s

-- execute("DELETE FROM onebox_renders")

-> 0.0003s

-- execute("DELETE FROM post_onebox_renders")

-> 0.0015s

== 20120830182736 AddPreviewToOneboxRenders: migrated (0.0043s) ===============

== 20120910171504 RemoveDescriptionFromSiteSettings: migrating ================

-- remove_column(:site_settings, :description)

-> 0.0004s

== 20120910171504 RemoveDescriptionFromSiteSettings: migrated (0.0025s) =======

== 20120918152319 RenameViewsToReads: migrating ===============================

-- rename_column(:posts, :views, :reads)

-> 0.0028s

== 20120918152319 RenameViewsToReads: migrated (0.0084s) ======================

== 20120918205931 AddSubTagToForumThreads: migrating ==========================

-- add_column(:forum_threads, :sub_tag, :string)

-> 0.0004s

-- add_index(:forum_threads, [:category_id, :sub_tag, :bumped_at])

-> 0.0024s

== 20120918205931 AddSubTagToForumThreads: migrated (0.0042s) =================

== 20120919152846 AddHasBestOfToForumThreads: migrating =======================

-- add_column(:forum_threads, :has_best_of, :boolean, {:default=>false, :null=>false})

-> 0.0051s

-- change_column(:posts, :score, :float)

-> 0.0004s

== 20120919152846 AddHasBestOfToForumThreads: migrated (0.0070s) ==============

== 20120921055428 AddTwitterUserInfo: migrating ===============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:twitter_user_infos, {:id=>:integer})

-> 0.0027s

-- add_index(:twitter_user_infos, [:twitter_user_id], {:unique=>true})

-> 0.0020s

-- add_index(:twitter_user_infos, [:user_id], {:unique=>true})

-> 0.0021s

== 20120921055428 AddTwitterUserInfo: migrated (0.0083s) ======================

== 20120921155050 CreateArchetypes: migrating =================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:archetypes, {:id=>:integer})

-> 0.0028s

-- add_index(:archetypes, :name_key, {:unique=>true})

-> 0.0022s

-- execute("INSERT INTO archetypes (name_key, created_at, updated_at) VALUES ('regular', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)")

-> 0.0005s

-- execute("INSERT INTO archetypes (name_key, created_at, updated_at) VALUES ('poll', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)")

-> 0.0002s

-- add_column(:forum_threads, :archetype_id, :integer, {:default=>1, :null=>false})

-> 0.0044s

== 20120921155050 CreateArchetypes: migrated (0.0230s) ========================

== 20120921162512 AddMetaDataToForumThreads: migrating ========================

-- execute("CREATE EXTENSION IF NOT EXISTS hstore")

-> 0.0138s

-- add_column(:forum_threads, :meta_data, :hstore)

-> 0.0006s

== 20120921162512 AddMetaDataToForumThreads: migrated (0.0164s) ===============

== 20120921163606 CreateArchetypeOptions: migrating ===========================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:archetype_options, {:id=>:integer})

-> 0.0035s

-- add_index(:archetype_options, :archetype_id)

-> 0.0024s

-- execute("INSERT INTO archetype_options (archetype_id, key, option_type, created_at, updated_at)n VALUES (2, 'private_poll', 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)")

-> 0.0009s

-- execute("INSERT INTO archetype_options (archetype_id, key, option_type, created_at, updated_at)n VALUES (2, 'single_vote', 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)")

-> 0.0003s

== 20120921163606 CreateArchetypeOptions: migrated (0.0087s) ==================

== 20120924182000 AddHstoreExtension: migrating ===============================

-- execute("CREATE EXTENSION IF NOT EXISTS hstore")

-> 0.0003s

== 20120924182000 AddHstoreExtension: migrated (0.0025s) ======================

== 20120924182031 AddVoteCountToPosts: migrating ==============================

-- add_column(:forum_threads, :vote_count, :integer, {:default=>0, :null=>false})

-> 0.0090s

-- add_column(:posts, :vote_count, :integer, {:default=>0, :null=>false})

-> 0.0044s

== 20120924182031 AddVoteCountToPosts: migrated (0.0151s) =====================

== 20120925171620 RemoveEnglishFromPostActionTypes: migrating =================

-- rename_column(:post_action_types, :name, :name_key)

-> 0.0023s

-- execute("UPDATE post_action_types SET name_key = regexp_replace(lower(name_key), '[^a-z]', '_')")

-> 0.0004s

-- remove_column(:post_action_types, :long_form)

-> 0.0003s

-- remove_column(:post_action_types, :description)

-> 0.0002s

== 20120925171620 RemoveEnglishFromPostActionTypes: migrated (0.0049s) ========

== 20120925190802 AddSequenceToPostActionTypes: migrating =====================

-- remove_column(:post_action_types, :id)

-> 0.0003s

-- add_column(:post_action_types, :id, :primary_key)

-> 0.0038s

== 20120925190802 AddSequenceToPostActionTypes: migrated (0.0070s) ============

== 20120928170023 AddSortOrderToPosts: migrating ==============================

-- add_column(:posts, :sort_order, :integer)

-> 0.0005s

-- index_name(:posts, {:column=>:user_id})

-> 0.0000s

-- index_name_exists?(:posts, "index_posts_on_user_id")

-> 0.0009s

-- remove_index(:posts, {:column=>:user_id, :name=>"index_posts_on_user_id"})

-> 0.0030s

-- execute("UPDATE posts AS p SET sort_order = post_number FROM forum_threads AS ft WHERE ft.id = p.forum_thread_id AND ft.archetype_id = 1")

-> 0.0008s

-- execute("UPDATE posts AS p SET sort_order =n CASE WHEN post_number = 1 THEN 1n ELSE 2147483647 - p.vote_countn ENDn FROM forum_threads AS ftn WHERE ft.id = p.forum_thread_id AND ft.archetype_id = 2")

-> 0.0004s

== 20120928170023 AddSortOrderToPosts: migrated (0.0077s) =====================

== 20121009161116 AddEmailStuffToUsers: migrating =============================

-- add_column(:users, :last_emailed_at, :datetime, {:null=>true})

-> 0.0004s

-- add_column(:users, :email_digests, :boolean, {:null=>false, :default=>true})

-> 0.0061s

== 20121009161116 AddEmailStuffToUsers: migrated (0.0082s) ====================

== 20121011155904 CreateEmailLogs: migrating ==================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:email_logs, {:id=>:integer})

-> 0.0027s

-- add_index(:email_logs, :created_at, {:order=>{:created_at=>:desc}})

-> 0.0023s

-- add_index(:email_logs, [:user_id, :created_at], {:order=>{:created_at=>:desc}})

-> 0.0022s

== 20121011155904 CreateEmailLogs: migrated (0.0093s) =========================

== 20121017162924 ConvertArchetypes: migrating ================================

-- add_column(:forum_threads, :archetype, :string, {:default=>"regular", :null=>false})

-> 0.0053s

-- execute("UPDATE forum_threads SET archetype = a.name_key FROM archetypes AS a WHERE a.id = forum_threads.archetype_id")

-> 0.0006s

-- remove_column(:forum_threads, :archetype_id)

-> 0.0004s

-- drop_table(:archetypes)

-> 0.0008s

-- drop_table(:archetype_options)

-> 0.0009s

== 20121017162924 ConvertArchetypes: migrated (0.0098s) =======================

== 20121018103721 RenameForumThreadTables: migrating ==========================

-- rename_table("forum_threads", "topics")

-> 0.0055s

-- rename_table("forum_thread_link_clicks", "topic_link_clicks")

-> 0.0040s

-- rename_table("forum_thread_links", "topic_links")

-> 0.0044s

-- rename_table("forum_thread_users", "topic_users")

-> 0.0050s

-- rename_table("category_featured_threads", "category_featured_topics")

-> 0.0043s

-- rename_column("categories", "forum_thread_id", "topic_id")

-> 0.0024s

-- rename_column("categories", "top1_forum_thread_id", "top1_topic_id")

-> 0.0022s

-- rename_column("categories", "top2_forum_thread_id", "top2_topic_id")

-> 0.0022s

-- rename_column("categories", "forum_thread_count", "topic_count")

-> 0.0026s

-- rename_column("categories", "threads_year", "topics_year")

-> 0.0024s

-- rename_column("categories", "threads_month", "topics_month")

-> 0.0021s

-- rename_column("categories", "threads_week", "topics_week")

-> 0.0024s

-- rename_column("category_featured_topics", "forum_thread_id", "topic_id")

-> 0.0019s

-- rename_column("topic_link_clicks", "forum_thread_link_id", "topic_link_id")

-> 0.0020s

-- rename_column("topic_links", "forum_thread_id", "topic_id")

-> 0.0025s

-- rename_column("topic_links", "link_forum_thread_id", "link_topic_id")

-> 0.0024s

-- rename_column("topic_users", "forum_thread_id", "topic_id")

-> 0.0022s

-- rename_column("incoming_links", "forum_thread_id", "topic_id")

-> 0.0021s

-- rename_column("notifications", "forum_thread_id", "topic_id")

-> 0.0021s

-- rename_column("post_timings", "forum_thread_id", "topic_id")

-> 0.0026s

-- rename_column("posts", "forum_thread_id", "topic_id")

-> 0.0029s

-- rename_column("user_actions", "target_forum_thread_id", "target_topic_id")

-> 0.0137s

-- rename_column("uploads", "forum_thread_id", "topic_id")

-> 0.0032s

== 20121018103721 RenameForumThreadTables: migrated (0.0796s) =================

== 20121018133039 CreateTopicAllowedUsers: migrating ==========================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:topic_allowed_users, {:id=>:integer})

-> 0.0027s

-- add_index(:topic_allowed_users, [:topic_id, :user_id], {:unique=>true})

-> 0.0028s

-- add_index(:topic_allowed_users, [:user_id, :topic_id], {:unique=>true})

-> 0.0023s

== 20121018133039 CreateTopicAllowedUsers: migrated (0.0098s) =================

== 20121018182709 FixNotificationData: migrating ==============================

-- execute("UPDATE notifications SET data = replace(data, 'thread_title', 'topic_title')")

-> 0.0004s

== 20121018182709 FixNotificationData: migrated (0.0020s) =====================

== 20121106015500 DropAvatarUrlFromUsers: migrating ===========================

-- remove_column(:users, :avatar_url)

-> 0.0004s

== 20121106015500 DropAvatarUrlFromUsers: migrated (0.0033s) ==================

== 20121108193516 AddPostActionIdToNotifications: migrating ===================

-- add_column(:notifications, :post_action_id, :integer, {:null=>true})

-> 0.0004s

-- add_index(:notifications, :post_action_id)

-> 0.0019s

== 20121108193516 AddPostActionIdToNotifications: migrated (0.0036s) ==========

== 20121109164630 CreateTrustLevels: migrating ================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:trust_levels, {:id=>:integer})

-> 0.0028s

-- add_column(:users, :trust_level_id, :integer, {:default=>1, :null=>false})

-> 0.0062s

== 20121109164630 CreateTrustLevels: migrated (0.0108s) =======================

== 20121113200844 BioMarkdownSupport: migrating ===============================

-- rename_column(:users, :bio, :bio_raw)

-> 0.0037s

-- add_column(:users, :bio_cooked, :text, {:null=>true})

-> 0.0004s

== 20121113200844 BioMarkdownSupport: migrated (0.0094s) ======================

== 20121113200845 CreateFacebookUserInfos: migrating ==========================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:facebook_user_infos, {:id=>:integer})

-> 0.0043s

-- add_index(:facebook_user_infos, :user_id, {:unique=>true})

-> 0.0022s

-- add_index(:facebook_user_infos, :facebook_user_id, {:unique=>true})

-> 0.0020s

== 20121113200845 CreateFacebookUserInfos: migrated (0.0098s) =================

== 20121115172544 RenameStickyToPinned: migrating =============================

-- rename_column(:topics, :sticky, :pinned)

-> 0.0024s

== 20121115172544 RenameStickyToPinned: migrated (0.0044s) ====================

== 20121116212424 AddMoreEmailSettingsToUser: migrating =======================

-- add_column(:users, :email_private_messages, :boolean, {:default=>true})

-> 0.0053s

-- add_column(:users, :email_mentions, :boolean, {:default=>true})

-> 0.0061s

== 20121116212424 AddMoreEmailSettingsToUser: migrated (0.0134s) ==============

== 20121119190529 AddEmailSettingsToUsers: migrating ==========================

-- add_column(:users, :email_replied, :boolean, {:default=>true})

-> 0.0060s

-- add_column(:users, :email_quoted, :boolean, {:default=>true})

-> 0.0061s

== 20121119190529 AddEmailSettingsToUsers: migrated (0.0169s) =================

== 20121119200843 AddEmailDirectToUsers: migrating ============================

-- add_column(:users, :email_direct, :boolean, {:default=>true, :null=>false})

-> 0.0060s

-- remove_column(:users, :email_mentions)

-> 0.0004s

-- remove_column(:users, :email_replied)

-> 0.0003s

-- remove_column(:users, :email_quoted)

-> 0.0003s

== 20121119200843 AddEmailDirectToUsers: migrated (0.0084s) ===================

== 20121121202035 CreateInvites: migrating ====================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:invites, {:id=>:integer})

-> 0.0031s

-- add_index(:invites, :invite_key, {:unique=>true})

-> 0.0020s

-- add_index(:invites, [:email, :invited_by_id], {:unique=>true})

-> 0.0017s

== 20121121202035 CreateInvites: migrated (0.0083s) ===========================

== 20121121205215 CreateTopicInvites: migrating ===============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:topic_invites, {:id=>:integer})

-> 0.0018s

-- add_index(:topic_invites, [:topic_id, :invite_id], {:unique=>true})

-> 0.0025s

-- add_index(:topic_invites, :invite_id)

-> 0.0019s

== 20121121205215 CreateTopicInvites: migrated (0.0076s) ======================

== 20121122033316 AddMutedAtToTopicUser: migrating ============================

-- add_column(:topic_users, :muted_at, :datetime)

-> 0.0004s

-- change_column(:topic_users, :last_read_post_number, :integer, {:null=>true})

-> 0.0006s

-- change_column_default(:topic_users, :last_read_post_number, nil)

-> 0.0017s

== 20121122033316 AddMutedAtToTopicUser: migrated (0.0042s) ===================

== 20121123054127 MakePostNumberDistinct: migrating ===========================

== 20121123054127 MakePostNumberDistinct: migrated (0.0028s) ==================

== 20121123063630 CreateUserVisits: migrating =================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:user_visits, {:id=>:integer})

-> 0.0028s

-- add_index(:user_visits, [:user_id, :visited_at], {:unique=>true})

-> 0.0021s

== 20121123063630 CreateUserVisits: migrated (0.0067s) ========================

== 20121129160035 CreateEmailTokens: migrating ================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:email_tokens, {:id=>:integer})

-> 0.0038s

-- add_index(:email_tokens, :token, {:unique=>true})

-> 0.0021s

== 20121129160035 CreateEmailTokens: migrated (0.0078s) =======================

== 20121129184948 RemoveEmailTokenFromUsers: migrating ========================

-- execute("INSERT INTO email_tokens (user_id, email, token, created_at, updated_at)n SELECT id, email, email_token, CURRENT_TIMESTAMP, CURRENT_TIMESTAMPn FROM users WHERE email_token IS NOT NULL")

-> 0.0007s

-- remove_column(:users, :email_token)

-> 0.0003s

== 20121129184948 RemoveEmailTokenFromUsers: migrated (0.0023s) ===============

== 20121130010400 CreateDrafts: migrating =====================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:drafts, {:id=>:integer})

-> 0.0027s

-- add_index(:drafts, [:user_id, :draft_key])

-> 0.0124s

== 20121130010400 CreateDrafts: migrated (0.0170s) ============================

== 20121130191818 AddLinkPostIdToTopicLinks: migrating ========================

-- add_column(:topic_links, :link_post_id, :integer)

-> 0.0004s

== 20121130191818 AddLinkPostIdToTopicLinks: migrated (0.0047s) ===============

== 20121202225421 AddVisitedAtToTopicUser: migrating ==========================

-- add_column(:topic_users, :last_visited_at, :datetime)

-> 0.0005s

-- add_column(:topic_users, :first_visited_at, :datetime)

-> 0.0003s

== 20121202225421 AddVisitedAtToTopicUser: migrated (0.0024s) =================

== 20121203181719 RenameSeenNotificaitonId: migrating =========================

-- rename_column(:users, :seen_notificaiton_id, :seen_notification_id)

-> 0.0035s

== 20121203181719 RenameSeenNotificaitonId: migrated (0.0047s) ================

== 20121204183855 FixLinkPostId: migrating ====================================

== 20121204183855 FixLinkPostId: migrated (0.0055s) ===========================

== 20121204193747 AddAnotherFeaturedUserToTopics: migrating ===================

-- add_column(:topics, :featured_user4_id, :integer, {:null=>true})

-> 0.0005s

== 20121204193747 AddAnotherFeaturedUserToTopics: migrated (0.0051s) ==========

== 20121205162143 AddApprovedToUsers: migrating ===============================

-- add_column(:users, :approved, :boolean, {:null=>false, :default=>false})

-> 0.0088s

-- add_column(:users, :approved_by_id, :integer, {:null=>true})

-> 0.0004s

-- add_column(:users, :approved_at, :timestamp, {:null=>true})

-> 0.0003s

== 20121205162143 AddApprovedToUsers: migrated (0.0119s) ======================

== 20121207000741 AddNotificationsToTopicUsers: migrating =====================

-- add_column(:topic_users, :notifications, :integer, {:default=>2})

-> 0.0024s

-- add_column(:topic_users, :notifications_changed_at, :datetime)

-> 0.0004s

-- add_column(:topic_users, :notifications_reason_id, :integer)

-> 0.0003s

== 20121207000741 AddNotificationsToTopicUsers: migrated (0.0053s) ============

== 20121211233131 CreateSiteCustomizations: migrating =========================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:site_customizations, {:id=>:integer})

-> 0.0031s

-- add_index(:site_customizations, [:key])

-> 0.0023s

== 20121211233131 CreateSiteCustomizations: migrated (0.0074s) ================

== 20121216230719 AddOverrideDefaultStyleToSiteCustomization: migrating =======

-- add_column(:site_customizations, :override_default_style, :boolean, {:default=>false, :null=>false})

-> 0.0039s

-- add_column(:site_customizations, :stylesheet_baked, :text, {:default=>"", :null=>false})

-> 0.0032s

== 20121216230719 AddOverrideDefaultStyleToSiteCustomization: migrated (0.0088s)

== 20121218205642 AddTopicsEnteredToUsers: migrating ==========================

-- add_column(:users, :topics_entered, :integer, {:default=>0, :null=>false})

-> 0.1109s

-- add_column(:users, :posts_read_count, :integer, {:default=>0, :null=>false})

-> 0.0059s

== 20121218205642 AddTopicsEnteredToUsers: migrated (0.1189s) =================

== 20121224072204 AddLastEditorIdToPosts: migrating ===========================

-- add_column(:posts, :last_editor_id, :integer)

-> 0.0005s

== 20121224072204 AddLastEditorIdToPosts: migrated (0.0019s) ==================

== 20121224095139 CreateDraftSequence: migrating ==============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:draft_sequences, {:id=>:integer})

-> 0.0034s

-- add_index(:draft_sequences, [:user_id, :draft_key], {:unique=>true})

-> 0.0034s

== 20121224095139 CreateDraftSequence: migrated (0.0115s) =====================

== 20121224100650 AddSequenceToDrafts: migrating ==============================

-- add_column(:drafts, :sequence, :integer, {:null=>false, :default=>0})

-> 0.0042s

== 20121224100650 AddSequenceToDrafts: migrated (0.0059s) =====================

== 20121228192219 AddDeletedAtToInvites: migrating ============================

-- add_column(:invites, :deleted_at, :datetime)

-> 0.0004s

== 20121228192219 AddDeletedAtToInvites: migrated (0.0022s) ===================

== 20130107165207 AddDigestAfterDaysToUsers: migrating ========================

-- add_column(:users, :digest_after_days, :integer, {:default=>7, :null=>false})

-> 0.0086s

== 20130107165207 AddDigestAfterDaysToUsers: migrated (0.0101s) ===============

== 20130108195847 AddPreviousVisitAtToUsers: migrating ========================

-- add_column(:users, :previous_visit_at, :timestamp)

-> 0.0005s

== 20130108195847 AddPreviousVisitAtToUsers: migrated (0.0021s) ===============

== 20130115012140 MergeMuteOptionsOnTopicUsers: migrating =====================

-- execute("update topic_users set notifications = 0 where notifications = 3")

-> 0.0005s

-- execute("update topic_users set notifications = 1 where notifications = 2")

-> 0.0002s

-- execute("update topic_users set notifications = 2 where notifications = 1")

-> 0.0002s

-- execute("update topic_users set notifications = 0 where muted_at is not null")

-> 0.0002s

-- rename_column(:topic_users, :notifications, :notification_level)

-> 0.0022s

-- remove_column(:topic_users, :muted_at)

-> 0.0003s

== 20130115012140 MergeMuteOptionsOnTopicUsers: migrated (0.0047s) ============

== 20130115021937 CorrectDefaultOnNotificationLevel: migrating ================

-- change_column(:topic_users, :notification_level, :integer, {:default=>1, :null=>false})

-> 0.0039s

== 20130115021937 CorrectDefaultOnNotificationLevel: migrated (0.0053s) =======

== 20130115043603 OopsUnwatchABoatOfWatchedStuff: migrating ===================

-- execute("update topic_users set notification_level = 1 where notifications_reason_id is null and notification_level = 2")

-> 0.0004s

== 20130115043603 OopsUnwatchABoatOfWatchedStuff: migrated (0.0018s) ==========

== 20130116151829 RemoveSubTagFromTopics: migrating ===========================

-- remove_column(:topics, :sub_tag)

-> 0.0005s

== 20130116151829 RemoveSubTagFromTopics: migrated (0.0031s) ==================

== 20130120222728 FixSearch: migrating ========================================

-- execute("drop index idx_search_thread")

-> 0.0004s

-- execute("drop index idx_search_user")

-> 0.0003s

-- execute("create table posts_search (id integer not null primary key, search_data tsvector)")

-> 0.0018s

-- execute("create table users_search (id integer not null primary key, search_data tsvector)")

-> 0.0018s

-- execute("create table categories_search (id integer not null primary key, search_data tsvector)")

-> 0.0017s

-- execute("create index idx_search_post on posts_search using gin(search_data) ")

-> 0.0004s

-- execute("create index idx_search_user on users_search using gin(search_data) ")

-> 0.0004s

-- execute("create index idx_search_category on categories_search using gin(search_data) ")

-> 0.0004s

== 20130120222728 FixSearch: migrated (0.0089s) ===============================

== 20130121231352 AddTrackingToTopicUsers: migrating ==========================

-- execute("update topic_users set notification_level = 3 where notification_level = 2")

-> 0.0003s

== 20130121231352 AddTrackingToTopicUsers: migrated (0.0018s) =================

== 20130122051134 AddAutoTrackTopicsToUser: migrating =========================

-- add_column(:users, :auto_track_topics, :boolean, {:null=>false, :default=>false})

-> 0.0066s

== 20130122051134 AddAutoTrackTopicsToUser: migrated (0.0080s) ================

== 20130122232825 AddAutoTrackAfterSecondsAndBanningAndDobToUser: migrating ===

-- add_column(:users, :banned_at, :datetime)

-> 0.0005s

-- add_column(:users, :banned_till, :datetime)

-> 0.0003s

-- add_column(:users, :date_of_birth, :date)

-> 0.0005s

-- add_column(:users, :auto_track_topics_after_msecs, :integer)

-> 0.0003s

-- add_column(:users, :views, :integer, {:null=>false, :default=>0})

-> 0.0068s

-- remove_column(:users, :auto_track_topics)

-> 0.0006s

-- add_column(:topic_users, :total_msecs_viewed, :integer, {:null=>false, :default=>0})

-> 0.0020s

-- execute("update topic_users set total_msecs_viewed =n (n select coalesce(sum(msecs) ,0)n from post_timings tn where topic_users.topic_id = t.topic_id and topic_users.user_id = t.user_idn )")

-> 0.0006s

== 20130122232825 AddAutoTrackAfterSecondsAndBanningAndDobToUser: migrated (0.0129s)

== 20130123070909 AutoTrackAllTopicsRepliedTo: migrating ======================

-- execute("update topic_users set notification_level = 2, notifications_reason_id = 4n from posts pn wheren notification_level = 1 andn notifications_reason_id is null andn p.topic_id = topic_users.topic_id andn p.user_id = topic_users.user_idn ")

-> 0.0006s

== 20130123070909 AutoTrackAllTopicsRepliedTo: migrated (0.0019s) =============

== 20130125002652 AddHiddenToPosts: migrating =================================

-- add_column(:posts, :hidden, :boolean, {:null=>false, :default=>false})

-> 0.0053s

-- add_column(:posts, :hidden_reason_id, :integer)

-> 0.0004s

== 20130125002652 AddHiddenToPosts: migrated (0.0069s) ========================

== 20130125030305 AddFieldsToPostAction: migrating ============================

-- add_column(:post_actions, :deleted_by, :integer)

-> 0.0004s

-- add_column(:post_actions, :message, :text)

-> 0.0018s

== 20130125030305 AddFieldsToPostAction: migrated (0.0045s) ===================

== 20130125031122 CorrectIndexOnPostAction: migrating =========================

-- index_name("post_actions", {:name=>"idx_unique_actions"})

-> 0.0000s

-- index_name_exists?("post_actions", "idx_unique_actions")

-> 0.0008s

-- remove_index("post_actions", {:name=>"idx_unique_actions"})

-> 0.0004s

-- add_index("post_actions", ["user_id", "post_action_type_id", "post_id", "deleted_at"], {:name=>"idx_unique_actions", :unique=>true})

-> 0.0021s

== 20130125031122 CorrectIndexOnPostAction: migrated (0.0056s) ================

== 20130127213646 RemoveTrustLevels: migrating ================================

-- drop_table(:trust_levels)

-> 0.0008s

-- change_column_default(:users, :trust_level_id, 0)

-> 0.0029s

-- rename_column(:users, :trust_level_id, :trust_level)

-> 0.0034s

-- update("UPDATE users set trust_level = 1")

-> 0.0006s

-> 0 rows

-- remove_column(:users, :moderator)

-> 0.0004s

-- add_column(:users, :flag_level, :integer, {:null=>false, :default=>0})

-> 0.0068s

== 20130127213646 RemoveTrustLevels: migrated (0.0166s) =======================

== 20130128182013 TrustLevelDefaultNull: migrating ============================

-- change_column_default(:users, :trust_level, nil)

-> 0.0027s

== 20130128182013 TrustLevelDefaultNull: migrated (0.0038s) ===================

== 20130129010625 RemovePmReflections: migrating ==============================

-- execute("delete from topic_links where link_topic_id in (select id from topics where archetype = 'private_message') ")

-> 0.0007s

== 20130129010625 RemovePmReflections: migrated (0.0020s) =====================

== 20130129163244 AddTimeReadToUsers: migrating ===============================

-- add_column(:users, :time_read, :integer, {:default=>0, :null=>false})

-> 0.0057s

-- execute("UPDATE users SET time_read = posts_read_count * 20")

-> 0.0005s

== 20130129163244 AddTimeReadToUsers: migrated (0.0085s) ======================

== 20130129174845 AddDaysVisitedToUsers: migrating ============================

-- add_column(:users, :days_visited, :integer, {:null=>false, :default=>0})

-> 0.0062s

-- execute("UPDATE users AS u SET days_visited = (SELECT COUNT(*) FROM user_visits AS uv WHERE uv.user_id = u.id)")

-> 0.0007s

== 20130129174845 AddDaysVisitedToUsers: migrated (0.0086s) ===================

== 20130130154611 RemoveIndexFromViews: migrating =============================

-- index_name("views", {:name=>"unique_views"})

-> 0.0000s

-- index_name_exists?("views", "unique_views")

-> 0.0010s

-- remove_index("views", {:name=>"unique_views"})

-> 0.0004s

-- change_column(:views, :viewed_at, :date)

-> 0.0013s

== 20130130154611 RemoveIndexFromViews: migrated (0.0043s) ====================

== 20130131055710 AddCustomFlagCountToTopics: migrating =======================

-- add_column(:topics, :custom_flag_count, :integer, {:null=>false, :default=>0})

-> 0.0046s

-- add_column(:posts, :custom_flag_count, :integer, {:null=>false, :default=>0})

-> 0.0041s

== 20130131055710 AddCustomFlagCountToTopics: migrated (0.0104s) ==============

== 20130201000828 AddColumnSummariesToPostsAndTopics: migrating ===============

-- add_column(:posts, :spam_count, :integer, {:default=>0, :null=>false})

-> 0.0041s

-- add_column(:topics, :spam_count, :integer, {:default=>0, :null=>false})

-> 0.0045s

-- add_column(:posts, :illegal_count, :integer, {:default=>0, :null=>false})

-> 0.0041s

-- add_column(:topics, :illegal_count, :integer, {:default=>0, :null=>false})

-> 0.0053s

-- add_column(:posts, :inappropriate_count, :integer, {:default=>0, :null=>false})

-> 0.0049s

-- add_column(:topics, :inappropriate_count, :integer, {:default=>0, :null=>false})

-> 0.0047s

-- remove_column(:posts, :offensive_count)

-> 0.0005s

-- remove_column(:topics, :offensive_count)

-> 0.0004s

== 20130201000828 AddColumnSummariesToPostsAndTopics: migrated (0.0337s) ======

== 20130201023409 AddPositionToPostActionType: migrating ======================

-- add_column(:post_action_types, :position, :integer, {:default=>0, :null=>false})

-> 0.0063s

== 20130201023409 AddPositionToPostActionType: migrated (0.0082s) =============

== 20130203204338 AddLastVersionAtToPosts: migrating ==========================

-- add_column(:posts, :last_version_at, :timestamp)

-> 0.0006s

-- execute("UPDATE posts SET last_version_at = COALESCE((SELECT max(created_at)n FROM versions WHERE versions.versioned_id = posts.idn AND versions.versioned_type = 'Post'), posts.created_at)")

-> 0.0007s

-- change_column(:posts, :last_version_at, :timestamp, {:null=>false})

-> 0.0005s

== 20130203204338 AddLastVersionAtToPosts: migrated (0.0033s) =================

== 20130204000159 AddIpAddressToUsers: migrating ==============================

-- execute("alter table users add column ip_address inet")

-> 0.0004s

== 20130204000159 AddIpAddressToUsers: migrated (0.0018s) =====================

== 20130205021905 AlterFacebookUserId: migrating ==============================

-- change_column(:facebook_user_infos, :facebook_user_id, :integer, {:limit=>8, :null=>false})

-> 0.0037s

== 20130205021905 AlterFacebookUserId: migrated (0.0053s) =====================

== 20130207200019 AddUserDeletedToPosts: migrating ============================

-- add_column(:posts, :user_deleted, :boolean, {:null=>false, :default=>false})

-> 0.0050s

== 20130207200019 AddUserDeletedToPosts: migrated (0.0065s) ===================

== 20130208220635 RemoveReplyBelowPostNumberFromPosts: migrating ==============

-- remove_column(:posts, :reply_below_post_number)

-> 0.0004s

== 20130208220635 RemoveReplyBelowPostNumberFromPosts: migrated (0.0023s) =====

== 20130213021450 RemoveTopicResponseActions: migrating =======================

-- execute("delete from user_actions where action_type = 8")

-> 0.0005s

== 20130213021450 RemoveTopicResponseActions: migrated (0.0024s) ==============

== 20130213203300 AddNewTopicDurationMinutesToUsers: migrating ================

-- add_column(:users, :new_topic_duration_minutes, :integer)

-> 0.0005s

== 20130213203300 AddNewTopicDurationMinutesToUsers: migrated (0.0038s) =======

== 20130221215017 AddDescriptionToCategories: migrating =======================

-- add_column(:categories, :description, :text, {:null=>true})

-> 0.0004s

-- remove_column(:categories, :top1_topic_id)

-> 0.0003s

-- remove_column(:categories, :top2_topic_id)

-> 0.0002s

-- remove_column(:categories, :top1_user_id)

-> 0.0002s

-- remove_column(:categories, :top2_user_id)

-> 0.0002s

== 20130221215017 AddDescriptionToCategories: migrated (0.0057s) ==============

== 20130226015336 AddGithubUserInfo: migrating ================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:github_user_infos, {:id=>:integer})

-> 0.0032s

-- add_index(:github_user_infos, [:github_user_id], {:unique=>true})

-> 0.0020s

-- add_index(:github_user_infos, [:user_id], {:unique=>true})

-> 0.0018s

== 20130226015336 AddGithubUserInfo: migrated (0.0108s) =======================

== 20130306180148 AddClearedPinnedToTopicUsers: migrating =====================

-- add_column(:topic_users, :cleared_pinned_at, :datetime, {:null=>true})

-> 0.0005s

-- add_column(:topics, :pinned_at, :datetime, {:null=>true})

-> 0.0009s

-- execute("UPDATE topics SET pinned_at = created_at WHERE pinned")

-> 0.0011s

-- remove_column(:topics, :pinned)

-> 0.0011s

== 20130306180148 AddClearedPinnedToTopicUsers: migrated (0.0050s) ============

== 20130311181327 RemoveExtraSpamRecord: migrating ============================

-- execute("UPDATE post_actions SET post_action_type_id = 7 where post_action_type_id = 8")

-> 0.0005s

-- execute("DELETE FROM post_action_types WHERE id = 8")

-> 0.0003s

== 20130311181327 RemoveExtraSpamRecord: migrated (0.0021s) ===================

== 20130313004922 AddExternalLinksInNewTabAnDisableQuotingToUser: migrating ===

-- add_column(:users, :external_links_in_new_tab, :boolean, {:default=>false, :null=>false})

-> 0.0059s

-- add_column(:users, :enable_quoting, :boolean, {:default=>true, :null=>false})

-> 0.0060s

== 20130313004922 AddExternalLinksInNewTabAnDisableQuotingToUser: migrated (0.0138s)

== 20130314093434 AddForegroundColorToCategories: migrating ===================

-- add_column(:categories, :text_color, :string, {:limit=>6, :null=>false, :default=>"FFFFFF"})

-> 0.0058s

== 20130314093434 AddForegroundColorToCategories: migrated (0.0089s) ==========

== 20130315180637 EnableTrigramSupport: migrating =============================

-- execute("CREATE EXTENSION IF NOT EXISTS pg_trgm")

-> 0.0061s

== 20130315180637 EnableTrigramSupport: migrated (0.0077s) ====================

== 20130319122248 AddReplyToUserIdToPost: migrating ===========================

-- add_column(:posts, :reply_to_user_id, :integer)

-> 0.0005s

-- execute("UPDATE posts p SET reply_to_user_id = (n SELECT u.id from users un JOIN posts p2 ON p2.user_id = u.id ANDn p2.post_number = p.reply_to_post_number ANDn p2.topic_id = p.topic_idn )")

-> 0.0010s

== 20130319122248 AddReplyToUserIdToPost: migrated (0.0039s) ==================

== 20130320012100 AddUserIndexesToPostsAndTopics: migrating ===================

-- execute("CREATE INDEX idx_posts_user_id_deleted_atn ON posts(user_id) WHERE deleted_at IS NULL")

-> 0.0019s

-- execute("CREATE INDEX idx_topics_user_id_deleted_atn ON topics(user_id) WHERE deleted_at IS NULL")

-> 0.0010s

== 20130320012100 AddUserIndexesToPostsAndTopics: migrated (0.0054s) ==========

== 20130320024345 AddModeratorToUser: migrating ===============================

-- add_column(:users, :moderator, :boolean, {:default=>false})

-> 0.0059s

-- execute("UPDATE users SET trust_level = 1, moderator = 't' where trust_level = 5")

-> 0.0006s

== 20130320024345 AddModeratorToUser: migrated (0.0079s) ======================

== 20130321154905 RemoveOneboxesFromDb: migrating =============================

-- drop_table(:post_onebox_renders)

-> 0.0007s

-- drop_table(:onebox_renders)

-> 0.0008s

== 20130321154905 RemoveOneboxesFromDb: migrated (0.0088s) ====================

== 20130322183614 AddPercentRankToPosts: migrating ============================

-- add_column(:posts, :percent_rank, :float, {:default=>1.0})

-> 0.0063s

-- execute("UPDATE posts SET percent_rank = x.percent_rankn FROM (SELECT id, percent_rank()n OVER (PARTITION BY topic_id ORDER BY SCORE DESC)n FROM posts) AS xn WHERE x.id = posts.id")

-> 0.0008s

== 20130322183614 AddPercentRankToPosts: migrated (0.0085s) ===================

== 20130326210101 AddHotnessToCategory: migrating =============================

-- add_column(:categories, :hotness, :float, {:default=>5.0, :null=>false})

-> 0.0052s

== 20130326210101 AddHotnessToCategory: migrated (0.0104s) ====================

== 20130327185852 UpdateSiteSettingsForHot: migrating =========================

-- execute("UPDATE site_settings SET value = REPLACE(value, 'popular ', 'latest hot ') where name = 'top_menu'")

-> 0.0006s

== 20130327185852 UpdateSiteSettingsForHot: migrated (0.0024s) ================

== 20130328162943 CreateHotTopics: migrating ==================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:hot_topics, {:force=>true, :id=>:integer})

-> 0.0022s

-- add_index(:hot_topics, :topic_id, {:unique=>true})

-> 0.0026s

-- add_index(:hot_topics, :score, {:order=>"desc"})

-> 0.0047s

== 20130328162943 CreateHotTopics: migrated (0.0167s) =========================

== 20130328182433 AddScoreToTopics: migrating =================================

-- add_column(:topics, :score, :float)

-> 0.0005s

-- add_column(:topics, :percent_rank, :float, {:null=>false, :default=>1.0})

-> 0.0065s

== 20130328182433 AddScoreToTopics: migrated (0.0101s) ========================

== 20130402210723 AddValuesToHotTopics: migrating =============================

-- add_column(:hot_topics, :random_bias, :float)

-> 0.0005s

-- add_column(:hot_topics, :random_multiplier, :float)

-> 0.0003s

-- add_column(:hot_topics, :days_ago_bias, :float)

-> 0.0003s

-- add_column(:hot_topics, :days_ago_multiplier, :float)

-> 0.0003s

-- add_column(:hot_topics, :hot_topic_type, :integer)

-> 0.0003s

== 20130402210723 AddValuesToHotTopics: migrated (0.0035s) ====================

== 20130404143437 CreateSiteContents: migrating ===============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:site_contents, {:force=>true, :id=>false})

-> 0.0021s

-- add_index(:site_contents, :content_type, {:unique=>true})

-> 0.0023s

== 20130404143437 CreateSiteContents: migrated (0.0058s) ======================

== 20130404232558 AddUserExtras: migrating ====================================

-- add_column(:users, :likes_given, :integer, {:null=>false, :default=>0})

-> 0.0066s

-- add_column(:users, :likes_received, :integer, {:null=>false, :default=>0})

-> 0.0070s

-- add_column(:users, :topic_reply_count, :integer, {:null=>false, :default=>0})

-> 0.0073s

-- execute("UPDATE users unSETn likes_given = X.likes_givennFROM (n SELECTn a.user_id,n COUNT(*) likes_givenn FROM user_actions an JOIN posts p ON p.id = a.target_post_idn WHERE p.deleted_at IS NULL AND a.action_type = 1n GROUP BY a.user_idn) as XnWHERE X.user_id = u.idn")

-> 0.0012s

-- execute("UPDATE users unSETn likes_received = Y.likes_receivednFROM (n SELECTn a.user_id,n COUNT(*) likes_receivedn FROM user_actions an JOIN posts p ON p.id = a.target_post_idn WHERE p.deleted_at IS NULL AND a.action_type = 2n GROUP BY a.user_idn) as YnWHERE Y.user_id = u.idn")

-> 0.0008s

-- execute("UPDATE users unSETn topic_reply_count = Z.topic_reply_countnFROM (n SELECTn p.user_id,n COUNT(DISTINCT topic_id) topic_reply_countn FROM posts pn JOIN topics t on t.id = p.topic_idn WHERE t.user_id <> p.user_id ANDn p.deleted_at IS NULL AND t.deleted_at IS NULLn GROUP BY p.user_idn) ZnWHEREn Z.user_id = u.idn")

-> 0.0012s

== 20130404232558 AddUserExtras: migrated (0.0261s) ===========================

== 20130411205132 CreateAdminLogs: migrating ==================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:admin_logs, {:force=>true, :id=>:integer})

-> 0.0049s

== 20130411205132 CreateAdminLogs: migrated (0.0066s) =========================

== 20130412015502 CorrectCountsOnPosts: migrating =============================

-- rename_column(:posts, :custom_flag_count, :notify_moderators_count)

-> 0.0124s

-- add_column(:posts, :notify_user_count, :integer, {:default=>0, :null=>false})

-> 0.0047s

== 20130412015502 CorrectCountsOnPosts: migrated (0.0185s) ====================

== 20130412020156 CorrectCountsOnTopics: migrating ============================

-- rename_column(:topics, :custom_flag_count, :notify_moderators_count)

-> 0.0025s

-- add_column(:topics, :notify_user_count, :integer, {:default=>0, :null=>false})

-> 0.0048s

== 20130412020156 CorrectCountsOnTopics: migrated (0.0098s) ===================

== 20130416004607 CreateGroups: migrating =====================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:groups, {:force=>true, :id=>:integer})

-> 0.0036s

== 20130416004607 CreateGroups: migrated (0.0060s) ============================

== 20130416004933 GroupUsers: migrating =======================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:group_users, {:force=>true, :id=>:integer})

-> 0.0028s

-- add_index(:group_users, [:group_id, :user_id], {:unique=>true})

-> 0.0026s

== 20130416004933 GroupUsers: migrated (0.0070s) ==============================

== 20130416170855 AddSubtypeToTopics: migrating ===============================

-- add_column(:topics, :subtype, :string)

-> 0.0013s

-- execute("update topics set subtype = 'user_to_user' where archetype = 'private_message'")

-> 0.0005s

== 20130416170855 AddSubtypeToTopics: migrated (0.0039s) ======================

== 20130419195746 IncreaseDataLengthOnNotifications: migrating ================

-- execute("ALTER TABLE notifications ALTER COLUMN data TYPE VARCHAR(1000)")

-> 0.0054s

== 20130419195746 IncreaseDataLengthOnNotifications: migrated (0.0079s) =======

== 20130422050626 AddRelatedPostIdToPostActions: migrating ====================

-- add_column(:post_actions, :related_post_id, :integer)

-> 0.0004s

== 20130422050626 AddRelatedPostIdToPostActions: migrated (0.0021s) ===========

== 20130424015746 AddSlugToTopics: migrating ==================================

-- add_column(:topics, :slug, :string)

-> 0.0006s

== 20130424015746 AddSlugToTopics: migrated (0.0020s) =========================

== 20130424055025 AddUserIdToIncomingLinks: migrating =========================

-- add_column(:incoming_links, :user_id, :integer)

-> 0.0004s

== 20130424055025 AddUserIdToIncomingLinks: migrated (0.0023s) ================

== 20130426044914 AllowNullsInIncomingLinks: migrating ========================

-- change_column(:incoming_links, :referer, :string, {:limit=>1000, :null=>true})

-> 0.0013s

-- change_column(:incoming_links, :domain, :string, {:limit=>100, :null=>true})

-> 0.0004s

== 20130426044914 AllowNullsInIncomingLinks: migrated (0.0080s) ===============

== 20130426052257 AddIncomingIpCurrentUserIdToIncomingLinks: migrating ========

-- add_column(:incoming_links, :ip_address, :inet)

-> 0.0005s

-- add_column(:incoming_links, :current_user_id, :int)

-> 0.0003s

== 20130426052257 AddIncomingIpCurrentUserIdToIncomingLinks: migrated (0.0020s)

== 20130428194335 AddUnstarredAtToTopicUsers: migrating =======================

-- add_column(:topic_users, :unstarred_at, :datetime)

-> 0.0004s

== 20130428194335 AddUnstarredAtToTopicUsers: migrated (0.0018s) ==============

== 20130429000101 AddSecurityToCategories: migrating ==========================

-- add_column(:categories, :secure, :boolean, {:default=>false, :null=>false})

-> 0.0045s

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:category_groups, {:force=>true, :id=>:integer})

-> 0.0032s

== 20130429000101 AddSecurityToCategories: migrated (0.0092s) =================

== 20130430052751 AddTopicAllowedGroups: migrating ============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:topic_allowed_groups, {:force=>true, :id=>:integer})

-> 0.0033s

-- add_index(:topic_allowed_groups, [:group_id, :topic_id], {:unique=>true})

-> 0.0021s

-- add_index(:topic_allowed_groups, [:topic_id, :group_id], {:unique=>true})

-> 0.0021s

== 20130430052751 AddTopicAllowedGroups: migrated (0.0090s) ===================

== 20130501105651 FixTopicAllowedGroups: migrating ============================

-- remove_column(:topic_allowed_groups, :integer)

-> 0.0003s

== 20130501105651 FixTopicAllowedGroups: migrated (0.0045s) ===================

== 20130506020935 AddAutomaticToGroups: migrating =============================

-- add_column(:groups, :automatic, :boolean, {:default=>false, :null=>false})

-> 0.0026s

-- execute(" ALTER SEQUENCE groups_id_seq START WITH 100n")

-> 0.0003s

== 20130506020935 AddAutomaticToGroups: migrated (0.0042s) ====================

== 20130506185042 AddAutoCloseAtToTopics: migrating ===========================

-- add_column(:topics, :auto_close_at, :datetime)

-> 0.0005s

-- add_column(:topics, :auto_close_user_id, :integer)

-> 0.0003s

== 20130506185042 AddAutoCloseAtToTopics: migrated (0.0023s) ==================

== 20130508040235 AddUserCountToGroups: migrating =============================

-- add_column(:groups, :user_count, :integer, {:null=>false, :default=>0})

-> 0.0031s

== 20130508040235 AddUserCountToGroups: migrated (0.0047s) ====================

== 20130509040248 UpdateSequenceForGroups: migrating ==========================

-- execute(" SELECT setval('groups_id_seq', 40)n")

-> 0.0003s

== 20130509040248 UpdateSequenceForGroups: migrated (0.0014s) =================

== 20130509041351 AddUniqueNameToGroups: migrating ============================

-- add_index(:groups, [:name], {:unique=>true})

-> 0.0027s

== 20130509041351 AddUniqueNameToGroups: migrated (0.0053s) ===================

== 20130515193551 AddAutoCloseDaysToCategories: migrating =====================

-- add_column(:categories, :auto_close_days, :float)

-> 0.0004s

== 20130515193551 AddAutoCloseDaysToCategories: migrated (0.0024s) ============

== 20130521210140 CreateCasUserInfos: migrating ===============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:cas_user_infos, {:id=>:integer})

-> 0.0030s

-- add_index(:cas_user_infos, :user_id, {:unique=>true})

-> 0.0024s

-- add_index(:cas_user_infos, :cas_user_id, {:unique=>true})

-> 0.0019s

== 20130521210140 CreateCasUserInfos: migrated (0.0088s) ======================

== 20130522193615 RenameSearchTables: migrating ===============================

-- rename_table(:users_search, :user_search_data)

-> 0.0045s

-- rename_column(:user_search_data, :id, :user_id)

-> 0.0017s

-- rename_table(:categories_search, :category_search_data)

-> 0.0039s

-- rename_column(:category_search_data, :id, :category_id)

-> 0.0016s

-- rename_table(:posts_search, :post_search_data)

-> 0.0042s

-- rename_column(:post_search_data, :id, :post_id)

-> 0.0016s

== 20130522193615 RenameSearchTables: migrated (0.0194s) ======================

== 20130527152648 AddLikeScoreToPosts: migrating ==============================

-- add_column(:posts, :like_score, :integer, {:default=>0, :null=>false})

-> 0.0048s

-- execute("UPDATE posts pn set like_score = x.like_scoren FROM (SELECT pa.post_id,n SUM(CASEn WHEN u.admin OR u.moderator THEN 3n ELSE 1n END) AS like_scoren FROM post_actions AS pan INNER JOIN users AS u ON u.id = pa.user_idn GROUP BY pa.post_id) AS xn WHERE x.post_id = p.id")

-> 0.0016s

== 20130527152648 AddLikeScoreToPosts: migrated (0.0085s) =====================

== 20130528174147 AddRankToCategoryFeaturedTopics: migrating ==================

-- add_column(:category_featured_topics, :rank, :integer, {:default=>0, :null=>false})

-> 0.0021s

-- add_index(:category_featured_topics, [:category_id, :rank])

-> 0.0055s

== 20130528174147 AddRankToCategoryFeaturedTopics: migrated (0.0125s) =========

== 20130531210816 AddStaffTookActionToPostActions: migrating ==================

-- add_column(:post_actions, :staff_took_action, :boolean, {:default=>false, :null=>false})

-> 0.0038s

== 20130531210816 AddStaffTookActionToPostActions: migrated (0.0055s) =========

== 20130603192412 AddBlockedToUsers: migrating ================================

-- add_column(:users, :blocked, :boolean, {:default=>false})

-> 0.0075s

== 20130603192412 AddBlockedToUsers: migrated (0.0104s) =======================

== 20130606190601 AddAutoCloseStartedAtToTopics: migrating ====================

-- add_column(:topics, :auto_close_started_at, :datetime)

-> 0.0006s

== 20130606190601 AddAutoCloseStartedAtToTopics: migrated (0.0031s) ===========

== 20130610201033 AddReplyKeyToEmailLogs: migrating ===========================

-- add_column(:email_logs, :reply_key, :string, {:limit=>32})

-> 0.0005s

-- add_index(:email_logs, :reply_key)

-> 0.0021s

== 20130610201033 AddReplyKeyToEmailLogs: migrated (0.0042s) ==================

== 20130612200846 CreatePostUploadJoinTable: migrating ========================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:posts_uploads, {:force=>true, :id=>false})

-> 0.0010s

-- add_index(:posts_uploads, :post_id)

-> 0.0037s

-- add_index(:posts_uploads, :upload_id)

-> 0.0025s

-- add_index(:posts_uploads, [:post_id, :upload_id], {:unique=>true})

-> 0.0023s

== 20130612200846 CreatePostUploadJoinTable: migrated (0.0110s) ===============

== 20130613211700 DropPostsUploads: migrating =================================

-- drop_table(:posts_uploads)

-> 0.0006s

== 20130613211700 DropPostsUploads: migrated (0.0058s) ========================

== 20130613212230 CreatePostUploads: migrating ================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:post_uploads, {:id=>:integer})

-> 0.0027s

-- execute("create unique index idx_unique_post_uploads on post_uploads(post_id, upload_id)")

-> 0.0009s

== 20130613212230 CreatePostUploads: migrated (0.0072s) =======================

== 20130615064344 AddDynamicFaviconPreferenceToUser: migrating ================

-- add_column(:users, :dynamic_favicon, :boolean, {:default=>false, :null=>false})

-> 0.0066s

== 20130615064344 AddDynamicFaviconPreferenceToUser: migrated (0.0083s) =======

== 20130615073305 RemoveTopicIdFromUploads: migrating =========================

-- remove_column(:uploads, :topic_id)

-> 0.0004s

== 20130615073305 RemoveTopicIdFromUploads: migrated (0.0059s) ================

== 20130615075557 AddShaToUploads: migrating ==================================

-- add_column(:uploads, :sha, :string, {:null=>true})

-> 0.0004s

-- add_index(:uploads, :sha, {:unique=>true})

-> 0.0019s

== 20130615075557 AddShaToUploads: migrated (0.0036s) =========================

== 20130616082327 CreateOptimizedImages: migrating ============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:optimized_images, {:id=>:integer})

-> 0.0041s

-- add_index(:optimized_images, :upload_id)

-> 0.0029s

-- add_index(:optimized_images, [:upload_id, :width, :height], {:unique=>true})

-> 0.0034s

== 20130616082327 CreateOptimizedImages: migrated (0.0140s) ===================

== 20130617014127 RenameShaAndExtColumns: migrating ===========================

-- rename_column(:optimized_images, :sha, :sha1)

-> 0.0028s

-- change_column(:optimized_images, :sha1, :string, {:limit=>40})

-> 0.0095s

-- rename_column(:optimized_images, :ext, :extension)

-> 0.0026s

-- change_column(:optimized_images, :extension, :string, {:limit=>10})

-> 0.0023s

== 20130617014127 RenameShaAndExtColumns: migrated (0.0188s) ==================

== 20130617180009 RenameShaColumn: migrating ==================================

-- index_name(:uploads, {:column=>:sha})

-> 0.0000s

-- index_name_exists?(:uploads, "index_uploads_on_sha")

-> 0.0008s

-- remove_index(:uploads, {:column=>:sha, :name=>"index_uploads_on_sha"})

-> 0.0024s

-- rename_column(:uploads, :sha, :sha1)

-> 0.0019s

-- change_column(:uploads, :sha1, :string, {:limit=>40})

-> 0.0033s

-- add_index(:uploads, :sha1, {:unique=>true})

-> 0.0022s

== 20130617180009 RenameShaColumn: migrated (0.0122s) =========================

== 20130617181804 AddPostIdToEmailLogs: migrating =============================

-- add_column(:email_logs, :post_id, :integer, {:null=>true})

-> 0.0004s

-- add_column(:email_logs, :topic_id, :integer, {:null=>true})

-> 0.0003s

== 20130617181804 AddPostIdToEmailLogs: migrated (0.0020s) ====================

== 20130619063902 AddDeferToPostActions: migrating ============================

-- add_column(:post_actions, :defer, :boolean)

-> 0.0004s

-- add_column(:post_actions, :defer_by, :int)

-> 0.0002s

== 20130619063902 AddDeferToPostActions: migrated (0.0024s) ===================

== 20130621042855 ChangeSupressToSuppress: migrating ==========================

== 20130621042855 ChangeSupressToSuppress: migrated (0.0074s) =================

== 20130622110348 AddUrlIndexToUploads: migrating =============================

-- add_index(:uploads, :url)

-> 0.0030s

== 20130622110348 AddUrlIndexToUploads: migrated (0.0043s) ====================

== 20130624203206 ChangeIpToInetInTopicLinkClicks: migrating ==================

-- add_column(:topic_link_clicks, :ip_address, :inet)

-> 0.0012s

-- execute("UPDATE topic_link_clicks SET ip_address = inet(n (ip >> 24 & 255) '.' n (ip >> 16 & 255) '.' n (ip >> 8 & 255) '.' n (ip >> 0 & 255)n );")

-> 0.0007s

-- change_column(:topic_link_clicks, :ip_address, :inet, {:null=>false})

-> 0.0005s

-- remove_column(:topic_link_clicks, :ip)

-> 0.0002s

== 20130624203206 ChangeIpToInetInTopicLinkClicks: migrated (0.0040s) =========

== 20130625022454 ChangeIpToInetInViews: migrating ============================

-- add_column(:views, :ip_address, :inet)

-> 0.0011s

-- execute("UPDATE views SET ip_address = inet(n (ip >> 24 & 255) '.' n (ip >> 16 & 255) '.' n (ip >> 8 & 255) '.' n (ip >> 0 & 255)n );")

-> 0.0005s

-- change_column(:views, :ip_address, :inet, {:null=>false})

-> 0.0004s

-- remove_column(:views, :ip)

-> 0.0002s

== 20130625022454 ChangeIpToInetInViews: migrated (0.0038s) ===================

== 20130625170842 RemoveAccessPassword: migrating =============================

-- execute("SELECT count(*) FROM site_settings where name='access_password' and char_length(value) > 0")

-> 0.0004s

== 20130625170842 RemoveAccessPassword: migrated (0.0021s) ====================

== 20130625201113 AddTitleToUsers: migrating ==================================

-- add_column(:users, :title, :string)

-> 0.0006s

== 20130625201113 AddTitleToUsers: migrated (0.0021s) =========================

== 20130709184941 AddDeletedByIdToPosts: migrating ============================

-- add_column(:posts, :deleted_by_id, :integer, {:null=>true})

-> 0.0005s

-- add_column(:topics, :deleted_by_id, :integer, {:null=>true})

-> 0.0004s

-- add_column(:invites, :deleted_by_id, :integer, {:null=>true})

-> 0.0003s

-- rename_column(:post_actions, :deleted_by, :deleted_by_id)

-> 0.0024s

== 20130709184941 AddDeletedByIdToPosts: migrated (0.0067s) ===================

== 20130710201248 AddNukedUserToPosts: migrating ==============================

-- add_column(:posts, :nuked_user, :boolean, {:default=>false})

-> 0.0049s

== 20130710201248 AddNukedUserToPosts: migrated (0.0069s) =====================

== 20130712041133 AddPermissionTypeToCategoryGroups: migrating ================

-- add_column(:category_groups, :permission_type, :integer, {:default=>1})

-> 0.0025s

-- rename_column(:categories, :secure, :read_restricted)

-> 0.0024s

== 20130712041133 AddPermissionTypeToCategoryGroups: migrated (0.0080s) =======

== 20130712163509 AddMissingIdColumns: migrating ==============================

-- add_column(:category_featured_topics, :id, :primary_key)

-> 0.0034s

-- add_column(:topic_users, :id, :primary_key)

-> 0.0045s

== 20130712163509 AddMissingIdColumns: migrated (0.0093s) =====================

== 20130723212758 RenameAdminLog: migrating ===================================

-- rename_table(:admin_logs, :staff_action_logs)

-> 0.0034s

-- rename_column(:staff_action_logs, :admin_id, :staff_user_id)

-> 0.0011s

== 20130723212758 RenameAdminLog: migrated (0.0058s) ==========================

== 20130724201552 CreateBlockedEmails: migrating ==============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:blocked_emails, {:id=>:integer})

-> 0.0046s

-- add_index(:blocked_emails, :email, {:unique=>true})

-> 0.0021s

== 20130724201552 CreateBlockedEmails: migrated (0.0082s) =====================

== 20130725213613 AddMoreToStaffActionLog: migrating ==========================

-- add_column(:staff_action_logs, :context, :string)

-> 0.0004s

-- add_column(:staff_action_logs, :ip_address, :string)

-> 0.0002s

-- add_column(:staff_action_logs, :email, :string)

-> 0.0003s

== 20130725213613 AddMoreToStaffActionLog: migrated (0.0028s) =================

== 20130728172550 AddUrlToOptimizedImages: migrating ==========================

-- add_column(:optimized_images, :url, :string)

-> 0.0014s

-- execute("UPDATE optimized_imagesn SET url = substring(u.url from '^/uploads/[^/]+/')n '_optimized/'n substring(oi.sha1 for 3) '/'n substring(oi.sha1 from 4 for 3) '/'n substring(oi.sha1 from 7 for 11) oi.extensionn FROM optimized_images oin JOIN uploads u ON u.id = oi.upload_idn WHERE optimized_images.id = oi.id;")

-> 0.0010s

-- change_column(:optimized_images, :url, :string, {:null=>false})

-> 0.0005s

== 20130728172550 AddUrlToOptimizedImages: migrated (0.0041s) =================

== 20130731163035 AddReportIndexToIncomingLinks: migrating ====================

-- add_index(:incoming_links, [:created_at, :user_id])

-> 0.0065s

-- add_index(:incoming_links, [:created_at, :domain])

-> 0.0019s

== 20130731163035 AddReportIndexToIncomingLinks: migrated (0.0101s) ===========

== 20130807202516 AddLastMatchIndexToBlockedEmails: migrating =================

-- add_index(:blocked_emails, :last_match_at)

-> 0.0021s

== 20130807202516 AddLastMatchIndexToBlockedEmails: migrated (0.0036s) ========

== 20130809160751 FixSeenNotificationIds: migrating ===========================

-- execute("UPDATE users SETn seen_notification_id = COALESCE((SELECT MAX(notifications.id)n FROM notificationsn WHERE user_id = users.id AND created_at <= users.last_seen_at), 0)")

-> 0.0010s

== 20130809160751 FixSeenNotificationIds: migrated (0.0050s) ==================

== 20130809204732 AddFilterIndexesToStaffActionLogs: migrating ================

-- add_index(:staff_action_logs, [:action, :id])

-> 0.0027s

-- add_index(:staff_action_logs, [:staff_user_id, :id])

-> 0.0019s

-- add_index(:staff_action_logs, [:target_user_id, :id])

-> 0.0021s

== 20130809204732 AddFilterIndexesToStaffActionLogs: migrated (0.0080s) =======

== 20130809211409 AddAvatarToUsers: migrating =================================

-- add_column(:users, :use_uploaded_avatar, :boolean, {:default=>false})

-> 0.0062s

-- add_column(:users, :uploaded_avatar_template, :string)

-> 0.0004s

-- add_column(:users, :uploaded_avatar_id, :integer)

-> 0.0003s

== 20130809211409 AddAvatarToUsers: migrated (0.0083s) ========================

== 20130813204212 CreateScreenedUrls: migrating ===============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:screened_urls, {:id=>:integer})

-> 0.0030s

-- add_index(:screened_urls, :url, {:unique=>true})

-> 0.0020s

-- add_index(:screened_urls, :last_match_at)

-> 0.0018s

== 20130813204212 CreateScreenedUrls: migrated (0.0085s) ======================

== 20130813224817 RenameBlockedEmailsToScreenedEmails: migrating ==============

-- rename_table(:blocked_emails, :screened_emails)

-> 0.0047s

== 20130813224817 RenameBlockedEmailsToScreenedEmails: migrated (0.0062s) =====

== 20130816024250 CreateOauth2UserInfos: migrating ============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:oauth2_user_infos, {:id=>:integer})

-> 0.0033s

-- add_index(:oauth2_user_infos, [:uid, :provider], {:unique=>true})

-> 0.0022s

== 20130816024250 CreateOauth2UserInfos: migrated (0.0070s) ===================

== 20130819192358 AddValueColumnsToStaffActionLogs: migrating =================

-- add_column(:staff_action_logs, :subject, :text)

-> 0.0004s

-- add_column(:staff_action_logs, :previous_value, :text)

-> 0.0003s

-- add_column(:staff_action_logs, :new_value, :text)

-> 0.0003s

== 20130819192358 AddValueColumnsToStaffActionLogs: migrated (0.0021s) ========

== 20130820174431 AddSubjectIndexToStaffActionLogs: migrating =================

-- add_index(:staff_action_logs, [:subject, :id])

-> 0.0021s

== 20130820174431 AddSubjectIndexToStaffActionLogs: migrated (0.0037s) ========

== 20130822213513 AddIpAddressToScreeningTables: migrating ====================

-- add_column(:screened_emails, :ip_address, :inet)

-> 0.0004s

-- add_column(:screened_urls, :ip_address, :inet)

-> 0.0003s

== 20130822213513 AddIpAddressToScreeningTables: migrated (0.0026s) ===========

== 20130823201420 DropDefaultsOnEmailDigestColumnsOfUsers: migrating ==========

-- change_column_default(:users, :email_digests, nil)

-> 0.0033s

-- change_column(:users, :digest_after_days, :integer, {:default=>nil, :null=>true})

-> 0.0039s

== 20130823201420 DropDefaultsOnEmailDigestColumnsOfUsers: migrated (0.0093s) =

== 20130826011521 CreatePluginStoreRows: migrating ============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:plugin_store_rows, {:id=>:integer})

-> 0.0034s

-- add_index(:plugin_store_rows, [:plugin_name, :key], {:unique=>true})

-> 0.0024s

== 20130826011521 CreatePluginStoreRows: migrated (0.0073s) ===================

== 20130828192526 FixOptimizedImagesUrls: migrating ===========================

-- execute("UPDATE optimized_imagesn SET url = substring(oi.url from '^\/uploads\/[^/]+\/_optimized\/[0-9a-f]{3}\/[0-9a-f]{3}\/[0-9a-f]{11}')n '_'n oi.widthn 'x'n oi.heightn substring(oi.url from '\.\w{3,4}$')n FROM optimized_images oin WHERE optimized_images.id = oi.idn AND oi.url ~ '^\/uploads\/[^/]+\/_optimized\/[0-9a-f]{3}\/[0-9a-f]{3}\/[0-9a-f]{11}\.';")

-> 0.0008s

== 20130828192526 FixOptimizedImagesUrls: migrated (0.0021s) ==================

== 20130903154323 AllowNullUserIdOnPosts: migrating ===========================

-- change_column(:posts, :user_id, :integer, {:null=>true})

-> 0.0016s

-- execute("UPDATE posts SET user_id = NULL WHERE nuked_user = true")

-> 0.0004s

-- remove_column(:posts, :nuked_user)

-> 0.0004s

== 20130903154323 AllowNullUserIdOnPosts: migrated (0.0042s) ==================

== 20130904181208 AllowNullUserIdOnTopics: migrating ==========================

-- change_column(:topics, :user_id, :integer, {:null=>true})

-> 0.0020s

== 20130904181208 AllowNullUserIdOnTopics: migrated (0.0033s) =================

== 20130906081326 RenameSystemUsername: migrating =============================

-- execute("update site_settings set name = 'site_contact_username' where name = 'system_username'")

-> 0.0003s

== 20130906081326 RenameSystemUsername: migrated (0.0013s) ====================

== 20130906171631 AddIndexToUploads: migrating ================================

-- add_index(:uploads, [:id, :url])

-> 0.0024s

== 20130906171631 AddIndexToUploads: migrated (0.0037s) =======================

== 20130910040235 IndexTopicsForFrontPage: migrating ==========================

-- add_index(:topics, [:deleted_at, :visible, :archetype, :id])

-> 0.0022s

-- add_index(:topics, [:id, :deleted_at])

-> 0.0020s

== 20130910040235 IndexTopicsForFrontPage: migrated (0.0059s) =================

== 20130910220317 RenameStaffActionLogsToUserHistory: migrating ===============

-- index_name(:staff_action_logs, {:column=>[:staff_user_id, :id]})

-> 0.0000s

-- index_name_exists?(:staff_action_logs, "index_staff_action_logs_on_staff_user_id_and_id")

-> 0.0008s

-- remove_index(:staff_action_logs, {:column=>[:staff_user_id, :id], :name=>"index_staff_action_logs_on_staff_user_id_and_id"})

-> 0.0033s

-- rename_table(:staff_action_logs, :user_histories)

-> 0.0052s

-- rename_column(:user_histories, :staff_user_id, :acting_user_id)

-> 0.0026s

-- add_index(:user_histories, [:acting_user_id, :action, :id])

-> 0.0022s

== 20130910220317 RenameStaffActionLogsToUserHistory: migrated (0.0159s) ======

== 20130911182437 CreateUserStats: migrating ==================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:user_stats, {:id=>false})

-> 0.0011s

-- execute("ALTER TABLE user_stats ADD PRIMARY KEY (user_id)")

-> 0.0011s

-- execute("INSERT INTO user_stats (user_id) SELECT id FROM users")

-> 0.0006s

== 20130911182437 CreateUserStats: migrated (0.0052s) =========================

== 20130912185218 ActingUserNull: migrating ===================================

-- change_column(:user_histories, :acting_user_id, :integer, {:null=>true})

-> 0.0011s

== 20130912185218 ActingUserNull: migrated (0.0026s) ==========================

== 20130913210454 AddMobileToSiteCustomizations: migrating ====================

-- add_column(:site_customizations, :mobile_stylesheet, :text)

-> 0.0005s

-- add_column(:site_customizations, :mobile_header, :text)

-> 0.0003s

-- add_column(:site_customizations, :mobile_stylesheet_baked, :text)

-> 0.0002s

== 20130913210454 AddMobileToSiteCustomizations: migrated (0.0065s) ===========

== 20130917174738 AddTopicIdToUserHistories: migrating ========================

-- add_column(:user_histories, :topic_id, :integer)

-> 0.0004s

== 20130917174738 AddTopicIdToUserHistories: migrated (0.0031s) ===============

== 20131001060630 AddEmailAlwaysToUsers: migrating ============================

-- add_column(:users, :email_always, :bool, {:default=>false, :null=>false})

-> 0.0063s

== 20131001060630 AddEmailAlwaysToUsers: migrated (0.0123s) ===================

== 20131002070347 AddUserIdParentTypeIndexOnViews: migrating ==================

-- add_index(:views, [:user_id, :parent_type, :parent_id])

-> 0.0032s

== 20131002070347 AddUserIdParentTypeIndexOnViews: migrated (0.0053s) =========

== 20131003061137 MoveColumnsToUserStats: migrating ===========================

-- add_column(:user_stats, :topics_entered, :integer, {:default=>0, :null=>false})

-> 0.0017s

-- add_column(:user_stats, :time_read, :integer, {:default=>0, :null=>false})

-> 0.0014s

-- add_column(:user_stats, :days_visited, :integer, {:default=>0, :null=>false})

-> 0.0015s

-- add_column(:user_stats, :posts_read_count, :integer, {:default=>0, :null=>false})

-> 0.0015s

-- add_column(:user_stats, :likes_given, :integer, {:default=>0, :null=>false})

-> 0.0019s

-- add_column(:user_stats, :likes_received, :integer, {:default=>0, :null=>false})

-> 0.0017s

-- add_column(:user_stats, :topic_reply_count, :integer, {:default=>0, :null=>false})

-> 0.0018s

-- execute("UPDATE user_stats sn SET topics_entered = u.topics_entered,n time_read = u.time_read,n days_visited = u.days_visited,n posts_read_count = u.posts_read_count,n likes_given = u.likes_given,n likes_received = u.likes_received,n topic_reply_count = u.topic_reply_countn FROM users u WHERE u.id = s.user_idn ")

-> 0.0007s

-- remove_column(:users, :topics_entered)

-> 0.0004s

-- remove_column(:users, :time_read)

-> 0.0004s

-- remove_column(:users, :days_visited)

-> 0.0003s

-- remove_column(:users, :posts_read_count)

-> 0.0003s

-- remove_column(:users, :likes_given)

-> 0.0004s

-- remove_column(:users, :likes_received)

-> 0.0003s

-- remove_column(:users, :topic_reply_count)

-> 0.0003s

== 20131003061137 MoveColumnsToUserStats: migrated (0.0181s) ==================

== 20131014203951 BackfillPostUploadReverseIndex: migrating ===================

-- execute("TRUNCATE TABLE post_uploads")

-> 0.0022s

== 20131014203951 BackfillPostUploadReverseIndex: migrated (0.0129s) ==========

== 20131015131652 CreatePostDetails: migrating ================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:post_details, {:id=>:integer})

-> 0.0030s

-- add_index(:post_details, [:post_id, :key], {:unique=>true})

-> 0.0023s

== 20131015131652 CreatePostDetails: migrated (0.0086s) =======================

== 20131017014509 AddPostCountToCategories: migrating =========================

-- add_column(:categories, :post_count, :integer, {:null=>false, :default=>0})

-> 0.0038s

-- execute(" UPDATE categoriesn SET post_count = (SELECT COALESCE(SUM(posts_count),0) FROM topicsn WHERE category_id = categories.id AND deleted_at IS NULL)n")

-> 0.0008s

== 20131017014509 AddPostCountToCategories: migrated (0.0069s) ================

== 20131017030605 AddLatestToCategories: migrating ============================

-- add_column(:categories, :latest_post_id, :integer)

-> 0.0004s

-- add_column(:categories, :latest_topic_id, :integer)

-> 0.0002s

-- execute(" UPDATE categories cn SET latest_post_id = x.post_idn FROM (select category_id, max(p.id) post_id FROM posts pn JOIN topics t on t.id = p.topic_idn WHERE p.deleted_at IS NULL AND NOT p.hidden AND t.visiblen GROUP BY category_idn ) xn WHERE x.category_id = c.idn")

-> 0.0008s

-- execute(" UPDATE categories cn SET latest_topic_id = x.topic_idn FROM (select category_id, max(t.id) topic_idn FROM topics tn WHERE t.deleted_at IS NULL AND t.visiblen GROUP BY category_idn ) xn WHERE x.category_id = c.idn")

-> 0.0004s

== 20131017030605 AddLatestToCategories: migrated (0.0034s) ===================

== 20131017205954 CreateScreenedIpAddresses: migrating ========================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:screened_ip_addresses, {:id=>:integer})

-> 0.0038s

-- add_index(:screened_ip_addresses, :ip_address, {:unique=>true})

-> 0.0020s

-- add_index(:screened_ip_addresses, :last_match_at)

-> 0.0018s

== 20131017205954 CreateScreenedIpAddresses: migrated (0.0107s) ===============

== 20131018050738 AddPositionToCategories: migrating ==========================

-- add_column(:categories, :position, :integer)

-> 0.0004s

-- execute("UPDATE categories SET position = id")

-> 0.0003s

-- change_column(:categories, :position, :integer, {:null=>false})

-> 0.0004s

== 20131018050738 AddPositionToCategories: migrated (0.0042s) =================

== 20131022045114 AddUncategorizedCategory: migrating =========================

-- execute("SELECT 1 FROM categories WHERE lower(name) = 'uncategorized'")

-> 0.0004s

-- execute("INSERT INTO categoriesn (name,color,slug,description,text_color, user_id, created_at, updated_at, position)n VALUES ('Uncategorized', 'AB9364', 'uncategorized', '', 'FFFFFF', -1, now(), now(), 0 )n RETURNING idn ")

-> 0.0004s

-- execute("INSERT INTO site_settings(name, data_type, value, created_at, updated_at)n VALUES ('uncategorized_category_id', 3, 1, now(), now())")

-> 0.0003s

-- execute("DELETE from site_settings where name in ('uncategorized_name', 'uncategorized_text_color', 'uncategorized_color')")

-> 0.0003s

-- execute("UPDATE topics SET category_id = 1 WHERE archetype = 'regular' AND category_id IS NULL")

-> 0.0003s

-- execute("ALTER table topics ADD CONSTRAINT has_category_id CHECK (category_id IS NOT NULL OR archetype <> 'regular')")

-> 0.0006s

== 20131022045114 AddUncategorizedCategory: migrated (0.0036s) ================

== 20131022151218 CreateApiKeys: migrating ====================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:api_keys, {:id=>:integer})

-> 0.0021s

-- add_index(:api_keys, :key)

-> 0.0017s

-- add_index(:api_keys, :user_id, {:unique=>true})

-> 0.0016s

-- execute("INSERT INTO api_keys (key, created_at, updated_at) SELECT value, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP FROM site_settings WHERE name = 'api_key'")

-> 0.0003s

-- execute("DELETE FROM site_settings WHERE name = 'api_key'")

-> 0.0002s

== 20131022151218 CreateApiKeys: migrated (0.0078s) ===========================

== 20131023163509 AddParentCategoryIdToCategories: migrating ==================

-- add_column(:categories, :parent_category_id, :integer)

-> 0.0004s

== 20131023163509 AddParentCategoryIdToCategories: migrated (0.0016s) =========

== 20131105101051 AddOriginToUploads: migrating ===============================

-- add_column(:uploads, :origin, :string, {:limit=>1000})

-> 0.0004s

== 20131105101051 AddOriginToUploads: migrated (0.0016s) ======================

== 20131107154900 RenameBannedToSuspended: migrating ==========================

-- rename_column(:users, :banned_at, :suspended_at)

-> 0.0034s

-- rename_column(:users, :banned_till, :suspended_till)

-> 0.0030s

== 20131107154900 RenameBannedToSuspended: migrated (0.0077s) =================

== 20131114185225 AddParticipantCountToTopics: migrating ======================

-- add_column(:topics, :participant_count, :integer, {:default=>1})

-> 0.0062s

-- execute("UPDATE topics SET participant_count =n (SELECT COUNT(DISTINCT p.user_id) FROM posts AS p WHERE p.topic_id = topics.id)")

-> 0.0006s

== 20131114185225 AddParticipantCountToTopics: migrated (0.0123s) =============

== 20131115165105 AddEditReasonToPosts: migrating =============================

-- add_column(:posts, :edit_reason, :string)

-> 0.0005s

== 20131115165105 AddEditReasonToPosts: migrated (0.0019s) ====================

== 20131118173159 RenameBestOfToSummary: migrating ============================

-- rename_column(:topics, :has_best_of, :has_summary)

-> 0.0039s

== 20131118173159 RenameBestOfToSummary: migrated (0.0050s) ===================

== 20131120055018 MoveEmojiToNewLocation: migrating ===========================

-- execute("update posts set cooked = regexp_replace(cooked, '(<img[^>]*)assets/emoji/', '\1plugins/emoji/images/' , 'g') where cooked like '%emoji%'")

-> 0.0006s

== 20131120055018 MoveEmojiToNewLocation: migrated (0.0020s) ==================

== 20131122064921 IncreaseTwitterUserIdLength: migrating ======================

-- change_column(:twitter_user_infos, :twitter_user_id, :bigint)

-> 0.0050s

== 20131122064921 IncreaseTwitterUserIdLength: migrated (0.0067s) =============

== 20131206200009 RenameAutoCloseDaysToHours: migrating =======================

-- rename_column(:categories, :auto_close_days, :auto_close_hours)

-> 0.0026s

-- execute("update categories set auto_close_hours = auto_close_hours * 24")

-> 0.0005s

== 20131206200009 RenameAutoCloseDaysToHours: migrated (0.0056s) ==============

== 20131209091702 CreatePostRevisions: migrating ==============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:post_revisions, {:id=>:integer})

-> 0.0026s

-- execute("INSERT INTO post_revisions (user_id, post_id, modifications, number, created_at, updated_at)n SELECT user_id, versioned_id, modifications, number, created_at, updated_atn FROM versionsn WHERE versioned_type = 'Post'")

-> 0.0004s

-- change_table(:post_revisions, {})

-> 0.0061s

== 20131209091702 CreatePostRevisions: migrated (0.0107s) =====================

== 20131209091742 CreateTopicRevisions: migrating =============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:topic_revisions, {:id=>:integer})

-> 0.0044s

-- execute("INSERT INTO topic_revisions (user_id, topic_id, modifications, number, created_at, updated_at)n SELECT user_id, versioned_id, modifications, number, created_at, updated_atn FROM versionsn WHERE versioned_type = 'Topic'")

-> 0.0005s

-- change_table(:topic_revisions, {})

-> 0.0059s

== 20131209091742 CreateTopicRevisions: migrated (0.0122s) ====================

== 20131210163702 AddWordCountToPosts: migrating ==============================

-- add_column(:posts, :word_count, :integer)

-> 0.0004s

-- add_column(:topics, :word_count, :integer)

-> 0.0004s

== 20131210163702 AddWordCountToPosts: migrated (0.0036s) =====================

== 20131210181901 MigrateWordCounts: migrating ================================

-- execute("SELECT id FROM posts WHERE word_count IS NULL LIMIT 500")

-> 0.0006s

-- execute("SELECT id FROM topics WHERE word_count IS NULL LIMIT 500")

-> 0.0006s

== 20131210181901 MigrateWordCounts: migrated (0.0053s) =======================

== 20131210234530 RenameVersionColumn: migrating ==============================

-- add_column(:posts, :version, :integer, {:default=>1, :null=>false})

-> 0.0067s

-- execute("UPDATE posts SET version = cached_version")

-> 0.0004s

-- remove_column(:posts, :cached_version)

-> 0.0004s

== 20131210234530 RenameVersionColumn: migrated (0.0107s) =====================

== 20131212225511 AddPostCountStatsColumnsToCategories: migrating =============

-- change_table(:categories, {})

-> 0.0009s

== 20131212225511 AddPostCountStatsColumnsToCategories: migrated (0.0025s) ====

== 20131216164557 MakePositionNullableInCategories: migrating =================

-- change_column(:categories, :position, :integer, {:null=>true})

-> 0.0006s

== 20131216164557 MakePositionNullableInCategories: migrated (0.0017s) ========

== 20131217174004 CreateTopicEmbeds: migrating ================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:topic_embeds, {:force=>true, :id=>:integer})

-> 0.0049s

-- add_index(:topic_embeds, :embed_url, {:unique=>true})

-> 0.0019s

== 20131217174004 CreateTopicEmbeds: migrated (0.0087s) =======================

== 20131219203905 AddCookMethodToPosts: migrating =============================

-- add_column(:posts, :cook_method, :integer, {:default=>1, :null=>false})

-> 0.0049s

== 20131219203905 AddCookMethodToPosts: migrated (0.0065s) ====================

== 20131223171005 CreateTopTopics: migrating ==================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:top_topics, {:force=>true, :id=>:integer})

-> 0.0059s

-- add_index(:top_topics, :topic_id, {:unique=>true})

-> 0.0020s

-- add_index(:top_topics, :yearly_posts_count, {:order=>"desc"})

-> 0.0025s

-- add_index(:top_topics, :yearly_views_count, {:order=>"desc"})

-> 0.0020s

-- add_index(:top_topics, :yearly_likes_count, {:order=>"desc"})

-> 0.0023s

-- add_index(:top_topics, :monthly_posts_count, {:order=>"desc"})

-> 0.0025s

-- add_index(:top_topics, :monthly_views_count, {:order=>"desc"})

-> 0.0023s

-- add_index(:top_topics, :monthly_likes_count, {:order=>"desc"})

-> 0.0024s

-- add_index(:top_topics, :weekly_posts_count, {:order=>"desc"})

-> 0.0021s

-- add_index(:top_topics, :weekly_views_count, {:order=>"desc"})

-> 0.0020s

-- add_index(:top_topics, :weekly_likes_count, {:order=>"desc"})

-> 0.0018s

-- add_index(:top_topics, :daily_posts_count, {:order=>"desc"})

-> 0.0021s

-- add_index(:top_topics, :daily_views_count, {:order=>"desc"})

-> 0.0051s

-- add_index(:top_topics, :daily_likes_count, {:order=>"desc"})

-> 0.0018s

== 20131223171005 CreateTopTopics: migrated (0.0426s) =========================

== 20131227164338 AddScoresToTopTopics: migrating =============================

-- add_column(:top_topics, :daily_score, :float)

-> 0.0010s

-- add_column(:top_topics, :weekly_score, :float)

-> 0.0004s

-- add_column(:top_topics, :monthly_score, :float)

-> 0.0006s

-- add_column(:top_topics, :yearly_score, :float)

-> 0.0006s

== 20131227164338 AddScoresToTopTopics: migrated (0.0057s) ====================

== 20131229221725 AddWatchNewTopicsToUsers: migrating =========================

-- add_column(:users, :watch_new_topics, :boolean, {:default=>false, :null=>false})

-> 0.0067s

== 20131229221725 AddWatchNewTopicsToUsers: migrated (0.0102s) ================

== 20131230010239 AddLastEmailedPostNumberToTopicUser: migrating ==============

-- add_column(:topic_users, :last_emailed_post_number, :integer)

-> 0.0006s

== 20131230010239 AddLastEmailedPostNumberToTopicUser: migrated (0.0028s) =====

== 20140101235747 AddCategoryUsers: migrating =================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:category_users, {:id=>:integer})

-> 0.0023s

== 20140101235747 AddCategoryUsers: migrated (0.0038s) ========================

== 20140102104229 AddAliasLevelToGroups: migrating ============================

-- add_column(:groups, :alias_level, :integer, {:default=>0})

-> 0.0047s

== 20140102104229 AddAliasLevelToGroups: migrated (0.0063s) ===================

== 20140102194802 RemoveDefaultFromExternalLinksInNewTab: migrating ===========

-- change_column_default(:users, :external_links_in_new_tab, nil)

-> 0.0038s

== 20140102194802 RemoveDefaultFromExternalLinksInNewTab: migrated (0.0068s) ==

== 20140107220141 RemoveEnableWideCategoryList: migrating =====================

-- execute("DELETE FROM site_settings WHERE name = 'enable_wide_category_list'")

-> 0.0004s

== 20140107220141 RemoveEnableWideCategoryList: migrated (0.0036s) ============

== 20140109205940 RenameFavoritesToStarred: migrating =========================

-- execute("UPDATE site_settings SET name = 'max_stars_per_day' where name = 'max_favorites_per_day'")

-> 0.0003s

-- execute("UPDATE site_settings SET value = REPLACE(value, ' favorited', ' starred') where name = 'top_menu'")

-> 0.0002s

== 20140109205940 RenameFavoritesToStarred: migrated (0.0024s) ================

== 20140116170655 DropHotTopics: migrating ====================================

-- drop_table(:hot_topics)

-> 0.0011s

== 20140116170655 DropHotTopics: migrated (0.0026s) ===========================

== 20140120155706 AddLoungeCategory: migrating ================================

-- execute("INSERT INTO site_settings(name, data_type, value, created_at, updated_at)n VALUES ('lounge_category_id', 3, 2, now(), now())")

-> 0.0003s

== 20140120155706 AddLoungeCategory: migrated (0.0994s) =======================

== 20140121204628 AddInvalidatedAtToInvites: migrating ========================

-- add_column(:invites, :invalidated_at, :datetime)

-> 0.0004s

== 20140121204628 AddInvalidatedAtToInvites: migrated (0.0022s) ===============

== 20140122043508 AddMetaCategory: migrating ==================================

-- execute("INSERT INTO site_settings(name, data_type, value, created_at, updated_at)n VALUES ('meta_category_id', 3, 3, now(), now())")

-> 0.0003s

== 20140122043508 AddMetaCategory: migrated (0.0035s) =========================

== 20140124202427 AddPostsReadToUserVisits: migrating =========================

-- add_column(:user_visits, :posts_read, :integer, {:default=>0})

-> 0.0024s

-- execute("UPDATE user_visits SET posts_read = 1")

-> 0.0003s

== 20140124202427 AddPostsReadToUserVisits: migrated (0.0043s) ================

== 20140129164541 RemoveCategoryHotness: migrating ============================

-- remove_column(:categories, :hotness)

-> 0.0004s

== 20140129164541 RemoveCategoryHotness: migrated (0.0023s) ===================

== 20140206044818 AddLocaleToUser: migrating ==================================

-- add_column(:users, :locale, :string, {:limit=>10})

-> 0.0007s

== 20140206044818 AddLocaleToUser: migrated (0.0026s) =========================

== 20140206195001 AddDefaultsToCategoryPostsAndTopicsFields: migrating ========

-- change_column_default(:categories, :posts_week, 0)

-> 0.0025s

-- change_column_default(:categories, :posts_month, 0)

-> 0.0025s

-- change_column_default(:categories, :posts_year, 0)

-> 0.0030s

-- change_column_default(:categories, :topics_week, 0)

-> 0.0026s

-- change_column_default(:categories, :topics_month, 0)

-> 0.0024s

-- change_column_default(:categories, :topics_year, 0)

-> 0.0021s

== 20140206195001 AddDefaultsToCategoryPostsAndTopicsFields: migrated (0.0169s)

== 20140206215029 AddMailingListModeToUsers: migrating ========================

-- rename_column(:users, :watch_new_topics, :mailing_list_mode)

-> 0.0041s

== 20140206215029 AddMailingListModeToUsers: migrated (0.0065s) ===============

== 20140210194146 AddPrimaryGroupIdToUsers: migrating =========================

-- add_column(:users, :primary_group_id, :integer, {:null=>true})

-> 0.0006s

== 20140210194146 AddPrimaryGroupIdToUsers: migrated (0.0027s) ================

== 20140211230222 MoveCasSettings: migrating ==================================

-- drop_table(:cas_user_infos)

-> 0.0012s

== 20140211230222 MoveCasSettings: migrated (0.0078s) =========================

== 20140211234523 AddTargetsTopicToPostActions: migrating =====================

-- add_column(:post_actions, :targets_topic, :boolean, {:default=>false})

-> 0.0056s

== 20140211234523 AddTargetsTopicToPostActions: migrated (0.0069s) ============

== 20140214151255 AddSkippedToEmailLogs: migrating ============================

-- add_column(:email_logs, :skipped, :boolean, {:default=>:false})

-> 0.0066s

-- add_column(:email_logs, :skipped_reason, :string)

-> 0.0006s

-- add_index(:email_logs, [:skipped, :created_at])

-> 0.0034s

== 20140214151255 AddSkippedToEmailLogs: migrated (0.0147s) ===================

== 20140220160510 RenameSiteSettings: migrating ===============================

-- execute("UPDATE site_settings SET name = 'allow_restore' WHERE name = 'allow_import'")

-> 0.0003s

-- execute("UPDATE site_settings SET name = 'topics_per_period_in_top_summary' WHERE name = 'topics_per_period_in_summary'")

-> 0.0002s

== 20140220160510 RenameSiteSettings: migrated (0.0018s) ======================

== 20140220163213 RenameDeleteUserMaxAge: migrating ===========================

-- execute("UPDATE site_settings SET name = 'delete_user_max_post_age' WHERE name = 'delete_user_max_age'")

-> 0.0002s

== 20140220163213 RenameDeleteUserMaxAge: migrated (0.0015s) ==================

== 20140224232712 AddProfileBackgroundToUser: migrating =======================

-- add_column(:users, :profile_background, :string, {:limit=>255})

-> 0.0005s

== 20140224232712 AddProfileBackgroundToUser: migrated (0.0018s) ==============

== 20140224232913 AddSingleSignOnRecords: migrating ===========================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:single_sign_on_records, {:id=>:integer})

-> 0.0056s

-- add_index(:single_sign_on_records, :external_id, {:unique=>true})

-> 0.0073s

== 20140224232913 AddSingleSignOnRecords: migrated (0.0143s) ==================

== 20140227104930 AddCustomEmailInToCategories: migrating =====================

-- add_column(:categories, :email_in, :string, {:null=>true})

-> 0.0010s

-- add_column(:categories, :email_in_allow_strangers, :boolean, {:default=>false})

-> 0.0073s

-- add_index(:categories, :email_in, {:unique=>true})

-> 0.0025s

== 20140227104930 AddCustomEmailInToCategories: migrated (0.0123s) ============

== 20140227201005 AddStaffCategory: migrating =================================

-- execute("INSERT INTO site_settings(name, data_type, value, created_at, updated_at)n VALUES ('staff_category_id', 3, 4, now(), now())")

-> 0.0003s

== 20140227201005 AddStaffCategory: migrated (0.0036s) ========================

== 20140228005443 AddExternalUsernameToSingleSignOnRecord: migrating ==========

-- add_column(:single_sign_on_records, :external_username, :string)

-> 0.0008s

== 20140228005443 AddExternalUsernameToSingleSignOnRecord: migrated (0.0024s) =

== 20140228173431 AddExternalEmailAndExternalNameToSingleSignOnRecord: migrating

-- add_column(:single_sign_on_records, :external_email, :string)

-> 0.0004s

-- add_column(:single_sign_on_records, :external_name, :string)

-> 0.0002s

== 20140228173431 AddExternalEmailAndExternalNameToSingleSignOnRecord: migrated (0.0021s)

== 20140228205743 AddAdminOnlyToUserHistories: migrating ======================

-- add_column(:user_histories, :admin_only, :boolean, {:default=>false})

-> 0.0087s

-- execute("UPDATE user_histories SET admin_only = true WHERE action = 3")

-> 0.0006s

== 20140228205743 AddAdminOnlyToUserHistories: migrated (0.0139s) =============

== 20140303185354 AddNewSinceToUserStats: migrating ===========================

-- add_column(:user_stats, :new_since, :datetime)

-> 0.0004s

-- execute("UPDATE user_stats AS usn SET new_since = u.created_atn FROM users AS un WHERE u.id = us.user_id")

-> 0.0007s

-- change_column(:user_stats, :new_since, :datetime, {:null=>false})

-> 0.0006s

== 20140303185354 AddNewSinceToUserStats: migrated (0.0069s) ==================

== 20140304200606 CreateBadgeTypes: migrating =================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:badge_types, {:id=>:integer})

-> 0.0032s

-- add_index(:badge_types, [:name], {:unique=>true})

-> 0.0020s

== 20140304200606 CreateBadgeTypes: migrated (0.0070s) ========================

== 20140304201403 CreateBadges: migrating =====================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:badges, {:id=>:integer})

-> 0.0056s

-- add_index(:badges, [:name], {:unique=>true})

-> 0.0024s

== 20140304201403 CreateBadges: migrated (0.0095s) ============================

== 20140305100909 CreateUserBadges: migrating =================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:user_badges, {:id=>:integer})

-> 0.0046s

-- add_index(:user_badges, [:badge_id, :user_id], {:unique=>true})

-> 0.0019s

== 20140305100909 CreateUserBadges: migrated (0.0078s) ========================

== 20140306223522 MoveTopicRevisionsToPostRevisions: migrating ================

-- execute("n INSERT INTO post_revisions(user_id, post_id, modifications, number, created_at, updated_at)n SELECT tr.user_id, p.id, tr.modifications, tr.number, tr.created_at, tr.updated_atn FROM topic_revisions trn JOIN topics t ON t.id = tr.topic_idn JOIN posts p ON p.topic_id = t.id AND p.post_number = 1nn")

-> 0.0011s

-- execute("n UPDATE post_revisions r SET number = 2 + (n SELECT COUNT(*) FROM post_revisions r2n WHERE r2.post_id = r.post_id AND r2.created_at < r.created_atn )nn")

-> 0.0005s

-- execute("n UPDATE posts p SET version = 1 + (n SELECT COUNT(*) FROM post_revisions rn WHERE r.post_id = p.idn )nn")

-> 0.0003s

-- execute("n DROP TABLE topic_revisionsnn")

-> 0.0008s

== 20140306223522 MoveTopicRevisionsToPostRevisions: migrated (0.0043s) =======

== 20140318150412 AddExcerptToTopics: migrating ===============================

-- add_column(:topics, :excerpt, :string, {:limit=>1000})

-> 0.0004s

-- execute("SELECT id FROM topics WHERE pinned_at IS NOT NULL")

-> 0.0003s

== 20140318150412 AddExcerptToTopics: migrated (0.0020s) ======================

== 20140318203559 AddCreatedAtIndexToPosts: migrating =========================

-- execute("CREATE INDEX idx_posts_created_at_topic_id ON posts(created_at, topic_id) WHERE deleted_at IS NULL")

-> 0.0010s

-- add_column(:categories, :topics_day, :integer, {:default=>0})

-> 0.0057s

-- add_column(:categories, :posts_day, :integer, {:default=>0})

-> 0.0087s

-- execute("DROP INDEX index_topics_on_deleted_at_and_visible_and_archetype_and_id")

-> 0.0004s

-- add_index(:topics, [:deleted_at, :visible, :archetype, :category_id, :id], {:name=>"idx_topics_front_page"})

-> 0.0027s

== 20140318203559 AddCreatedAtIndexToPosts: migrated (0.0200s) ================

== 20140320042653 FacebookUserInfosUsernameCanBeNil: migrating ================

-- change_column("facebook_user_infos", :username, :string, {:null=>true})

-> 0.0006s

== 20140320042653 FacebookUserInfosUsernameCanBeNil: migrated (0.0056s) =======

== 20140402201432 MakeContentSha1Nullable: migrating ==========================

-- change_column(:topic_embeds, :content_sha1, :string, {:limit=>40, :null=>true})

-> 0.0008s

== 20140402201432 MakeContentSha1Nullable: migrated (0.0026s) =================

== 20140404143501 AddTitleToTopicLinks: migrating =============================

-- add_column(:topic_links, :title, :string)

-> 0.0005s

-- add_column(:topic_links, :crawled_at, :datetime)

-> 0.0003s

== 20140404143501 AddTitleToTopicLinks: migrated (0.0029s) ====================

== 20140407055830 AddPinnedGloballyToTopics: migrating ========================

-- add_column(:topics, :pinned_globally, :boolean, {:null=>false, :default=>false})

-> 0.0073s

-- execute("UPDATE topics set pinned_globally = 't' where category_id = (n SELECT value::int FROM site_settings WHERE name = 'uncategorized_category_id') AND pinned_at IS NOT NULLn ")

-> 0.0006s

== 20140407055830 AddPinnedGloballyToTopics: migrated (0.0097s) ===============

== 20140407202158 SiteSettingCommaToPipe: migrating ===========================

-- execute(" UPDATE site_settingsn SET value = replace(value, ',', ' ')n WHERE name = 'white_listed_spam_host_domains'n ;n")

-> 0.0003s

-- execute(" UPDATE site_settingsn SET value = replace(value, ',', ' ')n WHERE name = 'exclude_rel_nofollow_domains'n ;n")

-> 0.0002s

== 20140407202158 SiteSettingCommaToPipe: migrated (0.0026s) ==================

== 20140408061512 AddWikiToPosts: migrating ===================================

-- add_column(:posts, :wiki, :boolean, {:default=>false, :null=>false})

-> 0.0084s

== 20140408061512 AddWikiToPosts: migrated (0.0108s) ==========================

== 20140408152401 AddDefaultValueToTopTopicScores: migrating ==================

-- change_column_default(:top_topics, :daily_score, 0)

-> 0.0060s

-- change_column_default(:top_topics, :weekly_score, 0)

-> 0.0021s

-- change_column_default(:top_topics, :monthly_score, 0)

-> 0.0019s

-- change_column_default(:top_topics, :yearly_score, 0)

-> 0.0020s

== 20140408152401 AddDefaultValueToTopTopicScores: migrated (0.0144s) =========

== 20140415054717 AllowLongerUsernames: migrating =============================

-- change_column(:users, :username, :string, {:limit=>60})

-> 0.0009s

-- change_column(:users, :username_lower, :string, {:limit=>60})

-> 0.0008s

== 20140415054717 AllowLongerUsernames: migrated (0.0039s) ====================

== 20140416202746 CreateColorSchemes: migrating ===============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:color_schemes, {:id=>:integer})

-> 0.0038s

== 20140416202746 CreateColorSchemes: migrated (0.0055s) ======================

== 20140416202801 CreateColorSchemeColors: migrating ==========================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:color_scheme_colors, {:id=>:integer})

-> 0.0042s

-- add_index(:color_scheme_colors, [:color_scheme_id])

-> 0.0024s

== 20140416202801 CreateColorSchemeColors: migrated (0.0083s) =================

== 20140416235757 RemoveColorHexcodeFromBadgeTypes: migrating =================

-- remove_column(:badge_types, :color_hexcode, :string)

-> 0.0004s

== 20140416235757 RemoveColorHexcodeFromBadgeTypes: migrated (0.0053s) ========

== 20140421235646 AddUserCustomFields: migrating ==============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:user_custom_fields, {:id=>:integer})

-> 0.0043s

-- add_index(:user_custom_fields, [:user_id, :name])

-> 0.0031s

== 20140421235646 AddUserCustomFields: migrated (0.0095s) =====================

== 20140422195623 AddVisibileToGroups: migrating ==============================

-- add_column(:groups, :visible, :boolean, {:default=>true, :null=>false})

-> 0.0050s

== 20140422195623 AddVisibileToGroups: migrated (0.0076s) =====================

== 20140425125742 AddCustomFields: migrating ==================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:category_custom_fields, {:id=>:integer})

-> 0.0042s

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:group_custom_fields, {:id=>:integer})

-> 0.0035s

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:post_custom_fields, {:id=>:integer})

-> 0.0031s

-- add_index(:category_custom_fields, [:category_id, :name])

-> 0.0021s

-- add_index(:group_custom_fields, [:group_id, :name])

-> 0.0021s

-- add_index(:post_custom_fields, [:post_id, :name])

-> 0.0028s

== 20140425125742 AddCustomFields: migrated (0.0196s) =========================

== 20140425135354 AddTopicCustomFields: migrating =============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:topic_custom_fields, {:id=>:integer})

-> 0.0037s

-- add_index(:topic_custom_fields, [:topic_id, :name])

-> 0.0023s

-- execute(" INSERT INTO topic_custom_fields(topic_id, name, value)n SELECT id, (each(meta_data)).key, (each(meta_data)).valuen FROM topics WHERE meta_data <> ''n")

-> 0.0007s

-- remove_column(:topics, :meta_data)

-> 0.0003s

== 20140425135354 AddTopicCustomFields: migrated (0.0093s) ====================

== 20140425172618 AddTitleableToBadges: migrating =============================

-- add_column(:badges, :allow_title, :boolean, {:null=>false, :default=>false})

-> 0.0042s

== 20140425172618 AddTitleableToBadges: migrated (0.0055s) ====================

== 20140429175951 AddRegistrationIpAddressToUsers: migrating ==================

-- add_column(:users, :registration_ip_address, :inet)

-> 0.0005s

== 20140429175951 AddRegistrationIpAddressToUsers: migrated (0.0018s) =========

== 20140504174212 IncrementReservedTrustLevelBadgeIds: migrating ==============

-- execute("ALTER SEQUENCE badges_id_seq START WITH 100")

-> 0.0004s

== 20140504174212 IncrementReservedTrustLevelBadgeIds: migrated (0.0141s) =====

== 20140505145918 AddLastRedirectedToTopAtToUsers: migrating ==================

-- add_column(:users, :last_redirected_to_top_at, :datetime)

-> 0.0006s

== 20140505145918 AddLastRedirectedToTopAtToUsers: migrated (0.0096s) =========

== 20140506200235 RemoveSeedColorScheme: migrating ============================

-- execute("DELETE FROM color_schemes WHERE id = 1")

-> 0.0004s

-- execute("DELETE FROM color_scheme_colors WHERE color_scheme_id = 1")

-> 0.0003s

== 20140506200235 RemoveSeedColorScheme: migrated (0.0026s) ===================

== 20140507173327 RemoveOpacityFromColorSchemeColors: migrating ===============

-- remove_column(:color_scheme_colors, :opacity)

-> 0.0004s

== 20140507173327 RemoveOpacityFromColorSchemeColors: migrated (0.0014s) ======

== 20140508053815 AddInvitedGroups: migrating =================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:invited_groups, {:id=>:integer})

-> 0.0023s

== 20140508053815 AddInvitedGroups: migrated (0.0044s) ========================

== 20140515220111 InitFixedCategoryPositionsValue: migrating ==================

== 20140515220111 InitFixedCategoryPositionsValue: migrated (0.0033s) =========

== 20140520062826 AddMultipleAwardToBadges: migrating =========================

-- add_column(:badges, :multiple_grant, :boolean, {:default=>false, :null=>false})

-> 0.0041s

-- index_name(:user_badges, {:column=>[:badge_id, :user_id]})

-> 0.0000s

-- index_name_exists?(:user_badges, "index_user_badges_on_badge_id_and_user_id")

-> 0.0009s

-- remove_index(:user_badges, {:column=>[:badge_id, :user_id], :name=>"index_user_badges_on_badge_id_and_user_id"})

-> 0.0027s

-- add_index(:user_badges, [:badge_id, :user_id])

-> 0.0146s

== 20140520062826 AddMultipleAwardToBadges: migrated (0.0239s) ================

== 20140520063859 RemoveHasCustomAvatarFromUserStats: migrating ===============

-- remove_column(:user_stats, :has_custom_avatar)

-> 0.0005s

== 20140520063859 RemoveHasCustomAvatarFromUserStats: migrated (0.0016s) ======

== 20140521192142 CreateGoogleUserInfos: migrating ============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:google_user_infos, {:id=>:integer})

-> 0.0137s

-- add_index(:google_user_infos, :user_id, {:unique=>true})

-> 0.0021s

-- add_index(:google_user_infos, :google_user_id, {:unique=>true})

-> 0.0018s

== 20140521192142 CreateGoogleUserInfos: migrated (0.0193s) ===================

== 20140521220115 GoogleOpenidDefaultHasChanged: migrating ====================

== 20140521220115 GoogleOpenidDefaultHasChanged: migrated (0.0019s) ===========

== 20140522003151 AddUserAvatars: migrating ===================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:user_avatars, {:id=>:integer})

-> 0.0023s

-- add_index(:user_avatars, [:user_id])

-> 0.0019s

-- execute(" INSERT INTO user_avatars(user_id, custom_upload_id)n SELECT id, uploaded_avatar_idn FROM usersn")

-> 0.0003s

-- execute(" UPDATE users SET uploaded_avatar_id = NULLn WHERE NOT use_uploaded_avatarn")

-> 0.0003s

== 20140522003151 AddUserAvatars: migrated (0.0063s) ==========================

== 20140525233953 RemoveUploadedAvatarTemplateFromUsers: migrating ============

-- remove_column(:users, :uploaded_avatar_template)

-> 0.0004s

== 20140525233953 RemoveUploadedAvatarTemplateFromUsers: migrated (0.0015s) ===

== 20140526185749 ChangeCategoryUniqunessContstraint: migrating ===============

-- index_name(:categories, {:name=>"index_categories_on_name"})

-> 0.0000s

-- index_name_exists?(:categories, "index_categories_on_name")

-> 0.0018s

-- remove_index(:categories, {:name=>"index_categories_on_name"})

-> 0.0006s

-- add_index(:categories, [:parent_category_id, :name], {:unique=>true})

-> 0.0030s

== 20140526185749 ChangeCategoryUniqunessContstraint: migrated (0.0077s) ======

== 20140526201939 AddDisableJumpReplyToUsers: migrating =======================

-- add_column(:users, :disable_jump_reply, :boolean, {:default=>false, :null=>false})

-> 0.0075s

== 20140526201939 AddDisableJumpReplyToUsers: migrated (0.0088s) ==============

== 20140527163207 CreateUserProfiles: migrating ===============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:user_profiles, {:id=>false})

-> 0.0032s

-- execute("ALTER TABLE user_profiles ADD PRIMARY KEY (user_id)")

-> 0.0012s

-- execute("INSERT INTO user_profiles (user_id) SELECT id FROM users")

-> 0.0007s

== 20140527163207 CreateUserProfiles: migrated (0.0067s) ======================

== 20140527233225 AddSystemSavatarVersionToUserAvatars: migrating =============

-- add_column(:user_avatars, :system_avatar_version, :integer, {:default=>0})

-> 0.0028s

== 20140527233225 AddSystemSavatarVersionToUserAvatars: migrated (0.0045s) ====

== 20140528015354 AddBakedAtToPosts: migrating ================================

-- add_column(:posts, :baked_at, :datetime)

-> 0.0005s

== 20140528015354 AddBakedAtToPosts: migrated (0.0078s) =======================

== 20140529045508 RemoveUseUploadedAvatarFromUser: migrating ==================

-- remove_column(:users, :use_uploaded_avatar)

-> 0.0005s

== 20140529045508 RemoveUseUploadedAvatarFromUser: migrated (0.0017s) =========

== 20140530002535 RemoveSystemAvatarsFromUserAvatars: migrating ===============

-- execute("UPDATE users SET uploaded_avatar_id = NULL WHERE uploaded_avatar_id IN (n SELECT system_upload_id FROM user_avatarsn )")

-> 0.0007s

-- remove_column(:user_avatars, :system_upload_id)

-> 0.0004s

-- remove_column(:user_avatars, :system_avatar_version)

-> 0.0003s

== 20140530002535 RemoveSystemAvatarsFromUserAvatars: migrated (0.0162s) ======

== 20140530043913 AddBakedVersionToPost: migrating ============================

-- add_column(:posts, :baked_version, :integer)

-> 0.0005s

== 20140530043913 AddBakedVersionToPost: migrated (0.0017s) ===================

== 20140604145431 DisableExternalAuthsByDefault: migrating ====================

== 20140604145431 DisableExternalAuthsByDefault: migrated (0.0016s) ===========

== 20140607035234 AddWebsiteToUserProfiles: migrating =========================

-- add_column(:user_profiles, :website, :string)

-> 0.0004s

-- execute("UPDATE user_profiles SET website = (SELECT website FROM users where user_profiles.user_id = users.id)")

-> 0.0005s

-- remove_column(:users, :website)

-> 0.0004s

== 20140607035234 AddWebsiteToUserProfiles: migrated (0.0060s) ================

== 20140610012414 AddPostIdToUserBadges: migrating ============================

-- add_column(:user_badges, :post_id, :integer)

-> 0.0005s

== 20140610012414 AddPostIdToUserBadges: migrated (0.0059s) ===================

== 20140610012833 AddIconToBadges: migrating ==================================

-- add_column(:badges, :icon, :string, {:default=>"fa-certificate"})

-> 0.0107s

== 20140610012833 AddIconToBadges: migrated (0.0121s) =========================

== 20140610034314 MoveBioToUserProfiles: migrating ============================

-- add_column(:user_profiles, :bio_raw, :text)

-> 0.0004s

-- add_column(:user_profiles, :bio_cooked, :text)

-> 0.0002s

-- execute("UPDATE user_profiles SET bio_raw = subquery.bio_raw, bio_cooked = subquery.bio_cooked FROM (n SELECT bio_raw, bio_cooked, id FROM usersn ) as subquery WHERE user_profiles.user_id = subquery.id")

-> 0.0006s

-- remove_column(:users, :bio_raw)

-> 0.0003s

-- remove_column(:users, :bio_cooked)

-> 0.0003s

== 20140610034314 MoveBioToUserProfiles: migrated (0.0031s) ===================

== 20140612010718 MoveProfileBackgroundToUserProfiles: migrating ==============

-- add_column(:user_profiles, :profile_background, :string, {:limit=>255})

-> 0.0005s

-- execute("UPDATE user_profiles SET profile_background = (SELECT profile_background FROM users WHERE user_profiles.user_id = users.id)")

-> 0.0005s

-- remove_column(:users, :profile_background)

-> 0.0004s

== 20140612010718 MoveProfileBackgroundToUserProfiles: migrated (0.0027s) =====

== 20140617053829 AddNotificationIdToUserBadge: migrating =====================

-- add_column(:user_badges, :notification_id, :integer)

-> 0.0004s

== 20140617053829 AddNotificationIdToUserBadge: migrated (0.0019s) ============

== 20140617080955 RenameRegisteredUsers: migrating ============================

-- execute("update groups set name = 'trust_level_0' where name = 'registered_users' and id = 10")

-> 0.0005s

== 20140617080955 RenameRegisteredUsers: migrated (0.0017s) ===================

== 20140617193351 AddPostIdIndexOnTopicLinks: migrating =======================

-- add_index(:topic_links, :post_id)

-> 0.0057s

== 20140617193351 AddPostIdIndexOnTopicLinks: migrated (0.0074s) ==============

== 20140618001820 DontAutoMutoTopics: migrating ===============================

-- execute("DELETE FROM topic_users WHERE notification_level = 0 and notifications_reason_id =7 AND first_visited_at IS NULL")

-> 0.0005s

-- execute("UPDATE topic_users SET notification_level = 1,n notifications_reason_id = NULLn WHERE notification_level = 0 AND notifications_reason_id =7")

-> 0.0002s

== 20140618001820 DontAutoMutoTopics: migrated (0.0041s) ======================

== 20140618163511 AddDismissedBannerKeyToUserProfile: migrating ===============

-- add_column(:user_profiles, :dismissed_banner_key, :integer, {:nullable=>true})

-> 0.0004s

== 20140618163511 AddDismissedBannerKeyToUserProfile: migrated (0.0017s) ======

== 20140620184031 AddHiddenAtToPosts: migrating ===============================

-- add_column(:posts, :hidden_at, :timestamp)

-> 0.0005s

== 20140620184031 AddHiddenAtToPosts: migrated (0.0022s) ======================

== 20140623195618 FixCategoriesConstraint: migrating ==========================

-- index_name(:categories, {:name=>"index_categories_on_parent_category_id_and_name"})

-> 0.0000s

-- index_name_exists?(:categories, "index_categories_on_parent_category_id_and_name")

-> 0.0009s

-- remove_index(:categories, {:name=>"index_categories_on_parent_category_id_and_name"})

-> 0.0004s

-- execute("DELETE FROM categories WHERE id IN (SELECT id FROM (SELECT id, row_number() over (partition BY parent_category_id, name ORDER BY id) AS rnum FROM categories) t WHERE t.rnum > 1)")

-> 0.0006s

-- execute("CREATE UNIQUE INDEX unique_index_categories_on_name ON categories (COALESCE(parent_category_id, -1), name)")

-> 0.0031s

== 20140623195618 FixCategoriesConstraint: migrated (0.0073s) =================

== 20140624044600 AddRawDataToSearch: migrating ===============================

-- add_column(:post_search_data, :raw_data, :text)

-> 0.0004s

-- add_column(:user_search_data, :raw_data, :text)

-> 0.0003s

-- add_column(:category_search_data, :raw_data, :text)

-> 0.0003s

-- add_column(:post_search_data, :locale, :string)

-> 0.0003s

-- add_column(:user_search_data, :locale, :text)

-> 0.0003s

-- add_column(:category_search_data, :locale, :text)

-> 0.0002s

== 20140624044600 AddRawDataToSearch: migrated (0.0040s) ======================

== 20140627193814 AddImagesToCategories: migrating ============================

-- add_column(:categories, :logo_url, :string)

-> 0.0005s

-- add_column(:categories, :background_url, :string)

-> 0.0003s

== 20140627193814 AddImagesToCategories: migrated (0.0022s) ===================

== 20140703022838 AddFieldsToBadges: migrating ================================

-- add_column(:badges, :listable, :boolean, {:default=>true})

-> 0.0043s

-- add_column(:badges, :target_posts, :boolean, {:default=>false})

-> 0.0046s

-- add_column(:badges, :query, :text)

-> 0.0005s

== 20140703022838 AddFieldsToBadges: migrated (0.0112s) =======================

== 20140705081453 IndexUserBadges: migrating ==================================

-- execute("DELETE FROM user_badges USING user_badges ub2n WHERE user_badges.badge_id = ub2.badge_id ANDn user_badges.user_id = ub2.user_id ANDn user_badges.post_id IS NOT NULL ANDn user_badges.id < ub2.idn ")

-> 0.0006s

-- add_index(:user_badges, [:badge_id, :user_id, :post_id], {:unique=>true, :where=>"post_id IS NOT NULL"})

-> 0.0035s

== 20140705081453 IndexUserBadges: migrated (0.0082s) =========================

== 20140707071913 AddSelfEditsToPosts: migrating ==============================

-- add_column(:posts, :self_edits, :integer, {:null=>false, :default=>0})

-> 0.0066s

-- execute("n UPDATE posts p SET self_edits = (SELECT COUNT(*) FROM post_revisions pr WHERE pr.post_id = p.id AND pr.user_id=p.user_id)n ")

-> 0.0005s

== 20140707071913 AddSelfEditsToPosts: migrated (0.0090s) =====================

== 20140710005023 AddBadgePostsAndTopicsView: migrating =======================

-- add_column(:categories, :allow_badges, :boolean, {:default=>true, :null=>false})

-> 0.0096s

-- execute("CREATE VIEW badge_posts ASn SELECT p.*n FROM posts pn JOIN topics t ON t.id = p.topic_idn JOIN categories c ON c.id = t.category_idn WHERE c.allow_badges ANDn p.deleted_at IS NULL ANDn t.deleted_at IS NULL ANDn t.visible")

-> 0.0081s

== 20140710005023 AddBadgePostsAndTopicsView: migrated (0.0266s) ==============

== 20140710224658 AddIsQuoteToTopicLinks: migrating ===========================

-- add_column(:topic_links, :quote, :boolean, {:default=>false, :null=>false})

-> 0.0058s

-- execute("n UPDATE topic_linksn SET quote = truen WHERE id IN (n SELECT l.idn FROM topic_links ln JOIN posts p ON p.id = l.post_idn JOIN posts lp ON l.link_post_id = lp.idn WHERE p.raw LIKE '%[quote=%post:' n lp.post_number::varchar ',%topic:' n lp.topic_id::varchar '%]%[/quote]%'n )")

-> 0.0013s

== 20140710224658 AddIsQuoteToTopicLinks: migrated (0.0090s) ==================

== 20140711063215 AddReadFaqToUserStats: migrating ============================

-- add_column(:user_stats, :read_faq, :datetime)

-> 0.0005s

== 20140711063215 AddReadFaqToUserStats: migrated (0.0019s) ===================

== 20140711143146 RemoveNotNullFromEmail: migrating ===========================

-- execute("ALTER TABLE invites ALTER COLUMN email DROP NOT NULL")

-> 0.0003s

== 20140711143146 RemoveNotNullFromEmail: migrated (0.0034s) ==================

== 20140711193923 RemoveEmailInAddressSetting: migrating ======================

== 20140711193923 RemoveEmailInAddressSetting: migrated (0.0026s) =============

== 20140711233329 BadgesOnlyOnPublicCategories: migrating =====================

-- execute("DROP VIEW badge_posts")

-> 0.0011s

-- execute("CREATE VIEW badge_posts ASn SELECT p.*n FROM posts pn JOIN topics t ON t.id = p.topic_idn JOIN categories c ON c.id = t.category_idn WHERE c.allow_badges ANDn p.deleted_at IS NULL ANDn t.deleted_at IS NULL ANDn NOT c.read_restricted ANDn t.visible")

-> 0.0038s

== 20140711233329 BadgesOnlyOnPublicCategories: migrated (0.0104s) ============

== 20140714060646 AddEnabledToBadges: migrating ===============================

-- add_column(:badges, :enabled, :boolean, {:default=>true, :null=>false})

-> 0.0037s

== 20140714060646 AddEnabledToBadges: migrated (0.0063s) ======================

== 20140715013018 CorrectPostNumberIndex: migrating ===========================

-- execute(" UPDATE posts SET post_number = post_number + 1n WHERE id IN (n SELECT p1.idn FROM posts p1n JOINn (n SELECT post_number, topic_id, min(id) min_idn FROM postsn GROUP BY post_number, topic_idn HAVING COUNT(*) > 1n ) pp ON p1.topic_id = pp.topic_id ANDn p1.post_number >= pp.post_number ANDn p1.id <> pp.min_idn )n")

-> 0.0009s

-- index_name(:posts, {:column=>[:topic_id, :post_number]})

-> 0.0000s

-- index_name_exists?(:posts, "index_posts_on_topic_id_and_post_number")

-> 0.0009s

-- remove_index(:posts, {:column=>[:topic_id, :post_number], :name=>"index_posts_on_topic_id_and_post_number"})

-> 0.0034s

-- add_index(:posts, [:topic_id, :post_number], {:unique=>true})

-> 0.0030s

== 20140715013018 CorrectPostNumberIndex: migrated (0.0100s) ==================

== 20140715051412 AddAutoRevokeToBadges: migrating ============================

-- add_column(:badges, :auto_revoke, :boolean, {:default=>true, :null=>false})

-> 0.0047s

== 20140715051412 AddAutoRevokeToBadges: migrated (0.0069s) ===================

== 20140715055242 AddQuotedPosts: migrating ===================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:quoted_posts, {:id=>:integer})

-> 0.0025s

-- add_index(:quoted_posts, [:post_id, :quoted_post_id], {:unique=>true})

-> 0.0040s

-- add_index(:quoted_posts, [:quoted_post_id, :post_id], {:unique=>true})

-> 0.0022s

-- execute(" SELECT id, cookedn FROM postsn WHERE raw like '%quote=%' AND id > 0n ORDER BY idn LIMIT 1000n")

-> 0.0005s

== 20140715055242 AddQuotedPosts: migrated (0.0109s) ==========================

== 20140715160720 UpdateUsersCaseInsensitiveEmails: migrating =================

-- execute("DROP INDEX index_users_on_email")

-> 0.0004s

-- execute(" SELECT id, email, countn FROM (SELECT id, email,n row_number() OVER(PARTITION BY lower(email) ORDER BY id asc) AS countn FROM users) dupsn WHERE dups.count > 1n")

-> 0.0005s

-- execute("UPDATE users SET email = lower(email)")

-> 0.0003s

-- execute("CREATE UNIQUE INDEX index_users_on_email ON users ((lower(email)));")

-> 0.0010s

== 20140715160720 UpdateUsersCaseInsensitiveEmails: migrated (0.0038s) ========

== 20140715190552 RemoveUncategorizedParents: migrating =======================

-- execute("SELECT value FROM site_settings WHERE name = 'uncategorized_category_id'")

-> 0.0003s

-- execute("UPDATE categories SET parent_category_id = NULL where id = 1")

-> 0.0005s

== 20140715190552 RemoveUncategorizedParents: migrated (0.0026s) ==============

== 20140716063802 AddBadgeGroupings: migrating ================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:badge_groupings, {:id=>:integer})

-> 0.0037s

-- add_column(:badges, :badge_grouping_id, :integer)

-> 0.0005s

== 20140716063802 AddBadgeGroupings: migrated (0.0107s) =======================

== 20140717024528 DescriptionOptionalInBadgeGrouping: migrating ===============

-- change_column(:badge_groupings, :description, :text, {:null=>true})

-> 0.0014s

== 20140717024528 DescriptionOptionalInBadgeGrouping: migrated (0.0029s) ======

== 20140718041445 SetDefaultBadgeGrouping: migrating ==========================

-- execute("UPDATE badges SET badge_grouping_id = 5 WHERE badge_grouping_id IS NULL")

-> 0.0005s

-- change_column(:badges, :badge_grouping_id, :integer, {:null=>false, :default=>5})

-> 0.0044s

== 20140718041445 SetDefaultBadgeGrouping: migrated (0.0074s) =================

== 20140721063820 AddTriggerToBadges: migrating ===============================

-- add_column(:badges, :trigger, :integer)

-> 0.0005s

== 20140721063820 AddTriggerToBadges: migrated (0.0035s) ======================

== 20140721161249 AddAgreedAtAndAgreedByIdToPostAction: migrating =============

-- add_column(:post_actions, :agreed_at, :datetime)

-> 0.0004s

-- add_column(:post_actions, :agreed_by_id, :integer)

-> 0.0002s

== 20140721161249 AddAgreedAtAndAgreedByIdToPostAction: migrated (0.0019s) ====

== 20140721162307 RenameDeferColumnsOnPostAction: migrating ===================

-- rename_column(:post_actions, :defer_by, :defered_by_id)

-> 0.0025s

-- add_column(:post_actions, :defered_at, :datetime)

-> 0.0007s

-- execute("UPDATE post_actions SET defered_at = updated_at WHERE defer = 't'")

-> 0.0006s

-- remove_column(:post_actions, :defer)

-> 0.0003s

== 20140721162307 RenameDeferColumnsOnPostAction: migrated (0.0054s) ==========

== 20140723011456 AddShowPostsToBadges: migrating =============================

-- add_column(:badges, :show_posts, :boolean, {:null=>false, :default=>false})

-> 0.0040s

== 20140723011456 AddShowPostsToBadges: migrated (0.0058s) ====================

== 20140725050636 RemoveInvalidIncomingLinks: migrating =======================

-- execute("DELETE FROM incoming_links WHERE url ILIKE '%avatar%.png'")

-> 0.0005s

== 20140725050636 RemoveInvalidIncomingLinks: migrated (0.0037s) ==============

== 20140725172830 RemoveMessageFromPostAction: migrating ======================

-- remove_column(:post_actions, :message)

-> 0.0004s

== 20140725172830 RemoveMessageFromPostAction: migrated (0.0027s) =============

== 20140727030954 AddEditHistoryPublicToUsers: migrating ======================

-- add_column(:users, :edit_history_public, :boolean, {:default=>false, :null=>false})

-> 0.0082s

== 20140727030954 AddEditHistoryPublicToUsers: migrated (0.0113s) =============

== 20140728120708 FixIndexOnPostAction: migrating =============================

-- index_name("post_actions", {:name=>"idx_unique_actions"})

-> 0.0000s

-- index_name_exists?("post_actions", "idx_unique_actions")

-> 0.0009s

-- remove_index("post_actions", {:name=>"idx_unique_actions"})

-> 0.0004s

-- add_index("post_actions", ["user_id", "post_action_type_id", "post_id", "deleted_at", "targets_topic"], {:name=>"idx_unique_actions", :unique=>true})

-> 0.0040s

== 20140728120708 FixIndexOnPostAction: migrated (0.0073s) ====================

== 20140728144308 AddFirstPostCreatedAtToUserStat: migrating ==================

-- add_column(:user_stats, :first_post_created_at, :datetime)

-> 0.0005s

-- execute(" WITH first_posts AS (n SELECT p.id,n p.user_id,n p.created_at,n ROW_NUMBER() OVER (PARTITION BY p.user_id ORDER BY p.created_at ASC) AS rown FROM posts pn )n UPDATE user_stats usn SET first_post_created_at = fp.created_atn FROM first_posts fpn WHERE fp.row = 1n AND fp.user_id = us.user_idn")

-> 0.0013s

== 20140728144308 AddFirstPostCreatedAtToUserStat: migrated (0.0036s) =========

== 20140728152804 AddPostAndTopicCountsToUserStat: migrating ==================

-- add_column(:user_stats, :post_count, :integer, {:default=>0, :null=>false})

-> 0.0028s

-- add_column(:user_stats, :topic_count, :integer, {:default=>0, :null=>false})

-> 0.0032s

-- execute(" UPDATE user_statsn SET post_count = pc.countn FROM (SELECT user_id, COUNT(*) AS count FROM posts GROUP BY user_id) AS pcn WHERE pc.user_id = user_stats.user_idn")

-> 0.0006s

-- execute(" UPDATE user_statsn SET topic_count = tc.countn FROM (SELECT user_id, COUNT(*) AS count FROM topics GROUP BY user_id) AS tcn WHERE tc.user_id = user_stats.user_idn")

-> 0.0023s

== 20140728152804 AddPostAndTopicCountsToUserStat: migrated (0.0125s) =========

== 20140729092525 RemoveUniqueConstraintFromInvitesIndex: migrating ===========

-- index_name(:invites, {:column=>[:email, :invited_by_id]})

-> 0.0000s

-- index_name_exists?(:invites, "index_invites_on_email_and_invited_by_id")

-> 0.0018s

-- remove_index(:invites, {:column=>[:email, :invited_by_id], :name=>"index_invites_on_email_and_invited_by_id"})

-> 0.0039s

-- add_index(:invites, [:email, :invited_by_id], {:unique=>false})

-> 0.0038s

== 20140729092525 RemoveUniqueConstraintFromInvitesIndex: migrated (0.0111s) ==

== 20140730203029 AddDisagreedAtAndDisagreedByIdToPostAction: migrating =======

-- add_column(:post_actions, :disagreed_at, :datetime)

-> 0.0005s

-- add_column(:post_actions, :disagreed_by_id, :integer)

-> 0.0003s

-- execute(" UPDATE post_actionsn SET disagreed_at = deleted_at,n disagreed_by_id = deleted_by_id,n deleted_at = NULL,n deleted_by_id = NULLn WHERE deleted_by_id != user_idn")

-> 0.0004s

== 20140730203029 AddDisagreedAtAndDisagreedByIdToPostAction: migrated (0.0026s)

== 20140731011328 AddReplyQuotedToPosts: migrating ============================

-- add_column(:posts, :reply_quoted, :boolean, {:null=>false, :default=>false})

-> 0.0061s

-- execute("UPDATE posts pn SET reply_quoted = truen WHERE EXISTS(n SELECT 1 FROM quoted_posts qn JOIN posts p1 ON p1.post_number = p.reply_to_post_number AND p1.topic_id = p.topic_idn WHERE q.post_id = p.id AND q.quoted_post_id = p1.idn ) AND p.reply_to_post_number IS NOT NULL")

-> 0.0010s

== 20140731011328 AddReplyQuotedToPosts: migrated (0.0087s) ===================

== 20140801052028 FixIncomingLinks: migrating =================================

-- execute("DROP INDEX incoming_index")

-> 0.0004s

-- add_column(:incoming_links, :post_id, :integer)

-> 0.0004s

-- remove_column(:incoming_links, :updated_at)

-> 0.0005s

-- remove_column(:incoming_links, :url)

-> 0.0002s

-- execute("UPDATE incoming_links l SET post_id = (n SELECT p.id FROM posts p WHERE p.topic_id = l.topic_id AND p.post_number = l.post_numbern )")

-> 0.0007s

-- execute("DELETE FROM incoming_links WHERE post_id IS NULL")

-> 0.0002s

-- change_column(:incoming_links, :post_id, :integer, {:null=>false})

-> 0.0005s

-- add_index(:incoming_links, :post_id)

-> 0.0023s

== 20140801052028 FixIncomingLinks: migrated (0.0079s) ========================

== 20140801170444 CreatePostTimingsUserIndex: migrating =======================

-- add_index(:post_timings, :user_id)

-> 0.0019s

== 20140801170444 CreatePostTimingsUserIndex: migrated (0.0064s) ==============

== 20140804010803 IncomingLinkNormalization: migrating ========================

-- remove_column(:incoming_links, :post_number)

-> 0.0003s

-- remove_column(:incoming_links, :domain)

-> 0.0003s

-- add_column(:incoming_links, :incoming_referer_id, :integer)

-> 0.0003s

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:incoming_referers, {:id=>:integer})

-> 0.0031s

-- execute("INSERT INTO incoming_referers(url, https, domain, port, path)n SELECT referer,n CASE WHEN a[1] = 's' THEN true ELSE false END,n a[2] as domain,n CASE WHEN a[1] = 's' THENn COALESCE(a[4]::integer, 443)::integern ELSEn COALESCE(a[4]::integer, 80)::integern END,n COALESCE(a[5], '') pathn FROMn (n SELECT referer, regexp_matches(referer, 'http(s)?://([^/:]+)(:(d+))?(.*)') an FROMn (n SELECT DISTINCT referern FROM incoming_links WHERE referer ~ '^https?://.+'n ) Zn ) Xn WHERE a[2] IS NOT NULL")

-> 0.0007s

-- execute("UPDATE incoming_links ln SET incoming_referer_id = r.idn FROM incoming_referers rn WHERE r.url = l.referer")

-> 0.0003s

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:incoming_domains, {:id=>:integer})

-> 0.0028s

-- execute("INSERT INTO incoming_domains(name, port, https)n SELECT DISTINCT domain, port, httpsn FROM incoming_referers")

-> 0.0003s

-- execute("UPDATE incoming_referers ln SET incoming_domain_id = d.idn FROM incoming_domains dn WHERE d.name = l.domain AND d.https = l.https AND d.port = l.port")

-> 0.0004s

-- remove_column(:incoming_referers, :domain)

-> 0.0003s

-- remove_column(:incoming_referers, :port)

-> 0.0002s

-- remove_column(:incoming_referers, :https)

-> 0.0002s

-- change_column(:incoming_referers, :incoming_domain_id, :integer, {:null=>false})

-> 0.0006s

-- add_index(:incoming_referers, [:path, :incoming_domain_id], {:unique=>true})

-> 0.0021s

-- add_index(:incoming_domains, [:name, :https, :port], {:unique=>true})

-> 0.0023s

-- remove_column(:incoming_links, :referer)

-> 0.0003s

== 20140804010803 IncomingLinkNormalization: migrated (0.0184s) ===============

== 20140804030041 RemoveUrlFromIncomingReferer: migrating =====================

-- remove_column(:incoming_referers, :url)

-> 0.0004s

== 20140804030041 RemoveUrlFromIncomingReferer: migrated (0.0020s) ============

== 20140804060439 DropTopicIdFromIncomingLinks: migrating =====================

-- remove_column(:incoming_links, :topic_id)

-> 0.0007s

== 20140804060439 DropTopicIdFromIncomingLinks: migrated (0.0029s) ============

== 20140804072504 ViewsToTopicViews: migrating ================================

-- remove_column(:views, :parent_type)

-> 0.0005s

-- rename_column(:views, :parent_id, :topic_id)

-> 0.0015s

-- rename_table(:views, :topic_views)

-> 0.0048s

-- add_index(:topic_views, [:topic_id])

-> 0.0024s

-- add_index(:topic_views, [:user_id, :topic_id])

-> 0.0029s

== 20140804072504 ViewsToTopicViews: migrated (0.0144s) =======================

== 20140804075613 NormalizeTopicViewDataAndIndex: migrating ===================

-- index_name(:topic_views, {:column=>[:topic_id]})

-> 0.0000s

-- index_name_exists?(:topic_views, "index_topic_views_on_topic_id")

-> 0.0009s

-- remove_index(:topic_views, {:column=>[:topic_id], :name=>"index_topic_views_on_topic_id"})

-> 0.0027s

-- index_name(:topic_views, {:column=>[:user_id, :topic_id]})

-> 0.0000s

-- index_name_exists?(:topic_views, "index_topic_views_on_user_id_and_topic_id")

-> 0.0008s

-- remove_index(:topic_views, {:column=>[:user_id, :topic_id], :name=>"index_topic_views_on_user_id_and_topic_id"})

-> 0.0042s

-- execute("CREATE TEMPORARY TABLE tmp_views_user(user_id int, topic_id int, viewed_at date, ip_address inet)")

-> 0.0016s

-- execute("INSERT INTO tmp_views_user(user_id, topic_id, ip_address, viewed_at)n SELECT user_id, topic_id, min(ip_address::varchar)::inet, min(viewed_at)n FROM topic_viewsn WHERE user_id IS NOT NULLn GROUP BY user_id, topic_idn ")

-> 0.0012s

-- execute("CREATE TEMPORARY TABLE tmp_views_ip(topic_id int, viewed_at date, ip_address inet)")

-> 0.0020s

-- execute("INSERT INTO tmp_views_ip(topic_id, ip_address, viewed_at)n SELECT topic_id, ip_address, min(viewed_at)n FROM topic_viewsn WHERE user_id IS NULLn GROUP BY user_id, topic_id, ip_addressn ")

-> 0.0016s

-- execute("truncate table topic_views")

-> 0.0020s

-- execute("INSERT INTO topic_views(user_id, topic_id, ip_address, viewed_at)n SELECT user_id, topic_id, ip_address, viewed_at FROM tmp_views_usern UNION ALLn SELECT NULL, topic_id, ip_address, viewed_at FROM tmp_views_ipn ")

-> 0.0004s

-- execute("CREATE UNIQUE INDEX user_id_topic_id_topic_views ON topic_views(user_id, topic_id) WHERE user_id IS NOT NULL")

-> 0.0009s

-- execute("CREATE UNIQUE INDEX ip_address_topic_id_topic_views ON topic_views(ip_address, topic_id) WHERE user_id IS NULL")

-> 0.0007s

-- add_index(:topic_views, [:topic_id, :viewed_at])

-> 0.0019s

-- add_index(:topic_views, [:viewed_at, :topic_id])

-> 0.0019s

== 20140804075613 NormalizeTopicViewDataAndIndex: migrated (0.0256s) ==========

== 20140805061612 AddBioCookedVersionToUserProfile: migrating =================

-- add_column(:user_profiles, :bio_cooked_version, :integer)

-> 0.0004s

-- add_index(:user_profiles, [:bio_cooked_version])

-> 0.0031s

== 20140805061612 AddBioCookedVersionToUserProfile: migrated (0.0051s) ========

== 20140806003116 FixupBadgeIds: migrating ====================================

-- add_column(:badges, :system, :boolean, {:default=>false, :null=>false})

-> 0.0040s

== 20140806003116 FixupBadgeIds: migrated (0.0062s) ===========================

== 20140807033123 AddIndexOnLastSeenToUsers: migrating ========================

-- add_index(:users, [:last_seen_at])

-> 0.0026s

== 20140807033123 AddIndexOnLastSeenToUsers: migrated (0.0042s) ===============

== 20140808051823 CreateTopicSearchIndex: migrating ===========================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:topic_search_data, {:id=>false})

-> 0.0023s

-- execute("CREATE INDEX idx_search_topic ON topic_search_data USING gin (search_data)")

-> 0.0004s

== 20140808051823 CreateTopicSearchIndex: migrated (0.0043s) ==================

== 20140809224243 AddUserBadgeUniqueIndex: migrating ==========================

-- add_column(:user_badges, :seq, :integer, {:default=>0, :null=>false})

-> 0.0042s

-- execute("n UPDATE user_badges ub1 SET seq = X.seqn FROM (n SELECT ub.id, rank() OVER (PARTITION BY user_id ORDER BY granted_at) seqn FROM user_badges ubn JOIN badges b ON b.id = ub.badge_idn WHERE b.multiple_grantn ) Xn WHERE ub1.id = X.idn ")

-> 0.0012s

-- execute("n DELETE FROM user_badges ub1n WHERE ub1.id NOT IN (n SELECT MIN(ub.id)n FROM user_badges ubn GROUP BY ub.user_id, ub.badge_id, ub.seqn )n ")

-> 0.0005s

-- add_index(:user_badges, [:badge_id, :user_id, :seq], {:unique=>true, :where=>"post_id IS NULL"})

-> 0.0028s

== 20140809224243 AddUserBadgeUniqueIndex: migrated (0.0110s) =================

== 20140811094300 RenameDeferedColumnsOnPostAction: migrating =================

-- rename_column(:post_actions, :defered_by_id, :deferred_by_id)

-> 0.0032s

-- rename_column(:post_actions, :defered_at, :deferred_at)

-> 0.0028s

== 20140811094300 RenameDeferedColumnsOnPostAction: migrated (0.0076s) ========

== 20140813175357 AddDefaultToActive: migrating ===============================

-- change_column(:users, :active, :boolean, {:default=>false, :null=>false})

-> 0.0091s

== 20140813175357 AddDefaultToActive: migrated (0.0104s) ======================

== 20140815183851 FixIndexOnPostActions: migrating ============================

-- execute("UPDATE post_actions SET targets_topic = false WHERE targets_topic IS NULL")

-> 0.0003s

-- change_column(:post_actions, :targets_topic, :boolean, {:default=>false, :null=>false})

-> 0.0056s

-- execute("n DELETE FROM post_actions pan USING post_actions xn WHERE pa.user_id = x.user_id ANDn pa.post_action_type_id = x.post_action_type_id ANDn pa.post_id = x.post_id ANDn pa.targets_topic = x.targets_topic ANDn pa.id < x.id ANDn pa.deleted_at IS NULL ANDn x.deleted_at IS NULLn ")

-> 0.0005s

-- index_name("post_actions", {:name=>"idx_unique_actions"})

-> 0.0000s

-- index_name_exists?("post_actions", "idx_unique_actions")

-> 0.0007s

-- remove_index("post_actions", {:name=>"idx_unique_actions"})

-> 0.0003s

-- add_index("post_actions", ["user_id", "post_action_type_id", "post_id", "targets_topic"], {:name=>"idx_unique_actions", :unique=>true, :where=>"deleted_at IS NULL"})

-> 0.0023s

== 20140815183851 FixIndexOnPostActions: migrated (0.0113s) ===================

== 20140815191556 FixPostActionsIndexAgain: migrating =========================

-- index_name("post_actions", {:name=>"idx_unique_actions"})

-> 0.0000s

-- index_name_exists?("post_actions", "idx_unique_actions")

-> 0.0009s

-- remove_index("post_actions", {:name=>"idx_unique_actions"})

-> 0.0004s

-- add_index("post_actions", ["user_id", "post_action_type_id", "post_id", "targets_topic"], {:name=>"idx_unique_actions", :unique=>true, :where=>"deleted_at IS NULL AND disagreed_at IS NULL AND deferred_at IS NULL"})

-> 0.0022s

== 20140815191556 FixPostActionsIndexAgain: migrated (0.0051s) ================

== 20140815215618 AddNameLowerToCategories: migrating =========================

-- add_column(:categories, :name_lower, :string, {:limit=>50})

-> 0.0005s

-- execute("update categories set name_lower = lower(name)")

-> 0.0004s

-- change_column(:categories, :name_lower, :string, {:limit=>50, :null=>false})

-> 0.0006s

== 20140815215618 AddNameLowerToCategories: migrated (0.0042s) ================

== 20140817011612 AddExternalAvatarUrlToSingleSignOnRecord: migrating =========

-- add_column(:single_sign_on_records, :external_avatar_url, :string)

-> 0.0004s

== 20140817011612 AddExternalAvatarUrlToSingleSignOnRecord: migrated (0.0017s)

== 20140818023700 IndexEmailTokens: migrating =================================

-- add_index(:email_tokens, [:user_id])

-> 0.0021s

== 20140818023700 IndexEmailTokens: migrated (0.0068s) ========================

== 20140826234625 RenameSettingsPop3sToPop3: migrating ========================

-- execute("UPDATE site_settings SET name = replace(name, 'pop3s', 'pop3') WHERE name ILIKE 'pop3%'")

-> 0.0003s

== 20140826234625 RenameSettingsPop3sToPop3: migrated (0.0016s) ===============

== 20140827044811 RemoveNullableDates: migrating ==============================

-- execute("DROP VIEW badge_posts")

-> 0.0010s

-- execute("select table_name, column_name from information_schema.columnsn WHERE column_name IN ('created_at','updated_at') ANDn table_schema = 'public' ANDn is_nullable = 'YES' ANDn is_updatable = 'YES' ANDn data_type = 'timestamp without time zone'")

-> 0.0068s

-- execute("UPDATE "message_bus" SET created_at = CURRENT_TIMESTAMP WHERE created_at IS NULL")

-> 0.0005s

-- change_column(:message_bus, :created_at, :datetime, {:null=>false})

-> 0.0011s

-- execute("CREATE VIEW badge_posts ASn SELECT p.*n FROM posts pn JOIN topics t ON t.id = p.topic_idn JOIN categories c ON c.id = t.category_idn WHERE c.allow_badges ANDn p.deleted_at IS NULL ANDn t.deleted_at IS NULL ANDn NOT c.read_restricted ANDn t.visible")

-> 0.0037s

== 20140827044811 RemoveNullableDates: migrated (0.0152s) =====================

== 20140828172407 CreatePermalinks: migrating =================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:permalinks, {:id=>:integer})

-> 0.0039s

-- add_index(:permalinks, :url)

-> 0.0026s

== 20140828172407 CreatePermalinks: migrated (0.0081s) ========================

== 20140828200231 MakeUrlColBiggerInPermalinks: migrating =====================

-- index_name(:permalinks, {:column=>:url})

-> 0.0000s

-- index_name_exists?(:permalinks, "index_permalinks_on_url")

-> 0.0008s

-- remove_index(:permalinks, {:column=>:url, :name=>"index_permalinks_on_url"})

-> 0.0022s

-- change_column(:permalinks, :url, :string, {:limit=>1000, :null=>false})

-> 0.0027s

-- add_index(:permalinks, :url, {:unique=>true})

-> 0.0021s

== 20140828200231 MakeUrlColBiggerInPermalinks: migrated (0.0103s) ============

== 20140831191346 RemoveCategoryGroupsOrphanedByRemovingCategoryOrGroup: migrating

-- execute("DELETE FROM category_groupsn WHERE group_id NOT IN (n SELECT groups.id FROM groups)n OR category_id NOT IN (n SELECT categories.id FROM categories)")

-> 0.0006s

== 20140831191346 RemoveCategoryGroupsOrphanedByRemovingCategoryOrGroup: migrated (0.0027s)

== 20140904055702 CorrectPostActionIndex: migrating ===========================

-- execute("DELETE FROM post_actions pan USING post_actions pa2n WHERE pa.post_action_type_id IN (3,4,7,8) ANDn pa2.post_action_type_id IN (3,4,7,8) ANDn pa.deleted_at IS NULL ANDn pa2.deleted_at IS NULL ANDn pa.disagreed_at IS NULL ANDn pa2.disagreed_at IS NULL ANDn pa.deferred_at IS NULL ANDn pa2.deferred_at IS NULL ANDn pa.id < pa2.id ANDn pa.user_id = pa2.user_id ANDn pa.post_id = pa2.post_id ANDn pa.targets_topic = pa2.targets_topic")

-> 0.0008s

>> DELETED 0 invalid rows from post_actions

-- add_index(:post_actions, ["user_id", "post_id", "targets_topic"], {:name=>"idx_unique_flags", :unique=>true, :where=>"deleted_at IS NULL ANDn disagreed_at IS NULL ANDn deferred_at IS NULL ANDn post_action_type_id IN (3,4,7,8)"})

-> 0.0028s

== 20140904055702 CorrectPostActionIndex: migrated (0.0051s) ==================

== 20140904160015 AddViaEmailToPosts: migrating ===============================

-- add_column(:posts, :via_email, :boolean, {:default=>false, :null=>false})

-> 0.0063s

== 20140904160015 AddViaEmailToPosts: migrated (0.0084s) ======================

== 20140904215629 RenameTrustLevelSettings: migrating =========================

-- execute("UPDATE site_settingsn SET name = regexp_replace(name, '^basic_', 'tl1_')")

-> 0.0004s

-- execute("UPDATE site_settingsn SET name = regexp_replace(name, '^regular_', 'tl2_')")

-> 0.0002s

-- execute("UPDATE site_settingsn SET name = regexp_replace(name, '^leader_', 'tl3_')")

-> 0.0002s

== 20140904215629 RenameTrustLevelSettings: migrated (0.0024s) ================

== 20140905055251 RenameTrustLevelBadges: migrating ===========================

-- execute("UPDATE badges SET name = 'Member' WHERE name = 'Regular User' AND id = 2")

-> 0.0003s

-- execute("UPDATE badges SET name = 'Regular' WHERE name = 'Leader' AND id = 3")

-> 0.0002s

-- execute("UPDATE badges SET name = 'Leader' WHERE name = 'Elder' AND id = 4")

-> 0.0002s

== 20140905055251 RenameTrustLevelBadges: migrated (0.0022s) ==================

== 20140905171733 CreateWarnings: migrating ===================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:warnings, {:id=>:integer})

-> 0.0023s

-- add_index(:warnings, :user_id)

-> 0.0028s

-- add_index(:warnings, :topic_id, {:unique=>true})

-> 0.0021s

== 20140905171733 CreateWarnings: migrated (0.0086s) ==========================

== 20140908165716 MigrateWarningTopicSubtypes: migrating ======================

-- execute("UPDATE topics AS tn SET subtype = 'moderator_warning'n FROM warnings AS wn WHERE w.topic_id = t.id")

-> 0.0008s

== 20140908165716 MigrateWarningTopicSubtypes: migrated (0.0028s) =============

== 20140908191429 TrimProfileLength: migrating ================================

-- execute("UPDATE user_profiles SET bio_raw=LEFT(bio_raw, 3000)")

-> 0.0004s

== 20140908191429 TrimProfileLength: migrated (0.0017s) =======================

== 20140910130155 CreateTopicUserIndex: migrating =============================

-- add_index(:topic_users, [:user_id, :topic_id], {:unique=>true})

-> 0.0022s

== 20140910130155 CreateTopicUserIndex: migrated (0.0043s) ====================

== 20140911065449 PrivateMessagesHaveNoCategoryId: migrating ==================

-- execute("UPDATE topics SET category_id = NULL WHERE category_id IS NOT NULL AND archetype = 'private_message'")

-> 0.0004s

-- execute("ALTER TABLE topics ADD CONSTRAINT pm_has_no_category CHECK (category_id IS NULL OR archetype <> 'private_message')")

-> 0.0006s

== 20140911065449 PrivateMessagesHaveNoCategoryId: migrated (0.0025s) =========

== 20140913192733 AddTrustLevelLockedColumn: migrating ========================

-- add_column(:users, :trust_level_locked, :boolean, {:default=>false, :null=>false})

-> 0.0069s

-- execute(" UPDATE usersn SET trust_level_locked = 't'n WHERE trust_level = 4n")

-> 0.0006s

== 20140913192733 AddTrustLevelLockedColumn: migrated (0.0097s) ===============

== 20140923042349 AddRetainHoursToUploads: migrating ==========================

-- add_column(:uploads, :retain_hours, :integer)

-> 0.0005s

== 20140923042349 AddRetainHoursToUploads: migrated (0.0031s) =================

== 20140924192418 RenameContentType: migrating ================================

-- rename_column(:site_contents, :content_type, :text_type)

-> 0.0027s

-- rename_column(:site_contents, :content, :value)

-> 0.0019s

-- rename_table(:site_contents, :site_texts)

-> 0.0052s

== 20140924192418 RenameContentType: migrated (0.0117s) =======================

== 20140925173220 CreateUserFields: migrating =================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:user_fields, {:id=>:integer})

-> 0.0025s

== 20140925173220 CreateUserFields: migrated (0.0038s) ========================

== 20140929181930 AddEditableToUserFields: migrating ==========================

-- add_column(:user_fields, :editable, :boolean, {:default=>false, :null=>false})

-> 0.0029s

== 20140929181930 AddEditableToUserFields: migrated (0.0042s) =================

== 20140929204155 MigrateTosSetting: migrating ================================

-- execute("SELECT * FROM site_settings WHERE name = 'tos_accept_required' AND value = 't'")

-> 0.0003s

== 20140929204155 MigrateTosSetting: migrated (0.0018s) =======================

== 20141001101041 AddPostIdToUserHistories: migrating =========================

-- add_column(:user_histories, :post_id, :integer)

-> 0.0005s

== 20141001101041 AddPostIdToUserHistories: migrated (0.0019s) ================

== 20141002181613 AddDescriptionToUserFields: migrating =======================

-- add_column(:user_fields, :description, :string, {:null=>true})

-> 0.0004s

-- execute("UPDATE user_fields SET description=name")

-> 0.0003s

-- change_column(:user_fields, :description, :string, {:null=>false})

-> 0.0006s

== 20141002181613 AddDescriptionToUserFields: migrated (0.0033s) ==============

== 20141007224814 AddBadgeGrantedTitleToUserProfile: migrating ================

-- add_column(:user_profiles, :badge_granted_title, :boolean, {:default=>false})

-> 0.0046s

-- execute("UPDATE user_profiles SET badge_granted_title = truen WHERE EXISTS (n SELECT 1 FROM users WHERE users.id = user_id AND title IN ('Leader', 'Regular')n )")

-> 0.0008s

-- execute("UPDATE user_profiles SET badge_granted_title = truen WHERE EXISTS (n SELECT 1 FROM users WHERE users.id = user_id AND title IN (SELECT name FROM badges WHERE allow_title)n )")

-> 0.0005s

== 20141007224814 AddBadgeGrantedTitleToUserProfile: migrated (0.0072s) =======

== 20141008152953 AddExernalUrlToPermalinks: migrating ========================

-- add_column(:permalinks, :external_url, :string, {:limit=>1000})

-> 0.0006s

== 20141008152953 AddExernalUrlToPermalinks: migrated (0.0023s) ===============

== 20141008181228 AddRequiredSignupToUserFields: migrating ====================

-- add_column(:user_fields, :required, :boolean, {:default=>true, :null=>false})

-> 0.0031s

== 20141008181228 AddRequiredSignupToUserFields: migrated (0.0044s) ===========

== 20141008192525 AddAutoCloseBasedOnLastPostAndAutoCloseHoursToTopics: migrating

-- add_column(:topics, :auto_close_based_on_last_post, :boolean, {:default=>false})

-> 0.0060s

-- add_column(:topics, :auto_close_hours, :float)

-> 0.0005s

== 20141008192525 AddAutoCloseBasedOnLastPostAndAutoCloseHoursToTopics: migrated (0.0083s)

== 20141008192526 AddAutoCloseBasedOnLastPostToCategories: migrating ==========

-- add_column(:categories, :auto_close_based_on_last_post, :boolean, {:default=>false})

-> 0.0075s

== 20141008192526 AddAutoCloseBasedOnLastPostToCategories: migrated (0.0101s) =

== 20141014032859 AddHiddenToPostRevision: migrating ==========================

-- add_column(:post_revisions, :hidden, :boolean, {:null=>false, :default=>false})

-> 0.0051s

== 20141014032859 AddHiddenToPostRevision: migrated (0.0071s) =================

== 20141014191645 FixTosName: migrating =======================================

-- execute("UPDATE user_fields SET name = 'Terms of Service' WHERE name = 'I have read and accept the <a href="/tos" target="_blank">Terms of Service</a>.'")

-> 0.0004s

== 20141014191645 FixTosName: migrated (0.0033s) ==============================

== 20141015060145 AddRawEmailToPosts: migrating ===============================

-- add_column(:posts, :raw_email, :text)

-> 0.0006s

== 20141015060145 AddRawEmailToPosts: migrated (0.0023s) ======================

== 20141016183307 AddExpansionBackgroundToUserProfiles: migrating =============

-- add_column(:user_profiles, :expansion_background, :string, {:limit=>255})

-> 0.0004s

== 20141016183307 AddExpansionBackgroundToUserProfiles: migrated (0.0017s) ====

== 20141020153415 AddPublicVersionToPosts: migrating ==========================

-- add_column(:posts, :public_version, :integer, {:null=>false, :default=>1})

-> 0.0064s

-- execute(" UPDATE postsn SET public_version = 1 + (SELECT COUNT(*) FROM post_revisions pr WHERE post_id = posts.id AND pr.hidden = 'f')n WHERE public_version <> 1 + (SELECT COUNT(*) FROM post_revisions pr WHERE post_id = posts.id AND pr.hidden = 'f')n")

-> 0.0009s

== 20141020153415 AddPublicVersionToPosts: migrated (0.0087s) =================

== 20141020154935 RenameExpansionToCard: migrating ============================

-- rename_column(:user_profiles, :expansion_background, :card_background)

-> 0.0022s

== 20141020154935 RenameExpansionToCard: migrated (0.0057s) ===================

== 20141020164816 AddImageToBadges: migrating =================================

-- add_column(:badges, :image, :string, {:limit=>255})

-> 0.0005s

== 20141020164816 AddImageToBadges: migrated (0.0018s) ========================

== 20141020174120 AddCardImageToUserProfiles: migrating =======================

-- add_column(:user_profiles, :card_image_badge_id, :integer)

-> 0.0004s

== 20141020174120 AddCardImageToUserProfiles: migrated (0.0019s) ==============

== 20141030222425 RenameSeenPostCount: migrating ==============================

-- rename_column(:topic_users, :seen_post_count, :highest_seen_post_number)

-> 0.0025s

== 20141030222425 RenameSeenPostCount: migrated (0.0041s) =====================

== 20141110150304 AddFooterToSiteCustomization: migrating =====================

-- add_column(:site_customizations, :footer, :text)

-> 0.0006s

-- add_column(:site_customizations, :mobile_footer, :text)

-> 0.0002s

== 20141110150304 AddFooterToSiteCustomization: migrated (0.0032s) ============

== 20141118011735 CorrectUsernameSearch: migrating ============================

-- execute("update user_search_datan set search_data = TO_TSVECTOR('simple', username_lower ' ' lower(name))n from usersn where users.id = user_search_data.user_id")

-> 0.0007s

== 20141118011735 CorrectUsernameSearch: migrated (0.0039s) ===================

== 20141120035016 AddAllowedIpsToApiKeys: migrating ===========================

-- change_table(:api_keys, {})

-> 0.0016s

== 20141120035016 AddAllowedIpsToApiKeys: migrated (0.0041s) ==================

== 20141120043401 AddHiddenToApiKeys: migrating ===============================

-- change_table(:api_keys, {})

-> 0.0048s

== 20141120043401 AddHiddenToApiKeys: migrated (0.0071s) ======================

== 20141211114517 FixEmojiPath: migrating =====================================

-- execute(" UPDATE postsn SET cooked = REPLACE(cooked, '/plugins/emoji/images/', '/plugins/emoji/images/emoji_one/')n WHERE cooked LIKE '%/plugins/emoji/images/%'n")

-> 0.0006s

== 20141211114517 FixEmojiPath: migrated (0.0023s) ============================

== 20141216112341 ResolveDuplicateGroupNames: migrating =======================

== 20141216112341 ResolveDuplicateGroupNames: migrated (0.0061s) ==============

== 20141222051622 RemoveOverrideDefaultStylesFromSiteCustomizations: migrating

-- remove_column(:site_customizations, :override_default_style)

-> 0.0014s

== 20141222051622 RemoveOverrideDefaultStylesFromSiteCustomizations: migrated (0.0028s)

== 20141222224220 FixEmojiPathTake2: migrating ================================

-- execute(" UPDATE postsn SET cooked = REPLACE(cooked, '/plugins/emoji/images/', '/images/emoji/')n WHERE cooked LIKE '%/plugins/emoji/images/%'n")

-> 0.0003s

== 20141222224220 FixEmojiPathTake2: migrated (0.0038s) =======================

== 20141222230707 AmendSiteCustomization: migrating ===========================

-- remove_column(:site_customizations, :position)

-> 0.0003s

== 20141222230707 AmendSiteCustomization: migrated (0.0018s) ==================

== 20141223145058 CreateCsvExportLogs: migrating ==============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:csv_export_logs, {:id=>:integer})

-> 0.0030s

== 20141223145058 CreateCsvExportLogs: migrated (0.0042s) =====================

== 20141228151019 RenameCsvExportLogsToUserExports: migrating =================

-- rename_table(:csv_export_logs, :user_exports)

-> 0.0039s

== 20141228151019 RenameCsvExportLogsToUserExports: migrated (0.0055s) ========

== 20150102113309 CleanUpUserHistory: migrating ===============================

== 20150102113309 CleanUpUserHistory: migrated (0.0053s) ======================

== 20150106215342 RemoveStars: migrating ======================================

-- execute(" INSERT INTO post_actions(user_id, post_id, post_action_type_id, created_at, updated_at)n SELECT tu.user_id, p.id, 1, coalesce(tu.starred_at, now()), coalesce(tu.starred_at, now())n FROM topic_users tun JOIN posts p ON p.topic_id = tu.topic_id AND p.post_number = 1n LEFT JOIN post_actions pa ONn pa.post_id = p.id ANDn pa.user_id = tu.user_id ANDn pa.post_action_type_id = 1n WHERE pa.post_id IS NULL AND tu.starredn")

-> 0.0013s

0 stars were converted to bookmarks!

-- execute(" DELETE FROM user_actions WHERE action_type = 10n")

-> 0.0003s

-- remove_column(:topic_users, :starred)

-> 0.0006s

-- remove_column(:topic_users, :starred_at)

-> 0.0003s

-- remove_column(:topic_users, :unstarred_at)

-> 0.0002s

-- remove_column(:topics, :star_count)

-> 0.0006s

== 20150106215342 RemoveStars: migrated (0.0047s) =============================

== 20150108002354 AddLikedAndBookmarkedToTopicUser: migrating =================

-- add_column(:topic_users, :liked, :boolean, {:default=>false})

-> 0.0038s

-- add_column(:topic_users, :bookmarked, :boolean, {:default=>false})

-> 0.0039s

-- execute("UPDATE topic_usersn SET liked = truen WHERE EXISTS (SELECT 1 FROM post_actions pan JOIN posts p ON p.id = pa.post_idn JOIN topics t ON t.id = p.topic_idn WHERE pa.deleted_at IS NULL ANDn p.deleted_at IS NULL ANDn t.deleted_at IS NULL ANDn pa.user_id = topic_users.user_id ANDn p.topic_id = topic_users.topic_id ANDn post_action_type_id = 2)n ")

-> 0.0019s

-- execute("UPDATE topic_usersn SET bookmarked = truen WHERE EXISTS (SELECT 1 FROM post_actions pan JOIN posts p ON p.id = pa.post_idn JOIN topics t ON t.id = p.topic_idn WHERE pa.deleted_at IS NULL ANDn p.deleted_at IS NULL ANDn t.deleted_at IS NULL ANDn pa.user_id = topic_users.user_id ANDn p.topic_id = topic_users.topic_id ANDn post_action_type_id = 1)n ")

-> 0.0012s

== 20150108002354 AddLikedAndBookmarkedToTopicUser: migrated (0.0149s) ========

== 20150108202057 CreateBookmarkActions: migrating ============================

-- execute("INSERT INTO user_actions (action_type,n user_id,n target_topic_id,n target_post_id,n acting_user_id,n created_at,n updated_at)n SELECT DISTINCT 3,n pa.user_id,n p.topic_id,n pa.post_id,n pa.user_id,n pa.created_at,n pa.updated_atn FROM post_actions AS pan INNER JOIN posts AS p ON p.id = pa.post_id AND p.post_number = 1n WHERE NOT EXISTS (SELECT 1 FROM user_actions AS ua WHERE ua.target_post_id = pa.post_id AND ua.action_type = 3 AND ua.user_id = pa.user_id)n AND pa.post_action_type_id = 1n AND pa.deleted_at IS NULL")

-> 0.0012s

== 20150108202057 CreateBookmarkActions: migrated (0.0034s) ===================

== 20150108211557 IndexTopicCustomFieldValues: migrating ======================

-- add_index(:topic_custom_fields, :value)

-> 0.0024s

== 20150108211557 IndexTopicCustomFieldValues: migrated (0.0039s) =============

== 20150108221703 GroupManagers: migrating ====================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:group_managers, {:id=>:integer})

-> 0.0037s

-- add_index(:group_managers, [:group_id, :user_id], {:unique=>true})

-> 0.0028s

== 20150108221703 GroupManagers: migrated (0.0123s) ===========================

== 20150112172258 AddNewSiteCustomizationTypes: migrating =====================

-- add_column(:site_customizations, :head_tag, :text)

-> 0.0009s

-- add_column(:site_customizations, :body_tag, :text)

-> 0.0006s

== 20150112172258 AddNewSiteCustomizationTypes: migrated (0.0030s) ============

== 20150112172259 MigrateSiteTextToSiteCustomization: migrating ===============

-- execute(" DOn $do$n BEGINn IF EXISTS(SELECT 1 FROM site_texts WHERE (text_type = 'head' OR text_type = 'bottom')) THENn INSERT INTO site_customizations (name, user_id, enabled, key, created_at, updated_at, head_tag, body_tag)n VALUESn (n 'Migrated from Site Text',n -1,n 't',n 'dc764780-cee2-4250-beab-e8533b963b8a',n now(),n now(),n (SELECT value FROM site_texts WHERE text_type = 'head' LIMIT 1),n (SELECT value FROM site_texts WHERE text_type = 'bottom' LIMIT 1)n );n END IF;n ENDn $do$n")

-> 0.0054s

== 20150112172259 MigrateSiteTextToSiteCustomization: migrated (0.0082s) ======

== 20150114093325 AddTopToSiteCustomization: migrating ========================

-- add_column(:site_customizations, :top, :text)

-> 0.0006s

-- add_column(:site_customizations, :mobile_top, :text)

-> 0.0004s

-- execute(" UPDATE site_customizationsn SET top = (SELECT value FROM site_texts WHERE text_type = 'top' LIMIT 1),n mobile_top = (SELECT value FROM site_texts WHERE text_type = 'top' LIMIT 1),n head_tag = (SELECT value FROM site_texts WHERE text_type = 'head' LIMIT 1),n body_tag = (SELECT value FROM site_texts WHERE text_type = 'bottom' LIMIT 1)n WHERE name = 'Migrated from Site Text'n")

-> 0.0008s

== 20150114093325 AddTopToSiteCustomization: migrated (0.0111s) ===============

== 20150115172310 RenameUserExportColumn: migrating ===========================

-- rename_column(:user_exports, :export_type, :file_name)

-> 0.0079s

== 20150115172310 RenameUserExportColumn: migrated (0.0159s) ==================

== 20150119192813 AddPostsIndexIncludingDeleted: migrating ====================

-- add_index(:posts, [:user_id, :created_at])

-> 0.0092s

== 20150119192813 AddPostsIndexIncludingDeleted: migrated (0.0107s) ===========

== 20150123145128 AddAutomaticMembershipToGroup: migrating ====================

-- add_column(:groups, :automatic_membership_email_domains, :text)

-> 0.0004s

-- add_column(:groups, :automatic_membership_retroactive, :boolean, {:default=>false})

-> 0.0046s

== 20150123145128 AddAutomaticMembershipToGroup: migrated (0.0071s) ===========

== 20150129204520 AddShowOnProfileToUserFields: migrating =====================

-- add_column(:user_fields, :show_on_profile, :boolean, {:default=>false, :null=>false})

-> 0.0034s

== 20150129204520 AddShowOnProfileToUserFields: migrated (0.0056s) ============

== 20150203041207 AddApplicationRequests: migrating ===========================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:application_requests, {:id=>:integer})

-> 0.0041s

-- add_index(:application_requests, [:date, :req_type], {:unique=>true})

-> 0.0025s

== 20150203041207 AddApplicationRequests: migrated (0.0084s) ==================

== 20150205032808 ResetApplicationRequests: migrating =========================

-- execute("TRUNCATE TABLE application_requests")

-> 0.0014s

== 20150205032808 ResetApplicationRequests: migrated (0.0030s) ================

== 20150205172051 AddCustomTypeToUserHistories: migrating =====================

-- add_column(:user_histories, :custom_type, :string)

-> 0.0007s

== 20150205172051 AddCustomTypeToUserHistories: migrated (0.0023s) ============

== 20150206004143 FlushApplicationRequests: migrating =========================

-- execute("TRUNCATE TABLE application_requests")

-> 0.0019s

== 20150206004143 FlushApplicationRequests: migrated (0.0030s) ================

== 20150213174159 CreateDigestUnsubscribeKeys: migrating ======================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:digest_unsubscribe_keys, {:id=>false})

-> 0.0009s

-- execute("ALTER TABLE digest_unsubscribe_keys ADD PRIMARY KEY (key)")

-> 0.0013s

-- add_index(:digest_unsubscribe_keys, :created_at)

-> 0.0023s

== 20150213174159 CreateDigestUnsubscribeKeys: migrated (0.0067s) =============

== 20150224004420 AddPinnedIndexes: migrating =================================

-- add_index(:topics, :pinned_globally, {:where=>"pinned_globally"})

-> 0.0026s

-- add_index(:topics, :pinned_at, {:where=>"pinned_at IS NOT NULL"})

-> 0.0024s

== 20150224004420 AddPinnedIndexes: migrated (0.0063s) ========================

== 20150227043622 AddLongDescriptionToBadges: migrating =======================

-- add_column(:badges, :long_description, :text)

-> 0.0005s

== 20150227043622 AddLongDescriptionToBadges: migrated (0.0019s) ==============

== 20150301224250 CreateSuggestedForIndex: migrating ==========================

-- add_index(:topics, [:created_at, :visible], {:where=>"deleted_at IS NULL AND archetype <> 'private_message'"})

-> 0.0029s

== 20150301224250 CreateSuggestedForIndex: migrated (0.0074s) =================

== 20150306050437 AddAllTimeAndOpLikesToTopTopics: migrating ==================

-- add_column(:top_topics, :all_score, :float, {:default=>0})

-> 0.0084s

-- add_column(:top_topics, "daily_op_likes_count", :integer, {:default=>0, :null=>false})

-> 0.0086s

-- add_index(:top_topics, ["daily_op_likes_count"])

-> 0.0026s

-- add_column(:top_topics, "weekly_op_likes_count", :integer, {:default=>0, :null=>false})

-> 0.0082s

-- add_index(:top_topics, ["weekly_op_likes_count"])

-> 0.0020s

-- add_column(:top_topics, "monthly_op_likes_count", :integer, {:default=>0, :null=>false})

-> 0.0101s

-- add_index(:top_topics, ["monthly_op_likes_count"])

-> 0.0027s

-- add_column(:top_topics, "yearly_op_likes_count", :integer, {:default=>0, :null=>false})

-> 0.0095s

-- add_index(:top_topics, ["yearly_op_likes_count"])

-> 0.0023s

== 20150306050437 AddAllTimeAndOpLikesToTopTopics: migrated (0.0563s) =========

== 20150318143915 CreateDirectoryItems: migrating =============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:directory_items, {:force=>true, :id=>:integer})

-> 0.0118s

-- add_index(:directory_items, :period_type)

-> 0.0022s

== 20150318143915 CreateDirectoryItems: migrated (0.0155s) ====================

== 20150323034933 AddAllowPrivateMessagesToUserProfile: migrating =============

-- add_column(:user_profiles, :allow_private_messages, :boolean, {:default=>true, :null=>false})

-> 0.0033s

== 20150323034933 AddAllowPrivateMessagesToUserProfile: migrated (0.0045s) ====

== 20150323062322 RemoveAllowPrivateMessagesFromUserProfile: migrating ========

-- remove_column(:user_profiles, :allow_private_messages)

-> 0.0004s

== 20150323062322 RemoveAllowPrivateMessagesFromUserProfile: migrated (0.0026s)

== 20150323234856 AddMutedUsers: migrating ====================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:muted_users, {:force=>true, :id=>:integer})

-> 0.0034s

-- add_index(:muted_users, [:user_id, :muted_user_id], {:unique=>true})

-> 0.0021s

-- add_index(:muted_users, [:muted_user_id, :user_id], {:unique=>true})

-> 0.0019s

== 20150323234856 AddMutedUsers: migrated (0.0088s) ===========================

== 20150324184222 AddMoreToDirectoryItems: migrating ==========================

-- add_column(:directory_items, :days_visited, :integer, {:null=>false, :default=>0})

-> 0.0026s

-- add_column(:directory_items, :posts_read, :integer, {:null=>false, :default=>0})

-> 0.0026s

== 20150324184222 AddMoreToDirectoryItems: migrated (0.0091s) =================

== 20150325183400 FixGroupUserCount: migrating ================================

-- execute("UPDATE groups g SET user_count = (SELECT COUNT(user_id) FROM group_users gu WHERE gu.group_id = g.id)")

-> 0.0007s

== 20150325183400 FixGroupUserCount: migrated (0.0021s) =======================

== 20150325190959 CreateQueuedPosts: migrating ================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:queued_posts, {:force=>true, :id=>:integer})

-> 0.0049s

-- add_index(:queued_posts, [:queue, :state, :created_at], {:name=>"by_queue_status"})

-> 0.0022s

-- add_index(:queued_posts, [:topic_id, :queue, :state, :created_at], {:name=>"by_queue_status_topic"})

-> 0.0029s

== 20150325190959 CreateQueuedPosts: migrated (0.0116s) =======================

== 20150410002033 AddPrimaryGroupToGroups: migrating ==========================

-- add_column(:groups, :primary_group, :boolean, {:default=>false, :null=>false})

-> 0.0035s

== 20150410002033 AddPrimaryGroupToGroups: migrated (0.0051s) =================

== 20150410002551 AddTitleToGroups: migrating =================================

-- add_column(:groups, :title, :string)

-> 0.0006s

== 20150410002551 AddTitleToGroups: migrated (0.0023s) ========================

== 20150421085850 IncreaseUrlLengthOnTopicEmbed: migrating ====================

-- index_name(:topic_embeds, {:column=>:embed_url})

-> 0.0000s

-- index_name_exists?(:topic_embeds, "index_topic_embeds_on_embed_url")

-> 0.0011s

-- remove_index(:topic_embeds, {:column=>:embed_url, :name=>"index_topic_embeds_on_embed_url"})

-> 0.0023s

-- change_column(:topic_embeds, :embed_url, :string, {:limit=>1000, :null=>false})

-> 0.0027s

-- add_index(:topic_embeds, :embed_url, {:unique=>true})

-> 0.0022s

== 20150421085850 IncreaseUrlLengthOnTopicEmbed: migrated (0.0106s) ===========

== 20150421190714 AddQueuedPostIdToUserActions: migrating =====================

-- add_column(:user_actions, :queued_post_id, :integer, {:null=>true})

-> 0.0004s

== 20150421190714 AddQueuedPostIdToUserActions: migrated (0.0029s) ============

== 20150422160235 AddLinkPostIdIndexOnTopicLinks: migrating ===================

-- add_index(:topic_links, [:link_post_id, :reflection])

-> 0.0030s

== 20150422160235 AddLinkPostIdIndexOnTopicLinks: migrated (0.0043s) ==========

== 20150501152228 RenameTotalVotesToVoters: migrating =========================

== 20150501152228 RenameTotalVotesToVoters: migrated (0.0109s) ================

== 20150505044154 AddStylesheetCache: migrating ===============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:stylesheet_cache, {:id=>:integer})

-> 0.0031s

-- add_index(:stylesheet_cache, [:target, :digest], {:unique=>true})

-> 0.0022s

== 20150505044154 AddStylesheetCache: migrated (0.0072s) ======================

== 20150513094042 AddIndexOnPostActions: migrating ============================

-- add_index(:post_actions, [:user_id, :post_action_type_id], {:where=>"deleted_at IS NULL"})

-> 0.0021s

== 20150513094042 AddIndexOnPostActions: migrated (0.0033s) ===================

== 20150514023016 AddUnreadNotificationsIndex: migrating ======================

-- add_index(:notifications, [:user_id, :notification_type], {:where=>"not read", :name=>"idx_notifications_speedup_unread_count"})

-> 0.0031s

== 20150514023016 AddUnreadNotificationsIndex: migrated (0.0044s) =============

== 20150514043155 AddUserActionsAllIndex: migrating ===========================

-- add_index(:user_actions, [:user_id, :created_at, :action_type], {:name=>"idx_user_actions_speed_up_user_all"})

-> 0.0021s

== 20150514043155 AddUserActionsAllIndex: migrated (0.0056s) ==================

== 20150525151759 SetDefaultS3Region: migrating ===============================

-- execute(" UPDATE site_settingsn SET value = 'us-east-1'n WHERE name = 's3_region'n AND LENGTH(COALESCE(value, '')) = 0n")

-> 0.0003s

== 20150525151759 SetDefaultS3Region: migrated (0.0018s) ======================

== 20150609163211 MigrateEmbeddableHost: migrating ============================

-- execute("UPDATE site_settings SET name = 'embeddable_hosts', data_type = 9 WHERE name = 'embeddable_host'")

-> 0.0002s

== 20150609163211 MigrateEmbeddableHost: migrated (0.0028s) ===================

== 20150617080349 AddIndexOnPostNotifications: migrating ======================

-- add_index(:notifications, [:user_id, :topic_id, :post_number])

-> 0.0022s

== 20150617080349 AddIndexOnPostNotifications: migrated (0.0041s) =============

== 20150617233018 AddIndexTargetPostIdOnUserActions: migrating ================

-- add_index(:user_actions, [:target_post_id])

-> 0.0028s

== 20150617233018 AddIndexTargetPostIdOnUserActions: migrated (0.0045s) =======

== 20150617234511 AddStaffIndexToUsers: migrating =============================

-- add_index(:users, [:id], {:name=>"idx_users_admin", :where=>"admin"})

-> 0.0023s

-- add_index(:users, [:id], {:name=>"idx_users_moderator", :where=>"moderator"})

-> 0.0023s

== 20150617234511 AddStaffIndexToUsers: migrated (0.0060s) ====================

== 20150702201926 AddTopicTemplateToCategories: migrating =====================

-- add_column(:categories, :topic_template, :text, {:null=>true})

-> 0.0005s

== 20150702201926 AddTopicTemplateToCategories: migrated (0.0018s) ============

== 20150706215111 AddMobileToUserVisits: migrating ============================

-- add_column(:user_visits, :mobile, :boolean, {:default=>false})

-> 0.0024s

== 20150706215111 AddMobileToUserVisits: migrated (0.0053s) ===================

== 20150707163251 AddReportsIndexToUserVisits: migrating ======================

-- add_index(:user_visits, [:visited_at, :mobile])

-> 0.0021s

== 20150707163251 AddReportsIndexToUserVisits: migrated (0.0034s) =============

== 20150709021818 AddLikeCountToPostMenu: migrating ===========================

-- execute("UPDATE site_settingsnSET value = replace(value, 'like', 'like-count like')nWHERE name = 'post_menu'nAND value NOT LIKE '%like-count%'n")

-> 0.0004s

== 20150709021818 AddLikeCountToPostMenu: migrated (0.0022s) ==================

== 20150713203955 EnlargeUsersEmailField: migrating ===========================

-- change_column(:users, :email, :string, {:limit=>513})

-> 0.0019s

== 20150713203955 EnlargeUsersEmailField: migrated (0.0033s) ==================

== 20150724165259 AddIndexToPostCustomFields: migrating =======================

-- execute(" CREATE INDEX index_post_custom_fields_on_name_and_value ON post_custom_fields USING btree (name, left(value, 200))n")

-> 0.0015s

== 20150724165259 AddIndexToPostCustomFields: migrated (0.0028s) ==============

== 20150724182342 AddActionCodeToPost: migrating ==============================

-- add_column(:posts, :action_code, :string, {:null=>true})

-> 0.0006s

== 20150724182342 AddActionCodeToPost: migrated (0.0028s) =====================

== 20150727193414 CreateUserFieldOptions: migrating ===========================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:user_field_options, {:force=>true, :id=>:integer})

-> 0.0030s

== 20150727193414 CreateUserFieldOptions: migrated (0.0043s) ==================

== 20150727210019 AddPinnedUntilToTopics: migrating ===========================

-- add_column(:topics, :pinned_until, :datetime, {:null=>true})

-> 0.0009s

== 20150727210019 AddPinnedUntilToTopics: migrated (0.0029s) ==================

== 20150727210748 AddQuarterlyToTopTopics: migrating ==========================

-- add_column(:top_topics, :quarterly_posts_count, :integer, {:default=>0, :null=>false})

-> 0.0116s

-- add_column(:top_topics, :quarterly_views_count, :integer, {:default=>0, :null=>false})

-> 0.0104s

-- add_column(:top_topics, :quarterly_likes_count, :integer, {:default=>0, :null=>false})

-> 0.0089s

-- add_column(:top_topics, :quarterly_score, :float, {:default=>0.0})

-> 0.0113s

-- add_column(:top_topics, :quarterly_op_likes_count, :integer, {:default=>0, :null=>false})

-> 0.0084s

-- add_index(:top_topics, [:quarterly_posts_count])

-> 0.0020s

-- add_index(:top_topics, [:quarterly_views_count])

-> 0.0018s

-- add_index(:top_topics, [:quarterly_likes_count])

-> 0.0019s

-- add_index(:top_topics, [:quarterly_op_likes_count])

-> 0.0019s

== 20150727210748 AddQuarterlyToTopTopics: migrated (0.0602s) =================

== 20150727230537 AddExampleColumnComments: migrating =========================

COMMENT ON TABLE posts

COMMENT ON COLUMN posts.post_number

COMMENT ON COLUMN posts.raw

COMMENT ON COLUMN posts.cooked

COMMENT ON COLUMN posts.reply_to_post_number

COMMENT ON COLUMN posts.reply_quoted

COMMENT ON TABLE topics

== 20150727230537 AddExampleColumnComments: migrated (0.0029s) ================

== 20150728004647 CorrectCustomFieldsMigration: migrating =====================

-- execute(" DROP INDEX index_post_custom_fields_on_name_and_valuen")

-> 0.0006s

-- execute(" CREATE INDEX index_post_custom_fields_on_name_and_value ON post_custom_fields USING btree (name, left(value, 200))n")

-> 0.0033s

== 20150728004647 CorrectCustomFieldsMigration: migrated (0.0064s) ============

== 20150728210202 MigrateOldModeratorPosts: migrating =========================

-- execute("UPDATE posts SET action_code = 'closed.enabled', raw = '', cooked = '', post_type = 3 where post_type = 2 AND raw = 'This topic is now closed. New replies are no longer allowed.'")

-> 0.0005s

-- execute("UPDATE posts SET action_code = 'closed.disabled', raw = '', cooked = '', post_type = 3 where post_type = 2 AND raw = 'This topic is now opened. New replies are allowed.'")

-> 0.0003s

-- execute("UPDATE posts SET action_code = 'archived.enabled', raw = '', cooked = '', post_type = 3 where post_type = 2 AND raw = 'This topic is now archived. It is frozen and cannot be changed in any way.'")

-> 0.0003s

-- execute("UPDATE posts SET action_code = 'archived.disabled', raw = '', cooked = '', post_type = 3 where post_type = 2 AND raw = 'This topic is now unarchived. It is no longer frozen, and can be changed.'")

-> 0.0003s

-- execute("UPDATE posts SET action_code = 'pinned.enabled', raw = '', cooked = '', post_type = 3 where post_type = 2 AND raw = 'This topic is now pinned. It will appear at the top of its category until it is unpinned by staff for everyone, or by individual users for themselves.'")

-> 0.0003s

-- execute("UPDATE posts SET action_code = 'pinned.disabled', raw = '', cooked = '', post_type = 3 where post_type = 2 AND raw = 'This topic is now unpinned. It will no longer appear at the top of its category.'")

-> 0.0003s

-- execute("UPDATE posts SET action_code = 'pinned_globally.enabled', raw = '', cooked = '', post_type = 3 where post_type = 2 AND raw = 'This topic is now pinned globally. It will appear at the top of its category and all topic lists until it is unpinned by staff for everyone, or by individual users for themselves.'")

-> 0.0003s

-- execute("UPDATE posts SET action_code = 'pinned_globally.disabled', raw = '', cooked = '', post_type = 3 where post_type = 2 AND raw = 'This topic is now unpinned. It will no longer appear at the top of its category.'")

-> 0.0003s

== 20150728210202 MigrateOldModeratorPosts: migrated (0.0045s) ================

== 20150729150523 MigrateAutoClosePosts: migrating ============================

-- execute("UPDATE posts SET action_code = 'autoclosed.enabled', post_type = 3 WHERE post_type = 2 AND (raw ~* 'This topic was automatically closed after 1 day. New replies are no longer allowed.' OR raw ~* 'This topic was automatically closed after \d+ days. New replies are no longer allowed.' OR raw ~* 'This topic was automatically closed after 1 hour. New replies are no longer allowed.' OR raw ~* 'This topic was automatically closed after \d+ hours. New replies are no longer allowed.' OR raw ~* 'This topic was automatically closed 1 day after the last reply. New replies are no longer allowed.' OR raw ~* 'This topic was automatically closed \d+ days after the last reply. New replies are no longer allowed.' OR raw ~* 'This topic was automatically closed 1 hour after the last reply. New replies are no longer allowed.' OR raw ~* 'This topic was automatically closed \d+ hours after the last reply. New replies are no longer allowed.' OR raw ~* 'This topic was automatically closed 1 minute after the last reply. New replies are no longer allowed.' OR raw ~* 'This topic was automatically closed \d+ minutes after the last reply. New replies are no longer allowed.')")

-> 0.0019s

== 20150729150523 MigrateAutoClosePosts: migrated (0.0042s) ===================

== 20150730154830 AddPositionToUserFields: migrating ==========================

-- add_column(:user_fields, :position, :integer, {:default=>0})

-> 0.0035s

-- execute("UPDATE user_fields SET position = (SELECT COUNT(*) from user_fields as uf2 where uf2.id < user_fields.id)")

-> 0.0004s

== 20150730154830 AddPositionToUserFields: migrated (0.0054s) =================

== 20150731225331 MigrateOldMovedPosts: migrating =============================

-- execute("UPDATE posts SET post_type = 3, action_code = 'split_topic' WHERE post_type = 2 AND raw ~* '^I moved [a\d]+ posts? to a new topic:'")

-> 0.0005s

-- execute("UPDATE posts SET post_type = 3, action_code = 'split_topic' WHERE post_type = 2 AND raw ~* '^I moved [a\d]+ posts? to an existing topic:'")

-> 0.0003s

== 20150731225331 MigrateOldMovedPosts: migrated (0.0025s) ====================

== 20150802233112 AddPostStats: migrating =====================================

-- add_column(:drafts, :revisions, :int, {:null=>false, :default=>1})

-> 0.0037s

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:post_stats, {:id=>:integer})

-> 0.0025s

-- add_index(:post_stats, [:post_id])

-> 0.0024s

== 20150802233112 AddPostStats: migrated (0.0106s) ============================

== 20150806210727 AddEmbeddedCssToSiteCustomizations: migrating ===============

-- add_column(:site_customizations, :embedded_css, :text)

-> 0.0005s

-- add_column(:site_customizations, :embedded_css_baked, :text)

-> 0.0003s

== 20150806210727 AddEmbeddedCssToSiteCustomizations: migrated (0.0023s) ======

== 20150818190757 CreateEmbeddableHosts: migrating ============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:embeddable_hosts, {:force=>true, :id=>:integer})

-> 0.0039s

-- execute("SELECT c.id FROM categories AS cn INNER JOIN site_settings AS s ON s.value = c.namen WHERE s.name = 'embed_category'")

-> 0.0008s

-- execute("SELECT value FROM site_settings WHERE name = 'uncategorized_category_id'")

-> 0.0002s

-- execute("SELECT value FROM site_settings WHERE name = 'embeddable_hosts'")

-> 0.0002s

-- execute("DELETE FROM site_settings WHERE name IN ('embeddable_hosts', 'embed_category')")

-> 0.0002s

== 20150818190757 CreateEmbeddableHosts: migrated (0.0069s) ===================

== 20150822141540 FixMigratedHosts: migrating =================================

-- execute("UPDATE embeddable_hosts SET host = regexp_replace(host, '^https?://', '', 'i')")

-> 0.0004s

== 20150822141540 FixMigratedHosts: migrated (0.0018s) ========================

== 20150828155137 AddSuppressFromHomepageToCategory: migrating ================

-- add_column(:categories, :suppress_from_homepage, :boolean, {:default=>false})

-> 0.0052s

== 20150828155137 AddSuppressFromHomepageToCategory: migrated (0.0074s) =======

== 20150901192313 AddGrantTrustLevelToGroups: migrating =======================

-- add_column(:groups, :grant_trust_level, :integer)

-> 0.0004s

== 20150901192313 AddGrantTrustLevelToGroups: migrated (0.0018s) ==============

== 20150914021445 CreateUserProfileViews: migrating ===========================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:user_profile_views, {:id=>:integer})

-> 0.0029s

-- add_index(:user_profile_views, :user_profile_id)

-> 0.0025s

-- add_index(:user_profile_views, :user_id)

-> 0.0018s

-- add_index(:user_profile_views, [:viewed_at, :ip_address, :user_profile_id], {:where=>"user_id IS NULL", :unique=>true, :name=>"unique_profile_view_ip"})

-> 0.0021s

-- add_index(:user_profile_views, [:viewed_at, :user_id, :user_profile_id], {:where=>"user_id IS NOT NULL", :unique=>true, :name=>"unique_profile_view_user"})

-> 0.0023s

== 20150914021445 CreateUserProfileViews: migrated (0.0133s) ==================

== 20150914034541 AddViewsToUserProfile: migrating ============================

-- add_column(:user_profiles, :views, :integer, {:default=>0, :null=>false})

-> 0.0037s

== 20150914034541 AddViewsToUserProfile: migrated (0.0049s) ===================

== 20150917071017 AddCategoryIdToUserHistories: migrating =====================

-- add_column(:user_histories, :category_id, :integer)

-> 0.0004s

-- add_index(:user_histories, :category_id)

-> 0.0031s

== 20150917071017 AddCategoryIdToUserHistories: migrated (0.0049s) ============

== 20150918004206 AddUserIdGroupIdIndexToGroupUsers: migrating ================

-- add_index(:group_users, [:user_id, :group_id], {:unique=>true})

-> 0.0020s

== 20150918004206 AddUserIdGroupIdIndexToGroupUsers: migrated (0.0033s) =======

== 20150924022040 AddFancyTitleToTopic: migrating =============================

-- add_column(:topics, :fancy_title, :string, {:limit=>400, :null=>true})

-> 0.0005s

== 20150924022040 AddFancyTitleToTopic: migrated (0.0018s) ====================

== 20150925000915 ExcludeWhispersFromBadges: migrating ========================

-- execute("DROP VIEW badge_posts")

-> 0.0009s

-- execute("CREATE VIEW badge_posts ASn SELECT p.*n FROM posts pn JOIN topics t ON t.id = p.topic_idn JOIN categories c ON c.id = t.category_idn WHERE c.allow_badges ANDn p.deleted_at IS NULL ANDn t.deleted_at IS NULL ANDn NOT c.read_restricted ANDn t.visible ANDn p.post_type IN (1,2,3)n ")

-> 0.0042s

== 20150925000915 ExcludeWhispersFromBadges: migrated (0.0065s) ===============

== 20151016163051 MergePollsVotes: migrating ==================================

== 20151016163051 MergePollsVotes: migrated (0.0038s) =========================

== 20151103233815 AddLowerTitleIndexOnTopics: migrating =======================

-- execute("CREATE INDEX index_topics_on_lower_title ON topics (LOWER(title))")

-> 0.0011s

== 20151103233815 AddLowerTitleIndexOnTopics: migrated (0.0107s) ==============

== 20151105181635 AddStagedToUser: migrating ==================================

-- add_column(:users, :staged, :boolean, {:null=>false, :default=>false})

-> 0.0110s

== 20151105181635 AddStagedToUser: migrated (0.0125s) =========================

== 20151107041044 FixIncorrectTopicCreatorAfterMove: migrating ================

-- execute("UPDATE topics SET user_id = p.user_idn FROM posts pn WHERE p.topic_id = topics.id ANDn p.post_number = 1 ANDn p.user_id <> topics.user_id")

-> 0.0010s

== 20151107041044 FixIncorrectTopicCreatorAfterMove: migrated (0.0023s) =======

== 20151107042241 AddOwnerToGroupUsers: migrating =============================

-- add_column(:group_users, :owner, :boolean, {:null=>false, :default=>false})

-> 0.0036s

== 20151107042241 AddOwnerToGroupUsers: migrated (0.0063s) ====================

== 20151109124147 DropGroupManagers: migrating ================================

-- execute("UPDATE group_users SET owner = truen WHERE exists (SELECT 1 FROM group_managers mn WHERE m.group_id = group_users.group_id ANDn m.user_id = group_users.user_id)")

-> 0.0007s

-- drop_table("group_managers")

-> 0.0009s

== 20151109124147 DropGroupManagers: migrated (0.0095s) =======================

== 20151113205046 CreateTranslationOverrides: migrating =======================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:translation_overrides, {:force=>true, :id=>:integer})

-> 0.0035s

-- add_index(:translation_overrides, [:locale, :translation_key], {:unique=>true})

-> 0.0026s

== 20151113205046 CreateTranslationOverrides: migrated (0.0136s) ==============

== 20151117165756 AddAutomaticallyUnpinTopicsToUsers: migrating ===============

-- add_column(:users, :automatically_unpin_topics, :boolean, {:nullabe=>false, :default=>true})

-> 0.0085s

== 20151117165756 AddAutomaticallyUnpinTopicsToUsers: migrated (0.0118s) ======

== 20151124172631 AddIsSupportToCategories: migrating =========================

-- add_column(:categories, :is_support, :boolean, {:default=>false, :null=>false})

-> 0.0086s

== 20151124172631 AddIsSupportToCategories: migrated (0.0099s) ================

== 20151124192339 RenameNinjaEdit: migrating ==================================

-- execute("UPDATE site_settings SET name = 'editing_grace_period' WHERE name = 'ninja_edit_window'")

-> 0.0006s

== 20151124192339 RenameNinjaEdit: migrated (0.0035s) =========================

== 20151125194322 RemoveSiteText: migrating ===================================

-- execute("INSERT INTO translation_overrides (locale, translation_key, value, created_at, updated_at)n SELECT 'en',n CASEn WHEN text_type = 'usage_tips' THEN 'system_messages.usage_tips.text_body_template'n WHEN text_type = 'education_new_topic' THEN 'education.new-topic'n WHEN text_type = 'education_new_reply' THEN 'education.new-reply'n WHEN text_type = 'login_required_welcome_message' THEN 'login_required.welcome_message'n END,n value,n created_at,n updated_atn FROM site_textsn WHERE text_type in ('usage_tips',n 'education_new_topic',n 'education_new_reply',n 'login_required_welcome_message')")

-> 0.0005s

-- drop_table(:site_texts)

-> 0.0010s

== 20151125194322 RemoveSiteText: migrated (0.0056s) ==========================

== 20151126173356 RenameIsSupportToContainsMessages: migrating ================

-- rename_column(:categories, :is_support, :contains_messages)

-> 0.0031s

== 20151126173356 RenameIsSupportToContainsMessages: migrated (0.0043s) =======

== 20151126233623 AddBakedHeadAndBodyToSiteCustomizations: migrating ==========

-- add_column(:site_customizations, :head_tag_baked, :text)

-> 0.0004s

-- add_column(:site_customizations, :body_tag_baked, :text)

-> 0.0003s

== 20151126233623 AddBakedHeadAndBodyToSiteCustomizations: migrated (0.0035s) =

== 20151127011837 AddHeaderAndFooterBakedToSiteCustomizations: migrating ======

-- add_column(:site_customizations, :header_baked, :text)

-> 0.0005s

-- add_column(:site_customizations, :mobile_header_baked, :text)

-> 0.0004s

-- add_column(:site_customizations, :footer_baked, :text)

-> 0.0032s

-- add_column(:site_customizations, :mobile_footer_baked, :text)

-> 0.0009s

== 20151127011837 AddHeaderAndFooterBakedToSiteCustomizations: migrated (0.0074s)

== 20151201035631 AddGroupMentions: migrating =================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:group_mentions, {:id=>:integer})

-> 0.0027s

-- add_index(:group_mentions, [:post_id, :group_id], {:unique=>true})

-> 0.0038s

-- add_index(:group_mentions, [:group_id, :post_id], {:unique=>true})

-> 0.0019s

== 20151201035631 AddGroupMentions: migrated (0.0107s) ========================

== 20151201161726 AddIncomingEmailToGroups: migrating =========================

-- add_column(:groups, :incoming_email, :string, {:null=>true})

-> 0.0004s

-- add_index(:groups, :incoming_email, {:unique=>true})

-> 0.0022s

== 20151201161726 AddIncomingEmailToGroups: migrated (0.0039s) ================

== 20151214165852 AddNotificationLevelToGroupUsers: migrating =================

-- add_column(:group_users, :notification_level, :integer, {:default=>3, :null=>false})

-> 0.0031s

== 20151214165852 AddNotificationLevelToGroupUsers: migrated (0.0045s) ========

== 20151218232200 AddUniqueIndexToCategoryUsers: migrating ====================

-- execute("DELETE FROM category_users cu USING category_users cu1n WHERE cu.user_id = cu1.user_id ANDn cu.category_id = cu1.category_id ANDn cu.notification_level = cu1.notification_level ANDn cu.id < cu1.idn")

-> 0.0005s

-- add_index(:category_users, [:user_id, :category_id, :notification_level], {:name=>"idx_category_users_u1", :unique=>true})

-> 0.0037s

-- add_index(:category_users, [:category_id, :user_id, :notification_level], {:name=>"idx_category_users_u2", :unique=>true})

-> 0.0026s

== 20151218232200 AddUniqueIndexToCategoryUsers: migrated (0.0086s) ===========

== 20151219045559 AddHasMessagesToGroups: migrating ===========================

-- add_column(:groups, :has_messages, :boolean, {:default=>false, :null=>false})

-> 0.0041s

-- execute(" UPDATE groups g SET has_messages = truen WHERE exists(SELECT group_id FROM topic_allowed_groups WHERE group_id = g.id)n")

-> 0.0007s

== 20151219045559 AddHasMessagesToGroups: migrated (0.0062s) ==================

== 20151220232725 AddUserArchivedMessagesGroupArchivedMessages: migrating =====

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:user_archived_messages, {:id=>:integer})

-> 0.0030s

-- add_index(:user_archived_messages, [:user_id, :topic_id], {:unique=>true})

-> 0.0024s

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:group_archived_messages, {:id=>:integer})

-> 0.0022s

-- add_index(:group_archived_messages, [:group_id, :topic_id], {:unique=>true})

-> 0.0018s

== 20151220232725 AddUserArchivedMessagesGroupArchivedMessages: migrated (0.0145s)

== 20160108051129 FixIncorrectUserHistory: migrating ==========================

-- execute("SELECT min(id) FROM user_histories WHERE (action = 16 AND previous_value in ('0','1','2','3','4')) ORn(action = 19 AND target_user_id IS NULL AND details IS NOT NULL)n")

-> 0.0007s

-- execute("SELECT max(id) FROM user_histories WHERE (action = 16 AND previous_value in ('0','1','2','3','4')) ORn(action = 19 AND target_user_id IS NULL AND details IS NOT NULL)n")

-> 0.0004s

== 20160108051129 FixIncorrectUserHistory: migrated (0.0057s) =================

== 20160110053003 ArchiveSystemMessagesWithNoReplies: migrating ===============

-- execute("n INSERT INTO user_archived_messages (user_id, topic_id, created_at, updated_at)n SELECT p.user_id, p.topic_id, p.created_at, p.updated_atn FROM posts pn JOIN topics t ON t.id = p.topic_idn LEFT JOIN user_archived_messages um ON um.user_id = p.user_id AND um.topic_id = p.topic_idn WHERE t.subtype = 'system_message' ANDn t.posts_count = 1 ANDn t.archetype = 'private_message' ANDn um.id IS NULL ANDn p.user_id IS NOT NULL ANDn p.topic_id IS NOT NULL ANDn p.post_number = 1n")

-> 0.0010s

== 20160110053003 ArchiveSystemMessagesWithNoReplies: migrated (0.0029s) ======

== 20160112025852 RemoveUsersFromTopicAllowedUsers: migrating =================

-- execute(" DELETE FROM topic_allowed_users tun USING topic_allowed_groups tgn JOIN group_users gu ON gu.group_id = tg.group_idn WHERE tu.user_id = gu.user_id AND tg.topic_id = tu.topic_idn")

-> 0.0017s

== 20160112025852 RemoveUsersFromTopicAllowedUsers: migrated (0.0031s) ========

== 20160112101818 RemoveContainsMessageOnCategory: migrating ==================

-- remove_column(:categories, :contains_messages)

-> 0.0006s

== 20160112101818 RemoveContainsMessageOnCategory: migrated (0.0048s) =========

== 20160112104733 AddContainsMessagesBackToCategories: migrating ==============

-- add_column(:categories, :contains_messages, :boolean)

-> 0.0007s

== 20160112104733 AddContainsMessagesBackToCategories: migrated (0.0025s) =====

== 20160113160742 CreateIncomingEmails: migrating =============================

-- adapter_name()

-> 0.0001s

-- adapter_name()

-> 0.0000s

-- create_table(:incoming_emails, {:id=>:integer})

-> 0.0034s

-- add_index(:incoming_emails, :created_at)

-> 0.0028s

-- add_index(:incoming_emails, :message_id)

-> 0.0024s

-- add_index(:incoming_emails, :error)

-> 0.0020s

== 20160113160742 CreateIncomingEmails: migrated (0.0125s) ====================

== 20160118174335 RebakeHtmlCustomizations: migrating =========================

-- execute("UPDATE site_customizations SET body_tag_baked = NULL,n head_tag_baked = NULL,n header_baked = NULL,n mobile_header_baked = NULL,n footer_baked = NULL,n mobile_footer_baked = NULL")

-> 0.0004s

== 20160118174335 RebakeHtmlCustomizations: migrated (0.0040s) ================

== 20160118233631 BackfillIncomingEmails: migrating ===========================

-- execute(" INSERT INTO incoming_emails (post_id, created_at, updated_at, user_id, topic_id, message_id, from_address, to_addresses, subject)n SELECT posts.idn , posts.created_atn , posts.created_atn , posts.user_idn , posts.topic_idn , array_to_string(regexp_matches(posts.raw_email, '^ *Message-Id: .*<([^>]+)>', 'im'), '')n , users.emailn , array_to_string(regexp_matches(array_to_string(regexp_matches(posts.raw_email, '^to:.+$', 'im'), ''), '[^< "''(]+@[^> "'')]+'), '')n , topics.titlen FROM postsn JOIN topics ON posts.topic_id = topics.idn JOIN users ON posts.user_id = users.idn WHERE posts.user_id IS NOT NULLn AND posts.topic_id IS NOT NULLn AND posts.via_email = 't'n AND posts.raw_email ~* 'Message-Id'n ORDER BY posts.id;n")

-> 0.0019s

== 20160118233631 BackfillIncomingEmails: migrated (0.0036s) ==================

== 20160127105314 ChangeDefaultNotificationLevelOnGroups: migrating ===========

-- execute("UPDATE group_users SET notification_level = 2")

-> 0.0003s

-- change_column(:group_users, :notification_level, :integer, {:null=>false, :default=>2})

-> 0.0037s

== 20160127105314 ChangeDefaultNotificationLevelOnGroups: migrated (0.0058s) ==

== 20160127222802 MigrateUncategorizedDescriptionSetting: migrating ===========

-- execute("INSERT INTO translation_overrides (locale, translation_key, value, created_at, updated_at)n SELECT 'en', 'category.uncategorized_description', value, created_at, updated_atn FROM site_settingsn WHERE name = 'uncategorized_description'n AND value <> 'Topics that don''t need a category, or don''t fit into any other existing category.'")

-> 0.0003s

-- execute("DELETE FROM site_settings WHERE name = 'uncategorized_description'")

-> 0.0002s

== 20160127222802 MigrateUncategorizedDescriptionSetting: migrated (0.0020s) ==

== 20160201181320 FixEmailLogs: migrating =====================================

-- execute(" UPDATE email_logsn SET user_id = u.idn FROM email_logs eln LEFT JOIN users u ON u.email = el.to_addressn WHERE email_logs.id = el.idn AND email_logs.user_id IS NULLn AND NOT email_logs.skippedn")

-> 0.0010s

== 20160201181320 FixEmailLogs: migrated (0.0025s) ============================

== 20160206210202 RemoveInvalidWebsites: migrating ============================

-- execute("UPDATE user_profiles SET website = NULL WHERE website = 'http://'")

-> 0.0004s

== 20160206210202 RemoveInvalidWebsites: migrated (0.0018s) ===================

== 20160215075528 AddUnreadPmIndexToNotifications: migrating ==================

-- add_index(:notifications, [:user_id, :id], {:unique=>true, :where=>"notification_type = 6 AND NOT read"})

-> 0.0030s

== 20160215075528 AddUnreadPmIndexToNotifications: migrated (0.0045s) =========

== 20160224033122 CreateInstagramUserInfos: migrating =========================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:instagram_user_infos, {:id=>:integer})

-> 0.0031s

== 20160224033122 CreateInstagramUserInfos: migrated (0.0045s) ================

== 20160225050317 AddUserOptions: migrating ===================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:user_options, {:id=>false})

-> 0.0035s

-- add_index(:user_options, [:user_id], {:unique=>true})

-> 0.0026s

-- execute(" INSERT INTO user_options (n user_id,n email_always,n mailing_list_mode,n email_digests,n email_direct,n email_private_messages,n external_links_in_new_tab,n enable_quoting,n dynamic_favicon,n disable_jump_reply,n edit_history_public,n automatically_unpin_topics,n digest_after_daysn )n SELECT id,n email_always,n mailing_list_mode,n email_digests,n email_direct,n COALESCE(email_private_messages,true),n external_links_in_new_tab,n enable_quoting,n dynamic_favicon,n disable_jump_reply,n edit_history_public,n automatically_unpin_topics,n digest_after_daysn FROM usersn")

-> 0.0005s

== 20160225050317 AddUserOptions: migrated (0.0085s) ==========================

== 20160225050318 AllowDefaultsOnUsersTable: migrating ========================

-- change_column(:users, :email_digests, :boolean, {:null=>false, :default=>true})

-> 0.0075s

-- change_column(:users, :external_links_in_new_tab, :boolean, {:null=>false, :default=>false})

-> 0.0077s

== 20160225050318 AllowDefaultsOnUsersTable: migrated (0.0165s) ===============

== 20160225050319 MoveTrackingOptionsToUserOptions: migrating =================

-- add_column(:user_options, :auto_track_topics_after_msecs, :integer)

-> 0.0005s

-- add_column(:user_options, :new_topic_duration_minutes, :integer)

-> 0.0003s

-- add_column(:user_options, :last_redirected_to_top_at, :datetime)

-> 0.0003s

-- execute(" UPDATE user_optionsn SET auto_track_topics_after_msecs = users.auto_track_topics_after_msecs,n new_topic_duration_minutes = users.new_topic_duration_minutes,n last_redirected_to_top_at = users.last_redirected_to_top_atn FROM usersn WHERE users.id = user_options.user_idn")

-> 0.0007s

== 20160225050319 MoveTrackingOptionsToUserOptions: migrated (0.0031s) ========

== 20160225050320 AddEmailPreviousRepliesToUserOptions: migrating =============

-- add_column(:user_options, :email_previous_replies, :integer, {:null=>false, :default=>1})

-> 0.0019s

== 20160225050320 AddEmailPreviousRepliesToUserOptions: migrated (0.0033s) ====

== 20160225095306 AddEmailInReplyToToUserOptions: migrating ===================

-- add_column(:user_options, :email_in_reply_to, :boolean, {:null=>false, :default=>true})

-> 0.0020s

-- change_column(:user_options, :email_previous_replies, :integer, {:default=>2, :null=>false})

-> 0.0044s

-- execute("UPDATE user_options SET email_previous_replies = 2")

-> 0.0002s

== 20160225095306 AddEmailInReplyToToUserOptions: migrated (0.0080s) ==========

== 20160302063432 RebuildDirectoryItemWithIndex: migrating ====================

-- index_name(:directory_items, {:column=>[:period_type]})

-> 0.0000s

-- index_name_exists?(:directory_items, "index_directory_items_on_period_type")

-> 0.0009s

-- remove_index(:directory_items, {:column=>[:period_type], :name=>"index_directory_items_on_period_type"})

-> 0.0022s

-- execute("TRUNCATE TABLE directory_items RESTART IDENTITY")

-> 0.0009s

-- add_index(:directory_items, [:period_type, :user_id], {:unique=>true})

-> 0.0021s

== 20160302063432 RebuildDirectoryItemWithIndex: migrated (0.0083s) ===========

== 20160302104253 AddLikeNotificationFrequencyToUserOptions: migrating ========

-- add_column(:user_options, :like_notification_frequency, :integer, {:null=>false, :default=>1})

-> 0.0061s

== 20160302104253 AddLikeNotificationFrequencyToUserOptions: migrated (0.0076s)

== 20160302170230 RenameDigestAfterDaysToDigestAfterMinutes: migrating ========

-- rename_column(:user_options, :digest_after_days, :digest_after_minutes)

-> 0.0022s

-- execute("UPDATE user_options SET digest_after_minutes = digest_after_minutes * 1440 WHERE digest_after_minutes IS NOT NULL")

-> 0.0003s

-- execute("UPDATE site_settings SET value = value::integer * 1440 WHERE name = 'default_email_digest_frequency' AND value IS NOT NULL")

-> 0.0003s

== 20160302170230 RenameDigestAfterDaysToDigestAfterMinutes: migrated (0.0040s)

== 20160303183607 ClearCommonPasswordsCache: migrating ========================

== 20160303183607 ClearCommonPasswordsCache: migrated (0.0014s) ===============

== 20160303234317 AddRejectionMessageToIncomingEmail: migrating ===============

-- add_column(:incoming_emails, :rejection_message, :text)

-> 0.0004s

== 20160303234317 AddRejectionMessageToIncomingEmail: migrated (0.0022s) ======

== 20160307190919 CreateEmailChangeRequests: migrating ========================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:email_change_requests, {:id=>:integer})

-> 0.0026s

-- add_index(:email_change_requests, :user_id)

-> 0.0020s

== 20160307190919 CreateEmailChangeRequests: migrated (0.0061s) ===============

== 20160308193142 RenameConfirmTranslationKey: migrating ======================

-- execute("UPDATE translation_overrides SET translation_key = 'user_notifications.confirm_new_email.subject_template'n WHERE translation_key = 'user_notifications.authorize_email.subject_template'")

-> 0.0003s

-- execute("UPDATE translation_overrides SET translation_key = 'user_notifications.confirm_new_email.text_body_template'n WHERE translation_key = 'user_notifications.authorize_email.text_body_template'")

-> 0.0004s

== 20160308193142 RenameConfirmTranslationKey: migrated (0.0027s) =============

== 20160309073132 AddMailingListModeFrequency: migrating ======================

-- add_column(:user_options, :mailing_list_mode_frequency, :integer, {:default=>0, :null=>false})

-> 0.0042s

== 20160309073132 AddMailingListModeFrequency: migrated (0.0073s) =============

== 20160317174357 CreateGivenDailyLikes: migrating ============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:given_daily_likes, {:id=>false, :force=>true})

-> 0.0012s

-- add_index(:given_daily_likes, [:user_id, :given_date], {:unique=>true})

-> 0.0031s

-- add_index(:given_daily_likes, [:limit_reached, :user_id])

-> 0.0024s

-- execute("SELECT value FROM site_settings WHERE name = 'max_likes_per_day'")

-> 0.0003s

-- execute("INSERT INTO given_daily_likes (user_id, likes_given, limit_reached, given_date)n SELECT pa.user_id,n COUNT(*),n CASE WHEN COUNT(*) >= 50 THEN truen ELSE falsen END,n pa.created_at::daten FROM post_actions AS pan WHERE pa.post_action_type_id = 2n AND pa.deleted_at IS NULLn GROUP BY pa.user_id, pa.created_at::date")

-> 0.0007s

== 20160317174357 CreateGivenDailyLikes: migrated (0.0094s) ===================

== 20160317201955 AddIncludeTl0InDigestsToUserOptions: migrating ==============

-- add_column(:user_options, :include_tl0_in_digests, :boolean, {:default=>false})

-> 0.0038s

== 20160317201955 AddIncludeTl0InDigestsToUserOptions: migrated (0.0052s) =====

== 20160321164925 ClosePollsInClosedTopics: migrating =========================

== 20160321164925 ClosePollsInClosedTopics: migrated (0.0216s) ================

== 20160326001747 AddUserFirstVisit: migrating ================================

-- add_column(:users, :first_seen_at, :datetime)

-> 0.0005s

== 20160326001747 AddUserFirstVisit: migrated (0.0019s) =======================

== 20160329101122 RemoveWikiColor: migrating ==================================

-- execute("DELETE FROM color_scheme_colors WHERE name = 'wiki'")

-> 0.0003s

== 20160329101122 RemoveWikiColor: migrated (0.0014s) =========================

== 20160405172827 CreateUserFirsts: migrating =================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:user_firsts, {:force=>true, :id=>:integer})

-> 0.0030s

-- add_index(:user_firsts, [:user_id, :first_type], {:unique=>true})

-> 0.0026s

== 20160405172827 CreateUserFirsts: migrated (0.0070s) ========================

== 20160407160756 RemoveUserFirsts: migrating =================================

-- table_exists?(:user_firsts)

-> 0.0006s

-- drop_table(:user_firsts)

-> 0.0010s

== 20160407160756 RemoveUserFirsts: migrated (0.0034s) ========================

== 20160407180149 CreateOnceoffLogs: migrating ================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:onceoff_logs, {:id=>:integer})

-> 0.0031s

-- add_index(:onceoff_logs, :job_name)

-> 0.0026s

== 20160407180149 CreateOnceoffLogs: migrated (0.0081s) =======================

== 20160408131959 AddShowOnUserCardToUserFields: migrating ====================

-- add_column(:user_fields, :show_on_user_card, :boolean, {:default=>false, :null=>false})

-> 0.0034s

== 20160408131959 AddShowOnUserCardToUserFields: migrated (0.0046s) ===========

== 20160408175727 AddCompiledJsToTranslationOverrides: migrating ==============

-- add_column(:translation_overrides, :compiled_js, :text, {:null=>true})

-> 0.0005s

== 20160408175727 AddCompiledJsToTranslationOverrides: migrated (0.0021s) =====

== 20160418065403 AddBounceKeyToEmailLog: migrating ===========================

-- add_column(:email_logs, :bounce_key, :string)

-> 0.0004s

== 20160418065403 AddBounceKeyToEmailLog: migrated (0.0026s) ==================

== 20160420172330 AddIsAutoGeneratedToIncomingEmails: migrating ===============

-- add_column(:incoming_emails, :is_auto_generated, :boolean, {:default=>false})

-> 0.0041s

== 20160420172330 AddIsAutoGeneratedToIncomingEmails: migrated (0.0067s) ======

== 20160425141954 FixIncomingEmailsIndices: migrating =========================

-- add_index(:incoming_emails, :post_id)

-> 0.0024s

== 20160425141954 FixIncomingEmailsIndices: migrated (0.0052s) ================

== 20160427202222 AddSupportForBouncedEmails: migrating =======================

-- add_column(:email_logs, :bounced, :boolean, {:null=>false, :default=>false})

-> 0.0059s

-- add_column(:incoming_emails, :is_bounce, :boolean, {:null=>false, :default=>false})

-> 0.0072s

-- add_column(:user_stats, :bounce_score, :integer, {:null=>false, :default=>0})

-> 0.0021s

-- add_column(:user_stats, :reset_bounce_score_after, :datetime)

-> 0.0005s

== 20160427202222 AddSupportForBouncedEmails: migrated (0.0176s) ==============

== 20160503205953 CreateTags: migrating =======================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:tags, {:id=>:integer})

-> 0.0117s

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:topic_tags, {:id=>:integer})

-> 0.0025s

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:tag_users, {:id=>:integer})

-> 0.0023s

-- add_index(:tags, :name, {:unique=>true})

-> 0.0025s

-- add_index(:topic_tags, [:topic_id, :tag_id], {:unique=>true})

-> 0.0025s

-- add_index(:tag_users, [:user_id, :tag_id, :notification_level], {:name=>"idx_tag_users_ix1", :unique=>true})

-> 0.0031s

-- add_index(:tag_users, [:tag_id, :user_id, :notification_level], {:name=>"idx_tag_users_ix2", :unique=>true})

-> 0.0024s

== 20160503205953 CreateTags: migrated (0.0296s) ==============================

== 20160514100852 RemoveInvalidTopicUser: migrating ===========================

-- execute(" DELETE FROM topic_usersn USING topic_users tun LEFT JOIN users u ON u.id = tu.user_idn WHERE u.id IS NULLn AND topic_users.id = tu.idn")

-> 0.0009s

== 20160514100852 RemoveInvalidTopicUser: migrated (0.0022s) ==================

== 20160520022627 ShortenTopicCustomFieldsIndex: migrating ====================

-- index_name(:topic_custom_fields, {:column=>:value})

-> 0.0000s

-- index_name_exists?(:topic_custom_fields, "index_topic_custom_fields_on_value")

-> 0.0009s

-- remove_index(:topic_custom_fields, {:column=>:value, :name=>"index_topic_custom_fields_on_value"})

-> 0.0027s

-- add_index(:topic_custom_fields, [:value, :name], {:name=>"topic_custom_fields_value_key_idx", :where=>"value IS NOT NULL AND char_length(value) < 400"})

-> 0.0039s

== 20160520022627 ShortenTopicCustomFieldsIndex: migrated (0.0090s) ===========

== 20160527015355 CorrectMailingListModeFrequency: migrating ==================

-- execute("UPDATE user_options SET mailing_list_mode_frequency = 1 where mailing_list_mode")

-> 0.0004s

== 20160527015355 CorrectMailingListModeFrequency: migrated (0.0015s) =========

== 20160527191614 CreateCategoryTags: migrating ===============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:category_tags, {:id=>:integer})

-> 0.0024s

-- add_index(:category_tags, [:category_id, :tag_id], {:name=>"idx_category_tags_ix1", :unique=>true})

-> 0.0021s

-- add_index(:category_tags, [:tag_id, :category_id], {:name=>"idx_category_tags_ix2", :unique=>true})

-> 0.0021s

== 20160527191614 CreateCategoryTags: migrated (0.0087s) ======================

== 20160530003739 CreateSchedulerStats: migrating =============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:scheduler_stats, {:id=>:integer})

-> 0.0038s

== 20160530003739 CreateSchedulerStats: migrated (0.0073s) ====================

== 20160530203810 AddMessageIdToEmailLogs: migrating ==========================

-- add_column(:email_logs, :message_id, :string)

-> 0.0004s

-- add_index(:email_logs, :message_id)

-> 0.0026s

== 20160530203810 AddMessageIdToEmailLogs: migrated (0.0044s) =================

== 20160602164008 CreateTagGroups: migrating ==================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:tag_groups, {:id=>:integer})

-> 0.0038s

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:tag_group_memberships, {:id=>:integer})

-> 0.0040s

-- add_index(:tag_group_memberships, [:tag_group_id, :tag_id], {:unique=>true})

-> 0.0037s

== 20160602164008 CreateTagGroups: migrated (0.0131s) =========================

== 20160606204319 CreateCategoryTagGroups: migrating ==========================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:category_tag_groups, {:id=>:integer})

-> 0.0022s

-- add_index(:category_tag_groups, [:category_id, :tag_group_id], {:name=>"idx_category_tag_groups_ix1", :unique=>true})

-> 0.0022s

== 20160606204319 CreateCategoryTagGroups: migrated (0.0062s) =================

== 20160607213656 AddTagGroupOptions: migrating ===============================

-- add_column(:tag_groups, :parent_tag_id, :integer)

-> 0.0005s

-- add_column(:tag_groups, :one_per_topic, :boolean, {:default=>false})

-> 0.0036s

== 20160607213656 AddTagGroupOptions: migrated (0.0057s) ======================

== 20160609203508 RemoveTagCountFromTagGroups: migrating ======================

-- remove_column(:tag_groups, :tag_count)

-> 0.0005s

== 20160609203508 RemoveTagCountFromTagGroups: migrated (0.0022s) =============

== 20160615024524 RenameDigestUnsbscribeKeys: migrating =======================

-- rename_table(:digest_unsubscribe_keys, :unsubscribe_keys)

-> 0.0058s

-- add_column(:unsubscribe_keys, :unsubscribe_key_type, :string)

-> 0.0021s

-- add_column(:unsubscribe_keys, :topic_id, :int)

-> 0.0005s

-- add_column(:unsubscribe_keys, :post_id, :int)

-> 0.0003s

-- execute("UPDATE unsubscribe_keys SET unsubscribe_key_type = 'digest' WHERE unsubscribe_key_type IS NULL")

-> 0.0003s

== 20160615024524 RenameDigestUnsbscribeKeys: migrated (0.0124s) ==============

== 20160615165447 RenameNumFlagsToBlockNewUser: migrating =====================

-- execute("update site_settings set name = 'num_spam_flags_to_block_new_user' where name = 'num_flags_to_block_new_user'")

-> 0.0003s

== 20160615165447 RenameNumFlagsToBlockNewUser: migrated (0.0070s) ============

== 20160627104436 UseHttpsNameChangeInSiteSettings: migrating =================

-- execute("UPDATE site_settings SET name = 'force_https' WHERE name = 'use_https'")

-> 0.0003s

== 20160627104436 UseHttpsNameChangeInSiteSettings: migrated (0.0028s) ========

== 20160707195549 AddCompilerVersionToSiteCustomizations: migrating ===========

-- add_column(:site_customizations, :compiler_version, :integer, {:default=>0, :null=>false})

-> 0.0040s

== 20160707195549 AddCompilerVersionToSiteCustomizations: migrated (0.0054s) ==

== 20160716112354 RemoveEditHistoryPublic: migrating ==========================

-- remove_column(:user_options, :edit_history_public)

-> 0.0004s

== 20160716112354 RemoveEditHistoryPublic: migrated (0.0018s) =================

== 20160719002225 AddDeletedPostIndexToPosts: migrating =======================

-- add_index(:posts, [:topic_id, :post_number], {:where=>"deleted_at IS NOT NULL", :name=>"idx_posts_deleted_posts"})

-> 0.0030s

== 20160719002225 AddDeletedPostIndexToPosts: migrated (0.0045s) ==============

== 20160722071221 AddAuthTokenCreatedAtToUsers: migrating =====================

-- add_column(:users, :auth_token_created_at, :datetime, {:null=>true})

-> 0.0005s

== 20160722071221 AddAuthTokenCreatedAtToUsers: migrated (0.0023s) ============

== 20160725015749 RenameAuthTokenCreatedAt: migrating =========================

-- rename_column(:users, :auth_token_created_at, :auth_token_updated_at)

-> 0.0050s

== 20160725015749 RenameAuthTokenCreatedAt: migrated (0.0065s) ================

== 20160727233044 CreateDevelopersTable: migrating ============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:developers, {:id=>:integer})

-> 0.0026s

== 20160727233044 CreateDevelopersTable: migrated (0.0056s) ===================

== 20160815002002 AddUserApiKeys: migrating ===================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:user_api_keys, {:id=>:integer})

-> 0.0042s

-- add_index(:user_api_keys, [:key], {:unique=>true})

-> 0.0036s

-- add_index(:user_api_keys, [:user_id])

-> 0.0024s

-- add_index(:user_api_keys, [:client_id])

-> 0.0018s

== 20160815002002 AddUserApiKeys: migrated (0.0137s) ==========================

== 20160815210156 AddFlairUrlToGroups: migrating ==============================

-- add_column(:groups, :flair_url, :string)

-> 0.0018s

-- add_column(:groups, :flair_bg_color, :string)

-> 0.0006s

== 20160815210156 AddFlairUrlToGroups: migrated (0.0044s) =====================

== 20160816052836 UserApiClientIdIsUnique: migrating ==========================

-- index_name(:user_api_keys, {:column=>[:client_id]})

-> 0.0000s

-- index_name_exists?(:user_api_keys, "index_user_api_keys_on_client_id")

-> 0.0009s

-- remove_index(:user_api_keys, {:column=>[:client_id], :name=>"index_user_api_keys_on_client_id"})

-> 0.0032s

-- add_index(:user_api_keys, [:client_id], {:unique=>true})

-> 0.0029s

== 20160816052836 UserApiClientIdIsUnique: migrated (0.0087s) =================

== 20160816063534 AddRevokedAtToUserApiKeys: migrating ========================

-- add_column(:user_api_keys, :revoked_at, :datetime)

-> 0.0004s

== 20160816063534 AddRevokedAtToUserApiKeys: migrated (0.0027s) ===============

== 20160823171911 AddPathWhitelistToEmbeddableHosts: migrating ================

-- add_column(:embeddable_hosts, :path_whitelist, :string)

-> 0.0005s

== 20160823171911 AddPathWhitelistToEmbeddableHosts: migrated (0.0037s) =======

== 20160826195018 AddFlairColorToGroups: migrating ============================

-- add_column(:groups, :flair_color, :string)

-> 0.0004s

== 20160826195018 AddFlairColorToGroups: migrated (0.0019s) ===================

== 20160905082217 CreateWebHookEventTypes: migrating ==========================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:web_hook_event_types, {:id=>:integer})

-> 0.0025s

== 20160905082217 CreateWebHookEventTypes: migrated (0.0082s) =================

== 20160905082248 CreateWebHooks: migrating ===================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:web_hooks, {:id=>:integer})

-> 0.0050s

== 20160905082248 CreateWebHooks: migrated (0.0071s) ==========================

== 20160905084502 CreateWebHookEvents: migrating ==============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:web_hook_events, {:id=>:integer})

-> 0.0061s

== 20160905084502 CreateWebHookEvents: migrated (0.0078s) =====================

== 20160905085445 CreateJoinTableWebHooksWebHookEventTypes: migrating =========

-- create_join_table(:web_hooks, :web_hook_event_types)

-> 0.0008s

-- add_index(:web_hook_event_types_hooks, [:web_hook_event_type_id, :web_hook_id], {:name=>"idx_web_hook_event_types_hooks_on_ids", :unique=>true})

-> 0.0022s

== 20160905085445 CreateJoinTableWebHooksWebHookEventTypes: migrated (0.0043s)

== 20160905091958 CreateJoinTableWebHooksGroups: migrating ====================

-- create_join_table(:web_hooks, :groups)

-> 0.0009s

-- add_index(:groups_web_hooks, [:web_hook_id, :group_id], {:unique=>true})

-> 0.0026s

== 20160905091958 CreateJoinTableWebHooksGroups: migrated (0.0052s) ===========

== 20160905092148 CreateJoinTableWebHooksCategories: migrating ================

-- create_join_table(:web_hooks, :categories)

-> 0.0019s

-- add_index(:categories_web_hooks, [:web_hook_id, :category_id], {:unique=>true})

-> 0.0045s

== 20160905092148 CreateJoinTableWebHooksCategories: migrated (0.0079s) =======

== 20160906200439 AddViaWizardToColorSchemes: migrating =======================

-- add_column(:color_schemes, :via_wizard, :boolean, {:default=>false, :null=>false})

-> 0.0039s

-- add_column(:color_schemes, :theme_id, :string, {:null=>true})

-> 0.0004s

== 20160906200439 AddViaWizardToColorSchemes: migrated (0.0061s) ==============

== 20160919003141 AddAvatarUrlToFacebookInfo: migrating =======================

-- add_column(:facebook_user_infos, :avatar_url, :string)

-> 0.0004s

== 20160919003141 AddAvatarUrlToFacebookInfo: migrated (0.0023s) ==============

== 20160919054014 AddFieldsToFacebookUserInfo: migrating ======================

-- add_column(:facebook_user_infos, :about_me, :text)

-> 0.0004s

-- add_column(:facebook_user_infos, :location, :string)

-> 0.0003s

-- add_column(:facebook_user_infos, :website, :text)

-> 0.0003s

== 20160919054014 AddFieldsToFacebookUserInfo: migrated (0.0034s) =============

== 20160920165833 AddModeratorToInvites: migrating ============================

-- add_column(:invites, :moderator, :boolean, {:default=>false, :null=>false})

-> 0.0043s

== 20160920165833 AddModeratorToInvites: migrated (0.0069s) ===================

== 20160930123330 AddNotificationLevelWhenReplying: migrating =================

-- add_column(:user_options, :notification_level_when_replying, :integer)

-> 0.0005s

== 20160930123330 AddNotificationLevelWhenReplying: migrated (0.0023s) ========

== 20161010230853 SingleSignOnIncreaseExternalAvatarUrl: migrating ============

-- change_column(:single_sign_on_records, :external_avatar_url, :string, {:limit=>1000})

-> 0.0032s

== 20161010230853 SingleSignOnIncreaseExternalAvatarUrl: migrated (0.0056s) ===

== 20161013012136 AddScopesToUserApiKeys: migrating ===========================

-- add_column(:user_api_keys, :scopes, :text, {:array=>true, :null=>false, :default=>[]})

-> 0.0049s

-- execute("UPDATE user_api_keys SET scopes = scopes ARRAY['write'] WHERE write")

-> 0.0005s

-- execute("UPDATE user_api_keys SET scopes = scopes ARRAY['read'] WHERE read")

-> 0.0002s

-- execute("UPDATE user_api_keys SET scopes = scopes ARRAY['push'] WHERE push")

-> 0.0002s

-- remove_column(:user_api_keys, :read)

-> 0.0003s

-- remove_column(:user_api_keys, :write)

-> 0.0002s

-- remove_column(:user_api_keys, :push)

-> 0.0002s

== 20161013012136 AddScopesToUserApiKeys: migrated (0.0087s) ==================

== 20161014171034 AddDirectoryItemsIndexes: migrating =========================

-- add_index(:directory_items, :likes_received, {:algorithm=>:concurrently})

-> 0.0036s

-- add_index(:directory_items, :likes_given, {:algorithm=>:concurrently})

-> 0.0031s

-- add_index(:directory_items, :topics_entered, {:algorithm=>:concurrently})

-> 0.0029s

-- add_index(:directory_items, :topic_count, {:algorithm=>:concurrently})

-> 0.0024s

-- add_index(:directory_items, :post_count, {:algorithm=>:concurrently})

-> 0.0022s

-- add_index(:directory_items, :posts_read, {:algorithm=>:concurrently})

-> 0.0021s

-- add_index(:directory_items, :days_visited, {:algorithm=>:concurrently})

-> 0.0025s

== 20161014171034 AddDirectoryItemsIndexes: migrated (0.0209s) ================

== 20161025083648 FixCategoryLogoAndBackgroundUrls: migrating =================

== 20161025083648 FixCategoryLogoAndBackgroundUrls: migrated (0.0013s) ========

== 20161029181306 AddImageUrlToPosts: migrating ===============================

-- add_column(:posts, :image_url, :string)

-> 0.0005s

== 20161029181306 AddImageUrlToPosts: migrated (0.0033s) ======================

== 20161031183811 AddSortFieldsToCategories: migrating ========================

-- add_column(:categories, :sort_order, :string)

-> 0.0005s

-- add_column(:categories, :sort_ascending, :boolean)

-> 0.0003s

== 20161031183811 AddSortFieldsToCategories: migrated (0.0025s) ===============

== 20161102024700 AddPostUploadsIndexes: migrating ============================

-- add_index(:post_uploads, :post_id)

-> 0.0022s

-- add_index(:post_uploads, :upload_id)

-> 0.0030s

== 20161102024700 AddPostUploadsIndexes: migrated (0.0068s) ===================

== 20161102024818 AddUploadedAvatarIdIndexToUsers: migrating ==================

-- add_index(:users, :uploaded_avatar_id)

-> 0.0025s

== 20161102024818 AddUploadedAvatarIdIndexToUsers: migrated (0.0044s) =========

== 20161102024838 AddUserAvatarsIndexes: migrating ============================

-- add_index(:user_avatars, :custom_upload_id)

-> 0.0026s

-- add_index(:user_avatars, :gravatar_upload_id)

-> 0.0023s

== 20161102024838 AddUserAvatarsIndexes: migrated (0.0098s) ===================

== 20161102024900 AddUserProfilesIndexes: migrating ===========================

-- add_index(:user_profiles, :profile_background)

-> 0.0025s

-- add_index(:user_profiles, :card_background)

-> 0.0026s

== 20161102024900 AddUserProfilesIndexes: migrated (0.0097s) ==================

== 20161102024920 AddCategoriesIndexes: migrating =============================

-- add_index(:categories, :logo_url)

-> 0.0026s

-- add_index(:categories, :background_url)

-> 0.0019s

== 20161102024920 AddCategoriesIndexes: migrated (0.0060s) ====================

== 20161124020918 AddScoresIndexesToTopTopics: migrating ======================

-- add_index(:top_topics, :daily_score)

-> 0.0024s

-- add_index(:top_topics, :weekly_score)

-> 0.0019s

-- add_index(:top_topics, :monthly_score)

-> 0.0020s

-- add_index(:top_topics, :yearly_score)

-> 0.0018s

-- add_index(:top_topics, :all_score)

-> 0.0019s

== 20161124020918 AddScoresIndexesToTopTopics: migrated (0.0120s) =============

== 20161202011139 AddWhisperSupportToTopics: migrating ========================

-- remove_column(:topics, :bookmark_count)

-> 0.0006s

-- remove_column(:topics, :off_topic_count)

-> 0.0004s

-- remove_column(:topics, :illegal_count)

-> 0.0004s

-- remove_column(:topics, :inappropriate_count)

-> 0.0004s

-- remove_column(:topics, :notify_user_count)

-> 0.0004s

-- add_column(:topics, :highest_staff_post_number, :int, {:default=>0, :null=>false})

-> 0.0078s

-- execute("UPDATE topics SET highest_staff_post_number = highest_post_number")

-> 0.0007s

== 20161202011139 AddWhisperSupportToTopics: migrated (0.0128s) ===============

== 20161202034856 AddUploadsToCategories: migrating ===========================

-- add_column(:categories, :uploaded_logo_id, :integer, {:index=>true})

-> 0.0007s

-- add_column(:categories, :uploaded_background_id, :integer, {:index=>true})

-> 0.0003s

-- transaction()

-> 0.0256s

== 20161202034856 AddUploadsToCategories: migrated (0.0285s) ==================

== 20161205001727 AddTopicColumnsBack: migrating ==============================

-- add_column(:topics, :bookmark_count, :int)

-> 0.0006s

-- add_column(:topics, :off_topic_count, :int)

-> 0.0003s

-- add_column(:topics, :illegal_count, :int)

-> 0.0003s

-- add_column(:topics, :inappropriate_count, :int)

-> 0.0003s

-- add_column(:topics, :notify_user_count, :int)

-> 0.0004s

== 20161205001727 AddTopicColumnsBack: migrated (0.0055s) =====================

== 20161205065743 AddBioToGroups: migrating ===================================

-- add_column(:groups, :bio_raw, :text)

-> 0.0004s

-- add_column(:groups, :bio_cooked, :text)

-> 0.0003s

== 20161205065743 AddBioToGroups: migrated (0.0022s) ==========================

== 20161207030057 AddPublicToGroups: migrating ================================

-- add_column(:groups, :public, :boolean, {:default=>:false, :null=>false})

-> 0.0048s

== 20161207030057 AddPublicToGroups: migrated (0.0105s) =======================

== 20161208064834 CreateGroupHistories: migrating =============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:group_histories, {:id=>:integer})

-> 0.0071s

-- add_index(:group_histories, :group_id)

-> 0.0029s

-- add_index(:group_histories, :acting_user_id)

-> 0.0029s

-- add_index(:group_histories, :target_user_id)

-> 0.0021s

== 20161208064834 CreateGroupHistories: migrated (0.0182s) ====================

== 20161212123649 AddAllowMembershipRequestsToGroups: migrating ===============

-- add_column(:groups, :allow_membership_requests, :boolean, {:default=>false, :null=>false})

-> 0.0050s

== 20161212123649 AddAllowMembershipRequestsToGroups: migrated (0.0073s) ======

== 20161213073938 AddFullNameToGroups: migrating ==============================

-- add_column(:groups, :full_name, :string)

-> 0.0005s

== 20161213073938 AddFullNameToGroups: migrated (0.0026s) =====================

== 20161215201907 MigrateFeaturedLinkFields: migrating ========================

-- add_column(:topics, :featured_link, :string)

-> 0.0006s

-- add_column(:categories, :topic_featured_link_allowed, :boolean, {:default=>true})

-> 0.0073s

== 20161215201907 MigrateFeaturedLinkFields: migrated (0.0092s) ===============

== 20161216101352 AddAllTopicsWikiToCategories: migrating =====================

-- add_column(:categories, :all_topics_wiki, :boolean, {:default=>false, :null=>false})

-> 0.0084s

== 20161216101352 AddAllTopicsWikiToCategories: migrated (0.0100s) ============

== 20170124181409 AddUserAuthTokens: migrating ================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:user_auth_tokens, {:id=>:integer})

-> 0.0036s

-- add_index(:user_auth_tokens, [:auth_token])

-> 0.0020s

-- add_index(:user_auth_tokens, [:prev_auth_token])

-> 0.0020s

-- execute("INSERT INTO user_auth_tokens(user_id, auth_token, prev_auth_token, legacy, updated_at, created_at, rotated_at)nSELECT id, auth_token, auth_token, true, auth_token_updated_at, auth_token_updated_at, auth_token_updated_atnFROM usersnWHERE auth_token_updated_at IS NOT NULL AND auth_token IS NOT NULLn")

-> 0.0007s

== 20170124181409 AddUserAuthTokens: migrated (0.0100s) =======================

== 20170201085745 CreateCustomEmojis: migrating ===============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:custom_emojis, {:id=>:integer})

-> 0.0031s

-- add_index(:custom_emojis, :name, {:unique=>true})

-> 0.0021s

== 20170201085745 CreateCustomEmojis: migrated (0.0077s) ======================

== 20170213180857 AddUserAuthTokenLog: migrating ==============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:user_auth_token_logs, {:id=>:integer})

-> 0.0030s

== 20170213180857 AddUserAuthTokenLog: migrated (0.0071s) =====================

== 20170215151505 AddSeenAtToUserAuthToken: migrating =========================

-- add_column(:user_auth_tokens, :seen_at, :datetime)

-> 0.0004s

== 20170215151505 AddSeenAtToUserAuthToken: migrated (0.0057s) ================

== 20170221204204 AddShowSubcategoryListToCategories: migrating ===============

-- add_column(:categories, :show_subcategory_list, :boolean, {:default=>false})

-> 0.0132s

-- execute("select count(1) from site_settings where name = 'show_subcategory_list' and value = 't'")

-> 0.0004s

== 20170221204204 AddShowSubcategoryListToCategories: migrated (0.0163s) ======

== 20170222173036 MakeUserAuthTokenIndexUnique: migrating =====================

-- index_name(:user_auth_tokens, {:column=>[:auth_token]})

-> 0.0000s

-- index_name_exists?(:user_auth_tokens, "index_user_auth_tokens_on_auth_token")

-> 0.0008s

-- remove_index(:user_auth_tokens, {:column=>[:auth_token], :name=>"index_user_auth_tokens_on_auth_token"})

-> 0.0026s

-- index_name(:user_auth_tokens, {:column=>[:prev_auth_token]})

-> 0.0000s

-- index_name_exists?(:user_auth_tokens, "index_user_auth_tokens_on_prev_auth_token")

-> 0.0007s

-- remove_index(:user_auth_tokens, {:column=>[:prev_auth_token], :name=>"index_user_auth_tokens_on_prev_auth_token"})

-> 0.0019s

-- add_index(:user_auth_tokens, [:auth_token], {:unique=>true})

-> 0.0032s

-- add_index(:user_auth_tokens, [:prev_auth_token], {:unique=>true})

-> 0.0038s

== 20170222173036 MakeUserAuthTokenIndexUnique: migrated (0.0167s) ============

== 20170227211458 AddFeaturedTopicsToCategories: migrating ====================

-- add_column(:categories, :num_featured_topics, :integer, {:default=>3})

-> 0.0079s

-- execute("select value from site_settings where name = 'category_featured_topics' and value != '3'")

-> 0.0003s

== 20170227211458 AddFeaturedTopicsToCategories: migrated (0.0219s) ===========

== 20170301215150 AddDefaultViewToCategories: migrating =======================

-- add_column(:categories, :default_view, :string, {:null=>true, :limit=>50})

-> 0.0005s

== 20170301215150 AddDefaultViewToCategories: migrated (0.0022s) ==============

== 20170303070706 AddIndexToTopicViewItems: migrating =========================

-- add_index(:topic_views, [:user_id, :viewed_at])

-> 0.0027s

== 20170303070706 AddIndexToTopicViewItems: migrated (0.0044s) ================

== 20170307181800 AddPathToUserAuthTokenLog: migrating ========================

-- add_column(:user_auth_token_logs, :path, :string)

-> 0.0005s

== 20170307181800 AddPathToUserAuthTokenLog: migrated (0.0027s) ===============

== 20170308201552 AddSubcategoryListStyleToCategories: migrating ==============

-- add_column(:categories, :subcategory_list_style, :string, {:limit=>50, :default=>"rows_with_featured_topics"})

-> 0.0078s

-- execute("select value from site_settings where name = 'desktop_category_page_style' and value != 'categories_with_featured_topics'")

-> 0.0003s

== 20170308201552 AddSubcategoryListStyleToCategories: migrated (0.0103s) =====

== 20170313192741 AddThemes: migrating ========================================

-- rename_table(:site_customizations, :themes)

-> 0.0081s

-- add_column(:themes, :user_selectable, :bool, {:null=>false, :default=>false})

-> 0.0046s

-- add_column(:themes, :hidden, :bool, {:null=>false, :default=>false})

-> 0.0038s

-- add_column(:themes, :color_scheme_id, :integer)

-> 0.0005s

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:child_themes, {:id=>:integer})

-> 0.0024s

-- add_index(:child_themes, [:parent_theme_id, :child_theme_id], {:unique=>true})

-> 0.0025s

-- add_index(:child_themes, [:child_theme_id, :parent_theme_id], {:unique=>true})

-> 0.0021s

-- execute("DELETE FROM color_schemes WHERE versioned_id IS NOT NULL")

-> 0.0003s

-- remove_column(:color_schemes, :versioned_id)

-> 0.0003s

-- execute("SELECT count(*) FROM themes WHERE enabled")

-> 0.0003s

-- execute("SELECT id FROM color_schemes WHERE enabled")

-> 0.0002s

-- execute("SELECT key, id FROM themes WHERE enabled")

-> 0.0003s

-- remove_column(:themes, :enabled)

-> 0.0003s

-- remove_column(:color_schemes, :enabled)

-> 0.0004s

== 20170313192741 AddThemes: migrated (0.0280s) ===============================

== 20170322065911 CreateTopicStatusUpdates: migrating =========================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:topic_status_updates, {:id=>:integer})

-> 0.0038s

-- add_index(:topic_status_updates, :user_id)

-> 0.0026s

== 20170322065911 CreateTopicStatusUpdates: migrated (0.0086s) ================

== 20170322155537 AddThemeToStylesheetCache: migrating ========================

-- add_column(:stylesheet_cache, :theme_id, :integer, {:default=>-1, :null=>false})

-> 0.0038s

-- add_column(:stylesheet_cache, :source_map, :text)

-> 0.0005s

== 20170322155537 AddThemeToStylesheetCache: migrated (0.0088s) ===============

== 20170322191305 AddDefaultTopPeriodToCategories: migrating ==================

-- add_column(:categories, :default_top_period, :string, {:limit=>20, :default=>"all"})

-> 0.0081s

== 20170322191305 AddDefaultTopPeriodToCategories: migrated (0.0097s) =========

== 20170324032913 MoveAutoCloseColumnsToTopicStatusUpdate: migrating ==========

-- execute("INSERT INTO topic_status_updates(topic_id, user_id, execute_at, status_type, based_on_last_post, created_at, updated_at)nSELECTn t.id,n t.auto_close_user_id,n t.auto_close_at,n 1,n t.auto_close_based_on_last_post,n t.auto_close_started_at,n t.auto_close_started_atnFROM topics tnWHERE t.auto_close_at IS NOT NULLnAND t.auto_close_user_id IS NOT NULLnAND t.auto_close_started_at IS NOT NULLnAND t.deleted_at IS NULLn")

-> 0.0012s

-- execute("WITH selected AS (n SELECT tsp.idn FROM topic_status_updates tspn JOIN topics tn ON t.id = tsp.topic_idn WHERE tsp.execute_at < now()n OR (t.closed AND tsp.execute_at >= now())n)nnUPDATE topic_status_updatesnSET deleted_at = now(), deleted_by_id = -1nWHERE id in (SELECT * FROM selected)n")

-> 0.0009s

== 20170324032913 MoveAutoCloseColumnsToTopicStatusUpdate: migrated (0.0043s) =

== 20170324144456 AmendCssColumnsInTheme: migrating ===========================

-- rename_column(:themes, :stylesheet, :desktop_scss)

-> 0.0021s

-- rename_column(:themes, :mobile_stylesheet, :mobile_scss)

-> 0.0017s

-- rename_column(:themes, :embedded_css, :embedded_scss)

-> 0.0019s

-- add_column(:themes, :common_scss, :text)

-> 0.0004s

-- remove_column(:themes, :stylesheet_baked)

-> 0.0004s

-- remove_column(:themes, :mobile_stylesheet_baked)

-> 0.0003s

-- remove_column(:themes, :embedded_css_baked)

-> 0.0002s

== 20170324144456 AmendCssColumnsInTheme: migrated (0.0141s) ==================

== 20170328163918 BreakUpThemesTable: migrating ===============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:theme_fields, {:id=>:integer})

-> 0.0071s

-- add_index(:theme_fields, [:theme_id, :target, :name], {:unique=>true})

-> 0.0035s

-- execute(" INSERT INTO theme_fields (n theme_id,n target,n name,n value,n created_at,n updated_atn )n SELECT id, 0, 'embedded_scss', embedded_scss, created_at, updated_atn FROM themes WHERE embedded_scss IS NOT NULL AND LENGTH(BTRIM(embedded_scss)) > 0n")

-> 0.0005s

-- remove_column(:themes, "embedded_scss")

-> 0.0003s

-- execute(" INSERT INTO theme_fields (n theme_id,n target,n name,n value,n created_at,n updated_atn )n SELECT id, 0, 'scss', common_scss, created_at, updated_atn FROM themes WHERE common_scss IS NOT NULL AND LENGTH(BTRIM(common_scss)) > 0n")

-> 0.0003s

-- remove_column(:themes, "common_scss")

-> 0.0005s

-- execute(" INSERT INTO theme_fields (n theme_id,n target,n name,n value,n created_at,n updated_atn )n SELECT id, 1, 'scss', desktop_scss, created_at, updated_atn FROM themes WHERE desktop_scss IS NOT NULL AND LENGTH(BTRIM(desktop_scss)) > 0n")

-> 0.0003s

-- remove_column(:themes, "desktop_scss")

-> 0.0003s

-- execute(" INSERT INTO theme_fields (n theme_id,n target,n name,n value,n created_at,n updated_atn )n SELECT id, 2, 'scss', mobile_scss, created_at, updated_atn FROM themes WHERE mobile_scss IS NOT NULL AND LENGTH(BTRIM(mobile_scss)) > 0n")

-> 0.0003s

-- remove_column(:themes, "mobile_scss")

-> 0.0003s

-- execute(" INSERT INTO theme_fields (n theme_id,n target,n name,n value,n created_at,n updated_atn )n SELECT id, 0, 'head_tag', head_tag, created_at, updated_atn FROM themes WHERE head_tag IS NOT NULL AND LENGTH(BTRIM(head_tag)) > 0n")

-> 0.0003s

-- remove_column(:themes, "head_tag")

-> 0.0003s

-- execute(" INSERT INTO theme_fields (n theme_id,n target,n name,n value,n created_at,n updated_atn )n SELECT id, 0, 'body_tag', body_tag, created_at, updated_atn FROM themes WHERE body_tag IS NOT NULL AND LENGTH(BTRIM(body_tag)) > 0n")

-> 0.0003s

-- remove_column(:themes, "body_tag")

-> 0.0003s

-- execute(" INSERT INTO theme_fields (n theme_id,n target,n name,n value,n created_at,n updated_atn )n SELECT id, 1, 'header', header, created_at, updated_atn FROM themes WHERE header IS NOT NULL AND LENGTH(BTRIM(header)) > 0n")

-> 0.0004s

-- remove_column(:themes, "header")

-> 0.0002s

-- execute(" INSERT INTO theme_fields (n theme_id,n target,n name,n value,n created_at,n updated_atn )n SELECT id, 2, 'header', mobile_header, created_at, updated_atn FROM themes WHERE mobile_header IS NOT NULL AND LENGTH(BTRIM(mobile_header)) > 0n")

-> 0.0003s

-- remove_column(:themes, "mobile_header")

-> 0.0003s

-- execute(" INSERT INTO theme_fields (n theme_id,n target,n name,n value,n created_at,n updated_atn )n SELECT id, 1, 'after_header', top, created_at, updated_atn FROM themes WHERE top IS NOT NULL AND LENGTH(BTRIM(top)) > 0n")

-> 0.0003s

-- remove_column(:themes, "top")

-> 0.0003s

-- execute(" INSERT INTO theme_fields (n theme_id,n target,n name,n value,n created_at,n updated_atn )n SELECT id, 2, 'after_header', mobile_top, created_at, updated_atn FROM themes WHERE mobile_top IS NOT NULL AND LENGTH(BTRIM(mobile_top)) > 0n")

-> 0.0003s

-- remove_column(:themes, "mobile_top")

-> 0.0003s

-- execute(" INSERT INTO theme_fields (n theme_id,n target,n name,n value,n created_at,n updated_atn )n SELECT id, 1, 'footer', footer, created_at, updated_atn FROM themes WHERE footer IS NOT NULL AND LENGTH(BTRIM(footer)) > 0n")

-> 0.0003s

-- remove_column(:themes, "footer")

-> 0.0002s

-- execute(" INSERT INTO theme_fields (n theme_id,n target,n name,n value,n created_at,n updated_atn )n SELECT id, 2, 'footer', mobile_footer, created_at, updated_atn FROM themes WHERE mobile_footer IS NOT NULL AND LENGTH(BTRIM(mobile_footer)) > 0n")

-> 0.0003s

-- remove_column(:themes, "mobile_footer")

-> 0.0003s

-- remove_column(:themes, "head_tag_baked")

-> 0.0002s

-- remove_column(:themes, "body_tag_baked")

-> 0.0002s

-- remove_column(:themes, "header_baked")

-> 0.0003s

-- remove_column(:themes, "footer_baked")

-> 0.0003s

-- remove_column(:themes, "mobile_footer_baked")

-> 0.0003s

-- remove_column(:themes, "mobile_header_baked")

-> 0.0003s

== 20170328163918 BreakUpThemesTable: migrated (0.0224s) ======================

== 20170328203122 AddCompilerVersionToThemeFields: migrating ==================

-- add_column(:theme_fields, :compiler_version, :integer, {:null=>false, :default=>0})

-> 0.0081s

== 20170328203122 AddCompilerVersionToThemeFields: migrated (0.0094s) =========

== 20170330041605 AddIndexToTopicStatusUpdates: migrating =====================

-- execute("CREATE UNIQUE INDEX idx_topic_id_status_type_deleted_atnON topic_status_updates(topic_id, status_type)nWHERE deleted_at IS NULLn")

-> 0.0017s

== 20170330041605 AddIndexToTopicStatusUpdates: migrated (0.0101s) ============

== 20170403062717 AddCategoryIdToTopicStatusUpdates: migrating ================

-- add_column(:topic_status_updates, :category_id, :integer)

-> 0.0006s

== 20170403062717 AddCategoryIdToTopicStatusUpdates: migrated (0.0073s) =======

== 20170407154510 RenameThemeId: migrating ====================================

-- rename_column(:color_schemes, :theme_id, :base_scheme_id)

-> 0.0017s

== 20170407154510 RenameThemeId: migrated (0.0057s) ===========================

== 20170410170923 AddThemeRemoteFields: migrating =============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:remote_themes, {:id=>:integer})

-> 0.0034s

-- add_column(:themes, :remote_theme_id, :integer)

-> 0.0006s

-- add_index(:themes, :remote_theme_id, {:unique=>true})

-> 0.0028s

== 20170410170923 AddThemeRemoteFields: migrated (0.0098s) ====================

== 20170413043152 RenameWarnings: migrating ===================================

-- rename_table(:warnings, :user_warnings)

-> 0.0052s

== 20170413043152 RenameWarnings: migrated (0.0066s) ==========================

== 20170417164715 AddThemeIdToColorScheme: migrating ==========================

-- add_column(:color_schemes, :theme_id, :int)

-> 0.0004s

== 20170417164715 AddThemeIdToColorScheme: migrated (0.0017s) =================

== 20170419193714 AddErrorToThemeFields: migrating ============================

-- add_column(:theme_fields, :error, :string)

-> 0.0005s

== 20170419193714 AddErrorToThemeFields: migrated (0.0019s) ===================

== 20170420163628 AddDefaultNotificationLevelToGroup: migrating ===============

-- add_column(:groups, :default_notification_level, :integer, {:default=>3, :null=>false})

-> 0.0045s

-- execute("UPDATE groups SET default_notification_level = 2 WHERE id = 2")

-> 0.0004s

== 20170420163628 AddDefaultNotificationLevelToGroup: migrated (0.0069s) ======

== 20170425083011 AddDeletedAtToTopicEmbeds: migrating ========================

-- add_column(:topic_embeds, :deleted_at, :datetime)

-> 0.0005s

-- add_column(:topic_embeds, :deleted_by_id, :integer, {:null=>true})

-> 0.0005s

== 20170425083011 AddDeletedAtToTopicEmbeds: migrated (0.0022s) ===============

== 20170425172415 AddErrorToSchedulerStats: migrating =========================

-- add_column(:scheduler_stats, :error, :text)

-> 0.0004s

== 20170425172415 AddErrorToSchedulerStats: migrated (0.0017s) ================

== 20170501191912 AddUploadIdToThemeFields: migrating =========================

-- index_name(:theme_fields, {:column=>[:theme_id, :target, :name]})

-> 0.0000s

-- index_name_exists?(:theme_fields, "index_theme_fields_on_theme_id_and_target_and_name")

-> 0.0008s

-- remove_index(:theme_fields, {:column=>[:theme_id, :target, :name], :name=>"index_theme_fields_on_theme_id_and_target_and_name"})

-> 0.0023s

-- rename_column(:theme_fields, :target, :target_id)

-> 0.0013s

-- add_column(:theme_fields, :target, :integer)

-> 0.0004s

-- execute("UPDATE theme_fields SET target = target_id")

-> 0.0003s

-- change_column(:theme_fields, :name, :string, {:null=>false, :limit=>30})

-> 0.0028s

-- add_column(:theme_fields, :upload_id, :integer)

-> 0.0003s

-- add_column(:theme_fields, :type_id, :integer, {:null=>false, :default=>0})

-> 0.0047s

-- add_index(:theme_fields, [:theme_id, :target_id, :type_id, :name], {:unique=>true, :name=>"theme_field_unique_index"})

-> 0.0027s

-- execute("UPDATE theme_fields SET type_id = 1 WHERE name IN ('scss', 'embedded_scss')")

-> 0.0004s

== 20170501191912 AddUploadIdToThemeFields: migrated (0.0184s) ================

== 20170505035229 MigrateMailingListDailyUpdatesUsersToDailySummary: migrating

-- change_column_default(:user_options, :mailing_list_mode_frequency, 1)

-> 0.0051s

-- execute("UPDATE user_optionsnSET digest_after_minutes = 1440, email_digests = 't', mailing_list_mode = 'f'nWHERE mailing_list_mode_frequency = 0 AND mailing_list_moden")

-> 0.0003s

== 20170505035229 MigrateMailingListDailyUpdatesUsersToDailySummary: migrated (0.0067s)

== 20170508183819 AddCssClassNameToEmbeddableHosts: migrating =================

-- add_column(:embeddable_hosts, :class_name, :string)

-> 0.0005s

== 20170508183819 AddCssClassNameToEmbeddableHosts: migrated (0.0018s) ========

== 20170511071355 RemoveConvertPastedImageSiteSetting: migrating ==============

-- execute("DELETE FROM site_settings WHERE name = 'convert_pasted_images_to_hq_jpg'")

-> 0.0003s

== 20170511071355 RemoveConvertPastedImageSiteSetting: migrated (0.0016s) =====

== 20170511080007 RenameConvertPastedImagesQualitySiteSetting: migrating ======

-- execute("UPDATE site_settings SET name = 'png_to_jpg_quality' WHERE name = 'convert_pasted_images_quality'")

-> 0.0003s

== 20170511080007 RenameConvertPastedImagesQualitySiteSetting: migrated (0.0028s)

== 20170511184842 RenameTopicStatusUpdatesToTopicTimers: migrating ============

-- rename_table(:topic_status_updates, :topic_timers)

-> 0.0200s

== 20170511184842 RenameTopicStatusUpdatesToTopicTimers: migrated (0.0280s) ===

== 20170512153318 AddThemeKeyToUserOptions: migrating =========================

-- add_column(:user_options, :theme_key, :string)

-> 0.0025s

== 20170512153318 AddThemeKeyToUserOptions: migrated (0.0042s) ================

== 20170512185227 CreateTopicStatusUpdatesAgain: migrating ====================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:topic_status_updates, {:id=>:integer})

-> 0.0025s

== 20170512185227 CreateTopicStatusUpdatesAgain: migrated (0.0049s) ===========

== 20170515152725 AddThemeKeySeqToUserOptions: migrating ======================

-- add_column(:user_options, :theme_key_seq, :integer, {:null=>false, :default=>0})

-> 0.0038s

== 20170515152725 AddThemeKeySeqToUserOptions: migrated (0.0052s) =============

== 20170515203721 AddPublicTypeToTopicTimers: migrating =======================

-- add_column(:topic_timers, :public_type, :boolean, {:default=>true})

-> 0.0038s

-- execute("DROP INDEX IF EXISTS idx_topic_id_status_type_deleted_at")

-> 0.0003s

-- execute("CREATE UNIQUE INDEX idx_topic_id_public_type_deleted_atnON topic_timers (topic_id)nWHERE public_type = TRUEnAND deleted_at IS NULLn")

-> 0.0008s

== 20170515203721 AddPublicTypeToTopicTimers: migrated (0.0067s) ==============

== 20170524182846 AddUnreadTrackingColumns: migrating =========================

== 20170524182846 AddUnreadTrackingColumns: migrated (0.0015s) ================

== 20170526125321 DropUnreadTrackingColumns: migrating ========================

== 20170526125321 DropUnreadTrackingColumns: migrated (0.0042s) ===============

== 20170602132735 FixGroupAllowMembershipRequests: migrating ==================

-- execute("UPDATE groups gnSET allow_membership_requests = 'f'nWHERE NOT EXISTS (SELECT 1 FROM group_users gu WHERE gu.owner = 't' AND gu.group_id = g.id LIMIT 1)n")

-> 0.0007s

== 20170602132735 FixGroupAllowMembershipRequests: migrated (0.0028s) =========

== 20170605014820 RemoveAutoCloseColumnsFromTopics: migrating =================

== 20170605014820 RemoveAutoCloseColumnsFromTopics: migrated (0.0034s) ========

== 20170609115401 AddExtensionToTopicLinks: migrating =========================

-- add_column(:topic_links, :extension, :string, {:limit=>10})

-> 0.0005s

-- add_index(:topic_links, :extension)

-> 0.0028s

== 20170609115401 AddExtensionToTopicLinks: migrated (0.0065s) ================

== 20170628152322 CreateWatchedWords: migrating ===============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:watched_words, {:id=>:integer})

-> 0.0029s

-- add_index(:watched_words, [:action, :word], {:unique=>true})

-> 0.0021s

== 20170628152322 CreateWatchedWords: migrated (0.0065s) ======================

== 20170630083540 AddCustomMessageToInvite: migrating =========================

-- add_column(:invites, :custom_message, :text)

-> 0.0005s

== 20170630083540 AddCustomMessageToInvite: migrated (0.0025s) ================

== 20170703115216 AddExtensionToUploads: migrating ============================

-- add_column(:uploads, :extension, :string, {:limit=>10})

-> 0.0004s

-- execute("CREATE INDEX index_uploads_on_extension ON uploads(lower(extension))")

-> 0.0009s

== 20170703115216 AddExtensionToUploads: migrated (0.0041s) ===================

== 20170703144855 AddVisibilityLevelToGroups: migrating =======================

-- add_column(:groups, :visibility_level, :integer, {:default=>0, :null=>false})

-> 0.0057s

-- execute("UPDATE groupsnSET visibility_level = 1nWHERE NOT visiblen")

-> 0.0007s

-- remove_column(:groups, :visible)

-> 0.0005s

== 20170703144855 AddVisibilityLevelToGroups: migrated (0.0094s) ==============

== 20170704142141 AddVisibleBackToGroups: migrating ===========================

-- add_column(:groups, :visible, :boolean, {:default=>true, :null=>false})

-> 0.0045s

-- execute("UPDATE groups set visible = false where visibility_level > 0")

-> 0.0004s

== 20170704142141 AddVisibleBackToGroups: migrated (0.0069s) ==================

== 20170713164357 CreateSearchLogs: migrating =================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:search_logs, {:id=>:integer})

-> 0.0035s

== 20170713164357 CreateSearchLogs: migrated (0.0050s) ========================

== 20170717084947 CreateUserEmails: migrating =================================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:user_emails, {:id=>:integer})

-> 0.0032s

-- add_index(:user_emails, :user_id)

-> 0.0020s

-- add_index(:user_emails, [:user_id, :primary], {:unique=>true})

-> 0.0022s

-- execute("CREATE UNIQUE INDEX index_user_emails_on_email ON user_emails (lower(email));")

-> 0.0010s

-- execute("INSERT INTO user_emails (n id,n user_id,n email,n "primary",n created_at,n updated_atn) SELECTn id,n id,n email,n 'TRUE',n created_at,n updated_atnFROM usersn")

-> 0.0004s

-- change_column_null(:users, :email, true)

-> 0.0004s

== 20170717084947 CreateUserEmails: migrated (0.0112s) ========================

== 20170725075535 CorrectDefaultEmailMailingListModeFrequency: migrating ======

-- execute("UPDATE site_settings SET value = '1' WHERE value = '0' AND name = 'default_email_mailing_list_mode_frequency';")

-> 0.0003s

== 20170725075535 CorrectDefaultEmailMailingListModeFrequency: migrated (0.0023s)

== 20170728012754 SplitPublicInGroups: migrating ==============================

-- add_column(:groups, :public_exit, :boolean, {:default=>false, :null=>false})

-> 0.0059s

-- add_column(:groups, :public_admission, :boolean, {:default=>false, :null=>false})

-> 0.0045s

== 20170728012754 SplitPublicInGroups: migrated (0.0159s) =====================

== 20170728054115 RemovePublicFromGroups: migrating ===========================

== 20170728054115 RemovePublicFromGroups: migrated (0.0063s) ==================

== 20170731075604 AddMembershipRequestTemplateToGroups: migrating =============

-- add_column(:groups, :membership_request_template, :text)

-> 0.0005s

== 20170731075604 AddMembershipRequestTemplateToGroups: migrated (0.0017s) ====

== 20170803123704 AddVersionToSearchData: migrating ===========================

-- add_column(:post_search_data, :version, :integer, {:default=>0})

-> 0.0049s

-- add_column(:topic_search_data, :version, :integer, {:default=>0})

-> 0.0038s

-- add_column(:category_search_data, :version, :integer, {:default=>0})

-> 0.0041s

-- add_column(:user_search_data, :version, :integer, {:default=>0})

-> 0.0037s

== 20170803123704 AddVersionToSearchData: migrated (0.0188s) ==================

== 20170818191909 SplitAliasLevels: migrating =================================

-- add_column(:groups, :messageable_level, :integer, {:default=>0})

-> 0.0059s

-- add_column(:groups, :mentionable_level, :integer, {:default=>0})

-> 0.0048s

-- execute("UPDATE groups SET messageable_level = alias_level, mentionable_level = alias_level")

-> 0.0003s

== 20170818191909 SplitAliasLevels: migrated (0.0132s) ========================

== 20170823173427 CreateTagSearchData: migrating ==============================

-- adapter_name()

-> 0.0000s

-- adapter_name()

-> 0.0000s

-- create_table(:tag_search_data, {:primary_key=>:tag_id, :id=>:integer})

-> 0.0037s

-- execute("create index idx_search_tag on tag_search_data using gin(search_data)")

-> 0.0005s

== 20170823173427 CreateTagSearchData: migrated (0.0055s) =====================

== 20170824172615 AddSlugIndexOnTopic: migrating ==============================

-- execute("CREATE INDEX idxTopicSlug ON topics(slug) WHERE deleted_at IS NULL AND slug IS NOT NULL")

-> 0.0013s

== 20170824172615 AddSlugIndexOnTopic: migrated (0.0050s) =====================

== 20170831180419 RemoveWhisperTopicLinks: migrating ==========================

-- execute(" DELETE FROM topic_linksn USING topic_links tln LEFT JOIN posts p ON p.id = tl.post_idn WHERE p.post_type = 4n AND topic_links.id = tl.idn")

-> 0.0012s

== 20170831180419 RemoveWhisperTopicLinks: migrated (0.0028s) =================

== 20171003180951 RenameForgotPasswordStrictSetting: migrating ================

-- execute("UPDATE site_settings SET name = 'hide_email_address_taken' WHERE name = 'forgot_password_strict'")

-> 0.0003s

== 20171003180951 RenameForgotPasswordStrictSetting: migrated (0.0037s) =======

== 20171006030028 AddAllowPrivateMessagesToUserOptions: migrating =============

-- add_column(:user_options, :allow_private_messages, :boolean, {:default=>true, :null=>false})

-> 0.0037s

== 20171006030028 AddAllowPrivateMessagesToUserOptions: migrated (0.0069s) ====

== 20171026014317 AddUserOptionHome: migrating ================================

-- add_column(:user_options, :homepage_id, :integer, {:null=>true, :default=>nil})

-> 0.0008s

== 20171026014317 AddUserOptionHome: migrated (0.0032s) =======================

== 20171107020512 DropEmailFromUsers: migrating ===============================

== 20171107020512 DropEmailFromUsers: migrated (0.0078s) ======================

== 20171110174413 RenameBlockedSilence: migrating =============================

-- add_column(:users, :silenced, :boolean, {:default=>false, :null=>false})

-> 0.0120s

-- execute("UPDATE users set silenced = blocked")

-> 0.0007s

-- execute("UPDATE site_settings SET name='notify_mods_when_user_silenced' where name='notify_mods_when_user_blocked'")

-> 0.0004s

-- execute("UPDATE site_settings SET name='auto_silence_fast_typers_on_first_post' where name='auto_block_fast_typers_on_first_post'")

-> 0.0003s

-- execute("UPDATE site_settings SET name='auto_silence_fast_typers_max_trust_level' where name='auto_block_fast_typers_max_trust_level'")

-> 0.0003s

-- execute("UPDATE site_settings SET name='auto_silence_first_post_regex' where name='auto_block_first_post_regex'")

-> 0.0003s

-- execute("UPDATE site_settings SET name='num_spam_flags_to_silence_new_user' where name='num_spam_flags_to_block_new_user'")

-> 0.0003s

-- execute("UPDATE site_settings SET name='num_users_to_silence_new_user' where name='num_users_to_block_new_user'")

-> 0.0002s

-- execute("UPDATE site_settings SET name='num_tl3_flags_to_silence_new_user' where name='num_tl3_flags_to_block_new_user'")

-> 0.0002s

-- execute("UPDATE site_settings SET name='num_tl3_users_to_silence_new_user' where name='num_tl3_users_to_block_new_user'")

-> 0.0002s

== 20171110174413 RenameBlockedSilence: migrated (0.0164s) ====================

== 20171113175414 AddSilencedTillToUsers: migrating ===========================

-- add_column(:users, :silenced_till, :timestamp, {:null=>true})

-> 0.0006s

-- execute("UPDATE usersn SET silenced_till = CURRENT_TIMESTAMP + INTERVAL '1000 YEAR'n WHERE silencedn")

-> 0.0007s

== 20171113175414 AddSilencedTillToUsers: migrated (0.0027s) ==================

== 20171113214725 AddTimeReadToUserVisits: migrating ==========================

-- add_column(:user_visits, :time_read, :integer, {:null=>false, :default=>0})

-> 0.0050s

-- add_index(:user_visits, [:user_id, :visited_at, :time_read])

-> 0.0025s

== 20171113214725 AddTimeReadToUserVisits: migrated (0.0088s) =================

== 20171115170858 AddMailinglistMirrorToCategories: migrating =================

-- add_column(:categories, :mailinglist_mirror, :boolean, {:default=>false, :null=>false})

-> 0.0073s

== 20171115170858 AddMailinglistMirrorToCategories: migrated (0.0095s) ========

== 20171123200157 AddTrustLevelLocksToUsers: migrating ========================

-- add_column(:users, :group_locked_trust_level, :integer, {:null=>true})

-> 0.0005s

-- add_column(:users, :manual_locked_trust_level, :integer, {:null=>true})

-> 0.0003s

-- execute("UPDATE users SET manual_locked_trust_level = trust_level WHERE trust_level_lockedn")

-> 0.0005s

-- execute("UPDATE users SET group_locked_trust_level = x.tlnFROM users AS unINNER JOIN (n SELECT gu.user_id, MAX(g.grant_trust_level) AS tln FROM group_users AS gun INNER JOIN groups AS g ON gu.group_id = g.idn WHERE g.grant_trust_level IS NOT NULLn GROUP BY gu.user_idn) AS x ON x.user_id = u.idnWHERE users.id = u.idn")

-> 0.0013s

== 20171123200157 AddTrustLevelLocksToUsers: migrated (0.0047s) ===============

== 20171128172835 RenameClickedTopicIdToSearchResultId: migrating =============

-- rename_column(:search_logs, :clicked_topic_id, :search_result_id)

-> 0.0014s

-- add_column(:search_logs, :search_result_type, :integer, {:null=>true})

-> 0.0004s

-- execute("UPDATE search_logs SET search_result_type = 1 WHERE search_result_id is NOT NULL")

-> 0.0003s

== 20171128172835 RenameClickedTopicIdToSearchResultId: migrated (0.0035s) ====

== 20171213105921 ReplaceInviteMailerTranslationOverride: migrating ===========

-- execute("UPDATE translation_overridesnSET value = replace(value, '%{invitee_name}', '%{inviter_name}')nWHERE translation_key IN ('invite_mailer.subject_template', 'invite_mailer.text_body_template',n 'invite_forum_mailer.subject_template', 'invite_forum_mailer.text_body_template',n 'custom_invite_mailer.subject_template', 'custom_invite_mailer.text_body_template',n 'custom_invite_forum_mailer.subject_template', 'custom_invite_forum_mailer.text_body_template');n")

-> 0.0004s

== 20171213105921 ReplaceInviteMailerTranslationOverride: migrated (0.0047s) ==

== 20171214040346 AddEmailToTwitterUserInfo: migrating ========================

-- add_column(:twitter_user_infos, :email, :string, {:limit=>1000, :null=>true})

-> 0.0005s

== 20171214040346 AddEmailToTwitterUserInfo: migrated (0.0021s) ===============

== 20171228122834 ReplaceBlockedSilenceTranslation: migrating =================

-- execute("UPDATE translation_overridesnSET translation_key = 'system_messages.silenced_by_staff.subject_template'nWHERE translation_key = 'system_messages.blocked_by_staff.subject_template'nAND NOT EXISTS (SELECT 1 FROM translation_overrides WHERE translation_key = 'system_messages.silenced_by_staff.subject_template');n")

-> 0.0013s

-- execute("UPDATE translation_overridesnSET translation_key = 'system_messages.silenced_by_staff.text_body_template'nWHERE translation_key = 'system_messages.blocked_by_staff.text_body_template'nAND NOT EXISTS (SELECT 1 FROM translation_overrides WHERE translation_key = 'system_messages.silenced_by_staff.text_body_template');n")

-> 0.0003s

== 20171228122834 ReplaceBlockedSilenceTranslation: migrated (0.0029s) ========

== Seed from /tmp/d20180111-47-1xcu7g3/opt/discourse/db/fixtures/001_categories.rb

== Seed from /tmp/d20180111-47-1xcu7g3/opt/discourse/db/fixtures/002_groups.rb

== Seed from /tmp/d20180111-47-1xcu7g3/opt/discourse/db/fixtures/003_post_action_types.rb

- PostActionType {:id=>1, :name_key=>"bookmark", :is_flag=>false, :position=>1}

- PostActionType {:id=>2, :name_key=>"like", :is_flag=>false, :icon=>"heart", :position=>2}

- PostActionType {:id=>3, :name_key=>"off_topic", :is_flag=>true, :position=>3}

- PostActionType {:id=>4, :name_key=>"inappropriate", :is_flag=>true, :position=>4}

- PostActionType {:id=>5, :name_key=>"vote", :is_flag=>false, :position=>5}

- PostActionType {:id=>8, :name_key=>"spam", :is_flag=>true, :position=>6}

- PostActionType {:id=>6, :name_key=>"notify_user", :is_flag=>true, :position=>7}

- PostActionType {:id=>7, :name_key=>"notify_moderators", :is_flag=>true, :position=>8}

== Seed from /tmp/d20180111-47-1xcu7g3/opt/discourse/db/fixtures/004_screened_ip_addresses.rb

- ScreenedIpAddress {:id=>1, :ip_address=>"10.0.0.0/8", :action_type=>2}

- ScreenedIpAddress {:id=>2, :ip_address=>"192.168.0.0/16", :action_type=>2}

- ScreenedIpAddress {:id=>3, :ip_address=>"127.0.0.0/8", :action_type=>2}

- ScreenedIpAddress {:id=>4, :ip_address=>"172.16.0.0/12", :action_type=>2}

- ScreenedIpAddress {:id=>5, :ip_address=>"fc00::/7", :action_type=>2}

== Seed from /tmp/d20180111-47-1xcu7g3/opt/discourse/db/fixtures/005_badge_types.rb

- BadgeType {:id=>1, :name=>"Gold"}

- BadgeType {:id=>2, :name=>"Silver"}

- BadgeType {:id=>3, :name=>"Bronze"}

== Seed from /tmp/d20180111-47-1xcu7g3/opt/discourse/db/fixtures/006_badges.rb

- BadgeGrouping {:id=>1, :name=>"Getting Started", :default_position=>10}

- BadgeGrouping {:id=>2, :name=>"Community", :default_position=>11}

- BadgeGrouping {:id=>3, :name=>"Posting", :default_position=>12}

- BadgeGrouping {:id=>4, :name=>"Trust Level", :default_position=>13}

- BadgeGrouping {:id=>5, :name=>"Other", :default_position=>14}

- Badge {:id=>1, :name=>"Basic User", :badge_type_id=>3, :query=>"n SELECT u.id user_id, current_timestamp granted_at FROM users un WHERE trust_level >= 1 AND (n :backfill OR u.id IN (:user_ids)n )n ", :default_badge_grouping_id=>4, :trigger=>4, :default_allow_title=>false, :default_icon=>"fa-user", :system=>true}

- Badge {:id=>2, :name=>"Member", :badge_type_id=>3, :query=>"n SELECT u.id user_id, current_timestamp granted_at FROM users un WHERE trust_level >= 2 AND (n :backfill OR u.id IN (:user_ids)n )n ", :default_badge_grouping_id=>4, :trigger=>4, :default_allow_title=>false, :default_icon=>"fa-user", :system=>true}

- Badge {:id=>3, :name=>"Regular", :badge_type_id=>2, :query=>"n SELECT u.id user_id, current_timestamp granted_at FROM users un WHERE trust_level >= 3 AND (n :backfill OR u.id IN (:user_ids)n )n ", :default_badge_grouping_id=>4, :trigger=>4, :default_allow_title=>true, :default_icon=>"fa-user", :system=>true}

- Badge {:id=>4, :name=>"Leader", :badge_type_id=>1, :query=>"n SELECT u.id user_id, current_timestamp granted_at FROM users un WHERE trust_level >= 4 AND (n :backfill OR u.id IN (:user_ids)n )n ", :default_badge_grouping_id=>4, :trigger=>4, :default_allow_title=>true, :default_icon=>"fa-user", :system=>true}

- Badge {:id=>17, :name=>"Reader", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>false, :show_posts=>false, :query=>" SELECT id user_id, current_timestamp granted_atn FROM usersn WHERE id INn (n SELECT pt.user_idn FROM post_timings ptn JOIN badge_posts b ON b.post_number = pt.post_number ANDn b.topic_id = pt.topic_idn JOIN topics t ON t.id = pt.topic_idn LEFT JOIN user_badges ub ON ub.badge_id = 17 AND ub.user_id = pt.user_idn WHERE ub.id IS NULL AND t.posts_count > 100n GROUP BY pt.user_id, pt.topic_id, t.posts_countn HAVING count(*) >= t.posts_countn )n", :default_badge_grouping_id=>1, :auto_revoke=>false, :system=>true}

- Badge {:id=>16, :name=>"Read Guidelines", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>false, :show_posts=>false, :query=>" SELECT user_id, read_faq granted_atn FROM user_statsn WHERE read_faq IS NOT NULL AND (user_id IN (:user_ids) OR :backfill)n", :default_badge_grouping_id=>1, :trigger=>8, :system=>true}

- Badge {:id=>14, :name=>"First Link", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>true, :show_posts=>true, :query=>" SELECT l.user_id, l.post_id, l.created_at granted_atn FROMn (n SELECT MIN(l1.id) idn FROM topic_links l1n JOIN badge_posts p1 ON p1.id = l1.post_idn JOIN badge_posts p2 ON p2.id = l1.link_post_idn WHERE NOT reflection AND p1.topic_id <> p2.topic_id AND not quote ANDn (:backfill OR ( p1.id in (:post_ids) ))n GROUP BY l1.user_idn ) idsn JOIN topic_links l ON l.id = ids.idn", :default_badge_grouping_id=>1, :trigger=>2, :system=>true}

- Badge {:id=>15, :name=>"First Quote", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>true, :show_posts=>true, :query=>" SELECT ids.user_id, q.post_id, q.created_at granted_atn FROMn (n SELECT p1.user_id, MIN(q1.id) idn FROM quoted_posts q1n JOIN badge_posts p1 ON p1.id = q1.post_idn JOIN badge_posts p2 ON p2.id = q1.quoted_post_idn WHERE (:backfill OR ( p1.id IN (:post_ids) ))n GROUP BY p1.user_idn ) idsn JOIN quoted_posts q ON q.id = ids.idn", :default_badge_grouping_id=>1, :trigger=>2, :system=>true}

- Badge {:id=>11, :name=>"First Like", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>true, :show_posts=>true, :query=>" SELECT pa1.user_id, pa1.created_at granted_at, pa1.post_idn FROM (n SELECT pa.user_id, min(pa.id) idn FROM post_actions pan JOIN badge_posts p on p.id = pa.post_idn WHERE post_action_type_id = 2 ANDn (:backfill OR pa.post_id IN (:post_ids) )n GROUP BY pa.user_idn ) xn JOIN post_actions pa1 on pa1.id = x.idn", :default_badge_grouping_id=>1, :trigger=>1, :system=>true}

- Badge {:id=>13, :name=>"First Flag", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>true, :show_posts=>false, :query=>" SELECT pa1.user_id, pa1.created_at granted_at, pa1.post_idn FROM (n SELECT pa.user_id, min(pa.id) idn FROM post_actions pan JOIN badge_posts p on p.id = pa.post_idn WHERE post_action_type_id IN (3,4,8) ANDn (:backfill OR pa.post_id IN (:post_ids) )n GROUP BY pa.user_idn ) xn JOIN post_actions pa1 on pa1.id = x.idn", :badge_grouping_id=>1, :default_badge_grouping_id=>1, :trigger=>1, :auto_revoke=>false, :system=>true}

- Badge {:id=>25, :name=>"Promoter", :default_icon=>"fa-user-plus", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>false, :show_posts=>false, :query=>"n SELECT u.id user_id, current_timestamp granted_atn FROM users un WHERE u.id IN (n SELECT invited_by_idn FROM invites in JOIN users u2 ON u2.id = i.user_idn WHERE i.deleted_at IS NULL AND u2.active AND u2.trust_level >= 0 AND u2.silenced_till IS NULLn GROUP BY invited_by_idn HAVING COUNT(*) >= 1n ) AND u.active AND u.silenced_till IS NULL AND u.id > 0 ANDn (:backfill OR u.id IN (:user_ids) )n ", :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>true, :system=>true}

- Badge {:id=>26, :name=>"Campaigner", :default_icon=>"fa-user-plus", :badge_type_id=>2, :multiple_grant=>false, :target_posts=>false, :show_posts=>false, :query=>"n SELECT u.id user_id, current_timestamp granted_atn FROM users un WHERE u.id IN (n SELECT invited_by_idn FROM invites in JOIN users u2 ON u2.id = i.user_idn WHERE i.deleted_at IS NULL AND u2.active AND u2.trust_level >= 1 AND u2.silenced_till IS NULLn GROUP BY invited_by_idn HAVING COUNT(*) >= 3n ) AND u.active AND u.silenced_till IS NULL AND u.id > 0 ANDn (:backfill OR u.id IN (:user_ids) )n ", :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>true, :system=>true}

- Badge {:id=>27, :name=>"Champion", :default_icon=>"fa-user-plus", :badge_type_id=>1, :multiple_grant=>false, :target_posts=>false, :show_posts=>false, :query=>"n SELECT u.id user_id, current_timestamp granted_atn FROM users un WHERE u.id IN (n SELECT invited_by_idn FROM invites in JOIN users u2 ON u2.id = i.user_idn WHERE i.deleted_at IS NULL AND u2.active AND u2.trust_level >= 2 AND u2.silenced_till IS NULLn GROUP BY invited_by_idn HAVING COUNT(*) >= 5n ) AND u.active AND u.silenced_till IS NULL AND u.id > 0 ANDn (:backfill OR u.id IN (:user_ids) )n ", :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>true, :system=>true}

- Badge {:id=>12, :name=>"First Share", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>true, :show_posts=>true, :query=>" SELECT views.user_id, i2.post_id, i2.created_at granted_atn FROMn (n SELECT i.user_id, MIN(i.id) i_idn FROM incoming_links in JOIN badge_posts p on p.id = i.post_idn WHERE i.user_id IS NOT NULLn GROUP BY i.user_idn ) as viewsn JOIN incoming_links i2 ON i2.id = views.i_idn", :default_badge_grouping_id=>1, :trigger=>0, :system=>true}

- Badge {:id=>21, :name=>"Nice Share", :badge_type_id=>3, :multiple_grant=>true, :target_posts=>true, :show_posts=>true, :query=>" SELECT views.user_id, i2.post_id, current_timestamp granted_atn FROMn (n SELECT i.user_id, MIN(i.id) i_idn FROM incoming_links in JOIN badge_posts p on p.id = i.post_idn WHERE i.user_id IS NOT NULLn GROUP BY i.user_id,i.post_idn HAVING COUNT(*) > 25n ) as viewsn JOIN incoming_links i2 ON i2.id = views.i_idn", :default_badge_grouping_id=>2, :trigger=>0, :system=>true}

- Badge {:id=>22, :name=>"Good Share", :badge_type_id=>2, :multiple_grant=>true, :target_posts=>true, :show_posts=>true, :query=>" SELECT views.user_id, i2.post_id, current_timestamp granted_atn FROMn (n SELECT i.user_id, MIN(i.id) i_idn FROM incoming_links in JOIN badge_posts p on p.id = i.post_idn WHERE i.user_id IS NOT NULLn GROUP BY i.user_id,i.post_idn HAVING COUNT(*) > 300n ) as viewsn JOIN incoming_links i2 ON i2.id = views.i_idn", :default_badge_grouping_id=>2, :trigger=>0, :system=>true}

- Badge {:id=>23, :name=>"Great Share", :badge_type_id=>1, :multiple_grant=>true, :target_posts=>true, :show_posts=>true, :query=>" SELECT views.user_id, i2.post_id, current_timestamp granted_atn FROMn (n SELECT i.user_id, MIN(i.id) i_idn FROM incoming_links in JOIN badge_posts p on p.id = i.post_idn WHERE i.user_id IS NOT NULLn GROUP BY i.user_id,i.post_idn HAVING COUNT(*) > 1000n ) as viewsn JOIN incoming_links i2 ON i2.id = views.i_idn", :default_badge_grouping_id=>2, :trigger=>0, :system=>true}

- Badge {:id=>5, :name=>"Welcome", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>true, :show_posts=>true, :query=>" SELECT p.user_id, min(post_id) post_id, min(pa.created_at) granted_atn FROM post_actions pan JOIN badge_posts p on p.id = pa.post_idn WHERE post_action_type_id = 2 ANDn (:backfill OR pa.post_id IN (:post_ids) )n GROUP BY p.user_idn", :default_badge_grouping_id=>2, :trigger=>1, :system=>true}

- Badge {:id=>9, :name=>"Autobiographer", :badge_type_id=>3, :multiple_grant=>false, :query=>" SELECT u.id user_id, current_timestamp granted_atn FROM users un JOIN user_profiles up on u.id = up.user_idn WHERE bio_raw IS NOT NULL AND LENGTH(TRIM(bio_raw)) > 10 ANDn uploaded_avatar_id IS NOT NULL ANDn (:backfill OR u.id IN (:user_ids) )n", :default_badge_grouping_id=>1, :trigger=>8, :system=>true}

- Badge {:id=>10, :name=>"Editor", :badge_type_id=>3, :multiple_grant=>false, :query=>" SELECT p.user_id, min(p.id) post_id, min(p.created_at) granted_atn FROM badge_posts pn WHERE p.self_edits > 0 ANDn (:backfill OR p.id IN (:post_ids) )n GROUP BY p.user_idn", :badge_grouping_id=>1, :default_badge_grouping_id=>1, :trigger=>2, :system=>true}

- Badge {:id=>6, :name=>"Nice Post", :badge_type_id=>3, :multiple_grant=>true, :target_posts=>true, :show_posts=>true, :query=>"n SELECT p.user_id, p.id post_id, p.updated_at granted_atn FROM badge_posts pn WHERE p.post_number > 1 AND p.like_count >= 10 ANDn (:backfill OR p.id IN (:post_ids) )n ", :default_badge_grouping_id=>3, :trigger=>1, :system=>true}

- Badge {:id=>7, :name=>"Good Post", :badge_type_id=>2, :multiple_grant=>true, :target_posts=>true, :show_posts=>true, :query=>"n SELECT p.user_id, p.id post_id, p.updated_at granted_atn FROM badge_posts pn WHERE p.post_number > 1 AND p.like_count >= 25 ANDn (:backfill OR p.id IN (:post_ids) )n ", :default_badge_grouping_id=>3, :trigger=>1, :system=>true}

- Badge {:id=>8, :name=>"Great Post", :badge_type_id=>1, :multiple_grant=>true, :target_posts=>true, :show_posts=>true, :query=>"n SELECT p.user_id, p.id post_id, p.updated_at granted_atn FROM badge_posts pn WHERE p.post_number > 1 AND p.like_count >= 50 ANDn (:backfill OR p.id IN (:post_ids) )n ", :default_badge_grouping_id=>3, :trigger=>1, :system=>true}

- Badge {:id=>18, :name=>"Nice Topic", :badge_type_id=>3, :multiple_grant=>true, :target_posts=>true, :show_posts=>true, :query=>"n SELECT p.user_id, p.id post_id, p.updated_at granted_atn FROM badge_posts pn WHERE p.post_number = 1 AND p.like_count >= 10 ANDn (:backfill OR p.id IN (:post_ids) )n ", :default_badge_grouping_id=>3, :trigger=>1, :system=>true}

- Badge {:id=>19, :name=>"Good Topic", :badge_type_id=>2, :multiple_grant=>true, :target_posts=>true, :show_posts=>true, :query=>"n SELECT p.user_id, p.id post_id, p.updated_at granted_atn FROM badge_posts pn WHERE p.post_number = 1 AND p.like_count >= 25 ANDn (:backfill OR p.id IN (:post_ids) )n ", :default_badge_grouping_id=>3, :trigger=>1, :system=>true}

- Badge {:id=>20, :name=>"Great Topic", :badge_type_id=>1, :multiple_grant=>true, :target_posts=>true, :show_posts=>true, :query=>"n SELECT p.user_id, p.id post_id, p.updated_at granted_atn FROM badge_posts pn WHERE p.post_number = 1 AND p.like_count >= 50 ANDn (:backfill OR p.id IN (:post_ids) )n ", :default_badge_grouping_id=>3, :trigger=>1, :system=>true}

- Badge {:id=>24, :name=>"Anniversary", :default_icon=>"fa-clock-o", :badge_type_id=>2, :default_badge_grouping_id=>2, :query=>nil, :trigger=>0, :auto_revoke=>false, :system=>true, :multiple_grant=>true}

- Badge {:id=>28, :name=>"Popular Link", :badge_type_id=>3, :multiple_grant=>true, :target_posts=>true, :show_posts=>true, :query=>" SELECT tl.user_id, post_id, current_timestamp granted_atn FROM topic_links tln JOIN posts p ON p.id = post_id AND p.deleted_at IS NULLn JOIN topics t ON t.id = p.topic_id AND t.deleted_at IS NULL AND t.archetype <> 'private_message'n WHERE NOT tl.internaln AND tl.clicks >= 50n GROUP BY tl.user_id, tl.post_idn", :badge_grouping_id=>3, :default_badge_grouping_id=>3, :trigger=>0, :system=>true}

- Badge {:id=>29, :name=>"Hot Link", :badge_type_id=>2, :multiple_grant=>true, :target_posts=>true, :show_posts=>true, :query=>" SELECT tl.user_id, post_id, current_timestamp granted_atn FROM topic_links tln JOIN posts p ON p.id = post_id AND p.deleted_at IS NULLn JOIN topics t ON t.id = p.topic_id AND t.deleted_at IS NULL AND t.archetype <> 'private_message'n WHERE NOT tl.internaln AND tl.clicks >= 300n GROUP BY tl.user_id, tl.post_idn", :badge_grouping_id=>3, :default_badge_grouping_id=>3, :trigger=>0, :system=>true}

- Badge {:id=>30, :name=>"Famous Link", :badge_type_id=>1, :multiple_grant=>true, :target_posts=>true, :show_posts=>true, :query=>" SELECT tl.user_id, post_id, current_timestamp granted_atn FROM topic_links tln JOIN posts p ON p.id = post_id AND p.deleted_at IS NULLn JOIN topics t ON t.id = p.topic_id AND t.deleted_at IS NULL AND t.archetype <> 'private_message'n WHERE NOT tl.internaln AND tl.clicks >= 1000n GROUP BY tl.user_id, tl.post_idn", :badge_grouping_id=>3, :default_badge_grouping_id=>3, :trigger=>0, :system=>true}

- Badge {:id=>36, :name=>"Appreciated", :default_icon=>"fa-heart", :badge_type_id=>3, :query=>" SELECT p.user_id, current_timestamp AS granted_atn FROM posts AS pn WHERE p.like_count >= 1n AND (:backfill OR p.user_id IN (:user_ids))n GROUP BY p.user_idn HAVING count(*) > 20n", :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>false, :system=>true}

- Badge {:id=>37, :name=>"Respected", :default_icon=>"fa-heart", :badge_type_id=>2, :query=>" SELECT p.user_id, current_timestamp AS granted_atn FROM posts AS pn WHERE p.like_count >= 2n AND (:backfill OR p.user_id IN (:user_ids))n GROUP BY p.user_idn HAVING count(*) > 100n", :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>false, :system=>true}

- Badge {:id=>31, :name=>"Admired", :default_icon=>"fa-heart", :badge_type_id=>1, :query=>" SELECT p.user_id, current_timestamp AS granted_atn FROM posts AS pn WHERE p.like_count >= 5n AND (:backfill OR p.user_id IN (:user_ids))n GROUP BY p.user_idn HAVING count(*) > 300n", :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>false, :system=>true}

- Badge {:id=>38, :name=>"Thank You", :default_icon=>"fa-heart", :badge_type_id=>3, :query=>" SELECT us.user_id, current_timestamp AS granted_atn FROM user_stats AS usn INNER JOIN posts AS p ON p.user_id = us.user_idn WHERE p.like_count > 0n AND us.likes_given >= 10n AND (:backfill OR us.user_id IN (:user_ids))n GROUP BY us.user_id, us.likes_givenn HAVING COUNT(*) > 20n", :badge_grouping_id=>2, :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>false, :system=>true}

- Badge {:id=>32, :name=>"Gives Back", :default_icon=>"fa-heart", :badge_type_id=>2, :query=>" SELECT us.user_id, current_timestamp AS granted_atn FROM user_stats AS usn INNER JOIN posts AS p ON p.user_id = us.user_idn WHERE p.like_count > 0n AND us.likes_given >= 100n AND (:backfill OR us.user_id IN (:user_ids))n GROUP BY us.user_id, us.likes_givenn HAVING COUNT(*) > 100n", :badge_grouping_id=>2, :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>false, :system=>true}

- Badge {:id=>39, :name=>"Empathetic", :default_icon=>"fa-heart", :badge_type_id=>1, :query=>" SELECT us.user_id, current_timestamp AS granted_atn FROM user_stats AS usn INNER JOIN posts AS p ON p.user_id = us.user_idn WHERE p.like_count > 0n AND us.likes_given >= 1000n AND (:backfill OR us.user_id IN (:user_ids))n GROUP BY us.user_id, us.likes_givenn HAVING COUNT(*) > 500n", :badge_grouping_id=>2, :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>false, :system=>true}

- Badge {:id=>33, :name=>"Out of Love", :default_icon=>"fa-heart", :badge_type_id=>3, :query=>" SELECT gdl.user_id, current_timestamp AS granted_atn FROM given_daily_likes AS gdln WHERE gdl.limit_reachedn AND (:backfill OR gdl.user_id IN (:user_ids))n GROUP BY gdl.user_idn HAVING COUNT(*) >= 1n", :badge_grouping_id=>2, :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>false, :system=>true}

- Badge {:id=>34, :name=>"Higher Love", :default_icon=>"fa-heart", :badge_type_id=>2, :query=>" SELECT gdl.user_id, current_timestamp AS granted_atn FROM given_daily_likes AS gdln WHERE gdl.limit_reachedn AND (:backfill OR gdl.user_id IN (:user_ids))n GROUP BY gdl.user_idn HAVING COUNT(*) >= 5n", :badge_grouping_id=>2, :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>false, :system=>true}

- Badge {:id=>35, :name=>"Crazy in Love", :default_icon=>"fa-heart", :badge_type_id=>1, :query=>" SELECT gdl.user_id, current_timestamp AS granted_atn FROM given_daily_likes AS gdln WHERE gdl.limit_reachedn AND (:backfill OR gdl.user_id IN (:user_ids))n GROUP BY gdl.user_idn HAVING COUNT(*) >= 20n", :badge_grouping_id=>2, :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>false, :system=>true}

- Badge {:id=>40, :name=>"First Mention", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>true, :show_posts=>true, :query=>" SELECT acting_user_id AS user_id, min(target_post_id) AS post_id, min(p.created_at) AS granted_atn FROM user_actionsn JOIN posts p ON p.id = target_post_idn JOIN topics t ON t.id = topic_idn JOIN categories c on c.id = category_idn WHERE action_type = 7n AND NOT read_restrictedn AND p.deleted_at IS NULLn AND t.deleted_at IS NULLn AND t.visiblen AND t.archetype <> 'private_message'n AND (:backfill OR p.id IN (:post_ids))n GROUP BY acting_user_idn", :badge_grouping_id=>1, :default_badge_grouping_id=>1, :trigger=>2, :system=>true}

- Badge {:id=>41, :name=>"First Emoji", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>true, :show_posts=>true, :query=>nil, :badge_grouping_id=>1, :default_badge_grouping_id=>1, :trigger=>0, :system=>true}

- Badge {:id=>42, :name=>"First Onebox", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>true, :show_posts=>true, :query=>nil, :badge_grouping_id=>1, :default_badge_grouping_id=>1, :trigger=>0, :system=>true}

- Badge {:id=>43, :name=>"First Reply By Email", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>true, :show_posts=>true, :query=>nil, :badge_grouping_id=>1, :default_badge_grouping_id=>1, :trigger=>0, :system=>true}

- Badge {:id=>44, :name=>"New User of the Month", :badge_type_id=>3, :multiple_grant=>false, :target_posts=>false, :show_posts=>false, :query=>nil, :badge_grouping_id=>1, :default_badge_grouping_id=>1, :trigger=>0, :system=>true}

- Badge {:id=>45, :name=>"Enthusiast", :default_icon=>"fa-eye", :badge_type_id=>3, :query=>"WITH consecutive_visits AS (n SELECT user_idn , visited_atn , visited_at - (DENSE_RANK() OVER (PARTITION BY user_id ORDER BY visited_at))::int sn FROM user_visitsn), visits AS (n SELECT user_idn , MIN(visited_at) "start"n , DENSE_RANK() OVER (PARTITION BY user_id ORDER BY s) "rank"n FROM consecutive_visitsnGROUP BY user_id, sn HAVING COUNT(*) >= 10n)nSELECT user_idn , "start" + interval '10 days' "granted_at"n FROM visitsn WHERE "rank" = 1n", :badge_grouping_id=>2, :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>false, :system=>true}

- Badge {:id=>46, :name=>"Aficionado", :default_icon=>"fa-eye", :badge_type_id=>2, :query=>"WITH consecutive_visits AS (n SELECT user_idn , visited_atn , visited_at - (DENSE_RANK() OVER (PARTITION BY user_id ORDER BY visited_at))::int sn FROM user_visitsn), visits AS (n SELECT user_idn , MIN(visited_at) "start"n , DENSE_RANK() OVER (PARTITION BY user_id ORDER BY s) "rank"n FROM consecutive_visitsnGROUP BY user_id, sn HAVING COUNT(*) >= 100n)nSELECT user_idn , "start" + interval '100 days' "granted_at"n FROM visitsn WHERE "rank" = 1n", :badge_grouping_id=>2, :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>false, :system=>true}

- Badge {:id=>47, :name=>"Devotee", :default_icon=>"fa-eye", :badge_type_id=>1, :query=>"WITH consecutive_visits AS (n SELECT user_idn , visited_atn , visited_at - (DENSE_RANK() OVER (PARTITION BY user_id ORDER BY visited_at))::int sn FROM user_visitsn), visits AS (n SELECT user_idn , MIN(visited_at) "start"n , DENSE_RANK() OVER (PARTITION BY user_id ORDER BY s) "rank"n FROM consecutive_visitsnGROUP BY user_id, sn HAVING COUNT(*) >= 365n)nSELECT user_idn , "start" + interval '365 days' "granted_at"n FROM visitsn WHERE "rank" = 1n", :badge_grouping_id=>2, :default_badge_grouping_id=>2, :trigger=>0, :auto_revoke=>false, :system=>true}

== Seed from /tmp/d20180111-47-1xcu7g3/opt/discourse/db/fixtures/007_web_hook_event_types.rb

- WebHookEventType {:id=>1, :name=>"topic"}

- WebHookEventType {:id=>2, :name=>"post"}

- WebHookEventType {:id=>3, :name=>"user"}

== Seed from /tmp/d20180111-47-1xcu7g3/opt/discourse/db/fixtures/009_users.rb

- UserEmail {:id=>-1, :email=>"no_email", :primary=>true, :user_id=>-1}> Seeding dark and light themes

- User {:id=>-1, :name=>"system", :username=>"system", :username_lower=>"system", :password=>"f2afbbe588f0c7e31e32e661cbab2b0c", :active=>true, :admin=>true, :moderator=>true, :approved=>true, :trust_level=>4}

== Seed from /tmp/d20180111-47-1xcu7g3/opt/discourse/db/fixtures/500_lounge_category.rb

== Seed from /tmp/d20180111-47-1xcu7g3/opt/discourse/db/fixtures/501_meta_category.rb

== Seed from /tmp/d20180111-47-1xcu7g3/opt/discourse/db/fixtures/502_staff_category.rb

== Seed from /tmp/d20180111-47-1xcu7g3/opt/discourse/db/fixtures/600_themes.rb

== Seed from /tmp/d20180111-47-1xcu7g3/opt/discourse/db/fixtures/999_delayed.rb

== Seed from /tmp/d20180111-47-1xcu7g3/opt/discourse/db/fixtures/999_settings.rb

== Seed from /tmp/d20180111-47-1xcu7g3/opt/discourse/db/fixtures/999_topics.rb

Seeding welcome topics

== Seed from /tmp/d20180111-47-1xcu7g3/opt/discourse/plugins/discourse-narrative-bot/db/fixtures/001_discobot.rb

- UserEmail {:id=>-2, :email=>"discobot_email", :primary=>true, :user_id=>-2}

- User {:id=>-2, :name=>"discobot", :username=>"discobot", :username_lower=>"discobot", :password=>"e23e85746717e5013e64bb6f7612dfbe", :active=>true, :approved=>true, :trust_level=>4}

optipng worker: `optipng` not found; please provide proper binary or disable this worker (--no-optipng argument or `:optipng => false` through options)

jhead worker: `jhead` not found, `jpegtran` not found; please provide proper binary or disable this worker (--no-jhead argument or `:jhead => false` through options)

jpegoptim worker: `jpegoptim` not found; please provide proper binary or disable this worker (--no-jpegoptim argument or `:jpegoptim => false` through options)

gifsicle worker: `gifsicle` not found; please provide proper binary or disable this worker (--no-gifsicle argument or `:gifsicle => false` through options)

svgo worker: `svgo` not found; please provide proper binary or disable this worker (--no-svgo argument or `:svgo => false` through options)

== Seed from /tmp/d20180111-47-1xcu7g3/opt/discourse/plugins/discourse-narrative-bot/db/fixtures/002_badges.rb

Running overwritten assets:precompile task...

Asset precompilation completed (27.84s)

Cleaning assets

Running: rake assets:clean

fatal: Not a git repository (or any of the parent directories): .git

-----> Running hook: "/tmp/after_hook20180111-47-efvwih.sh"

-----> Uploading packages

PACKAGE: discourse_1.9.1-1515702628.298ed7ee.trusty_amd64.deb (161.81 MiB)

-----> DONE in 483s