AMD64
Ruby: 3.2.2
Git
Scroll to End of Log
0.00s0.14s0.09s0.06sTopworker_info1Worker information2hostname: a0d31c64-3651-4435-9206-adeff90637ab@1.worker-n2-com-779d777f7b-hxsb6.gce-production-13version: 6.2.22 https://github.com/travis-ci/worker/tree/858cb91994a513269f2fe9782c15fc113e9662314instance: travis-job-07fd6181-8df9-46b8-9a12-8a89cf8c041e travis-ci-sardonyx-xenial-1684402799-0876f6f0 (via amqp)5startup: 6.297978546ssystem_info7Build system information8Build language: ruby9Build dist: xenial10Build id: 26915957211Job id: 61842892012Runtime kernel version: 4.15.0-1098-gcp13travis-build version: f3de9fb714Build image provisioning date and time15Thu May 18 10:07:51 UTC 202316Operating System Details17Distributor ID: Ubuntu18Description: Ubuntu 16.04.7 LTS19Release: 16.0420Codename: xenial21Systemd Version22systemd 22923Cookbooks Version24d19e5ff https://github.com/travis-ci/travis-cookbooks/tree/d19e5ff25git version26git version 2.40.127bash version28GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)29gcc version30gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 2016060931docker version32Client: Docker Engine - Community33 Version: 20.10.734 API version: 1.4135 Go version: go1.13.1536 Git commit: f0df35037 Built: Wed Jun 2 11:56:47 202138 OS/Arch: linux/amd6439 Context: default40 Experimental: true42Server: Docker Engine - Community43 Engine:44 Version: 20.10.745 API version: 1.41 (minimum version 1.12)46 Go version: go1.13.1547 Git commit: b0f5bc348 Built: Wed Jun 2 11:54:58 202149 OS/Arch: linux/amd6450 Experimental: false51 containerd:52 Version: 1.4.653 GitCommit: d71fcd7d8303cbf684402823e425e9dd2e99285d54 runc:55 Version: 1.0.0-rc9556 GitCommit: b9ee9c6314599f1b4a7f497e1f1f856fe433d3b757 docker-init:58 Version: 0.19.059 GitCommit: de40ad060clang version61clang version 7.0.0 (tags/RELEASE_700/final)62jq version63jq-1.664bats version65Bats 0.4.066shellcheck version670.7.268shfmt version69v3.2.170ccache version713.2.472cmake version73cmake version 3.26.374heroku version75heroku/8.1.3 linux-x64 node-v16.19.076imagemagick version77Version: ImageMagick 6.8.9-9 Q16 x86_64 2020-12-04 http://www.imagemagick.org78md5deep version794.480mercurial version81version 5.9.382mysql version83mysql Ver 14.14 Distrib 5.7.33, for Linux (x86_64) using EditLine wrapper84openssl version85OpenSSL 1.0.2g 1 Mar 201686packer version871.7.588postgresql client version89psql (PostgreSQL) 10.17 (Ubuntu 10.17-1.pgdg16.04+1)90ragel version91Ragel State Machine Compiler version 6.8 Feb 201392sudo version931.8.1694gzip version95gzip 1.696zip version97Zip 3.098vim version99VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Oct 13 2020 16:04:38)100iptables version101iptables v1.6.0102curl version103curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 librtmp/2.3104wget version105GNU Wget 1.17.1 built on linux-gnu.106rsync version107rsync version 3.1.1 protocol version 31108gimme version109v1.5.4110nvm version1110.39.3112perlbrew version113/home/travis/perl5/perlbrew/bin/perlbrew - App::perlbrew/0.95114phpenv version115rbenv 1.2.0116rvm version117rvm 1.29.12 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]118default ruby version119ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a) [x86_64-linux]120default python version121Python 3.7.13122CouchDB version123couchdb 1.6.1124ElasticSearch version1257.16.3126Installed Firefox version127firefox 63.0.1128MongoDB version129MongoDB 4.4.21130PhantomJS version1312.1.1132Pre-installed PostgreSQL versions1339.4.261349.5.251359.6.22136Redis version137redis-server 6.0.6138Pre-installed Go versions1391.18.4140ant version141Apache Ant(TM) version 1.9.6 compiled on July 20 2018142mvn version143Apache Maven 3.8.8 (4c87b05d9aedce574290d1acc98575ed5eb6cd39)144gradle version145Gradle 7.5.1!146lein version147Leiningen 2.10.0 on Java 11.0.15.1 OpenJDK 64-Bit Server VM148Pre-installed Node.js versions149v10.24.1150v12.22.12151v14.21.3152v16.15153v16.16.0154v16.20.0155v18.16.0156v4.9.1157v6.17.1158v8.17.0159phpenv versions160 system161 7.4162* 7.4.30 (set by /home/travis/.phpenv/version)163 hhvm-stable164 hhvm165composer --version166Composer version 2.3.7 2022-06-06 16:43:28167Pre-installed Ruby versions168ruby-2.7.6169ruby-3.0.4170ruby-3.1.21730.00s0.02s0.00s0.01s0.31s0.00s0.00s0.00s0.01s0.00s0.09s0.00s0.92s0.00s0.12s6.03s0.00s3.63s0.00s2.55sdocker_mtu_and_registry_mirrorsresolvconfsnap174Installing 1 Snaps1762024-02-28T05:16:07Z INFO Waiting for automatic snapd restart...177core 16-2.61.1 from Canonical* installed179docker (beta) 24.0.5 from Canonical** installed181Name Version Rev Tracking Publisher Notes182core 16-2.61.1 16574 latest/stable canonical** core183core22 20240111 1122 latest/stable canonical** base184docker 24.0.5 2915 latest/beta canonical** -git.checkout1900.01s0.65s$ git clone --depth=50 https://github.com/travis-ci/travis-migrations.git travis-ci/travis-migrations191Cloning into 'travis-ci/travis-migrations'...192$ cd travis-ci/travis-migrations194From https://github.com/travis-ci/travis-migrations195 * branch refs/pull/285/merge -> FETCH_HEAD196$ git checkout -qf FETCH_HEAD1980.01s199Setting environment variables from repository settings200$ export QUAY_ROBOT_HANDLE=[secure]201$ export QUAY_ROBOT_TOKEN=[secure]202$ export ARTIFACTS_BUCKET=travis-migrations-structure-dumps203$ export ARTIFACTS_SECRET=[secure]204$ export ARTIFACTS_KEY=[secure]rvm207Downloading https://get.rvm.io208Downloading https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer.asc209Verifying /home/travis/.rvm/archives/rvm-installer.asc210gpg: Signature made Tue 21 Feb 2023 11:35:16 PM UTC using RSA key ID 39499BDB211gpg: Good signature from "Piotr Kuczynski <piotr.kuczynski@gmail.com>" [unknown]212gpg: WARNING: This key is not certified with a trusted signature!213gpg: There is no indication that the signature belongs to the owner.214Primary key fingerprint: 7D2B AF1C F37B 13E2 069D 6956 105B D0E7 3949 9BDB215GPG verified '/home/travis/.rvm/archives/rvm-installer'216Downloading https://github.com/rvm/rvm/archive/master.tar.gz217Upgrading the RVM installation in /home/travis/.rvm/218 RVM PATH line found in /home/travis/.mkshrc /home/travis/.profile /home/travis/.zshrc.219 RVM PATH line not found for Bash, rerun this command with '--auto-dotfiles' flag to fix it.220 RVM sourcing line found in /home/travis/.profile /home/travis/.bashrc /home/travis/.zlogin.221Upgrade of RVM in /home/travis/.rvm/ is complete.223<warn>Thanks for installing RVM 🙏</warn>224Please consider donating to our open collective to help us maintain RVM.226👉 Donate: <code>https://opencollective.com/rvm/donate</code>229RVM reloaded!231curl: (22) The requested URL returned error: 404 Not Found232Required ruby-3.2.2 is not installed - installing.233curl: (22) The requested URL returned error: 404 Not Found234Searching for binary rubies, this might take some time.235Found remote file https://rubies.travis-ci.org/ubuntu/16.04/x86_64/ruby-3.2.2.tar.bz2236Checking requirements for ubuntu.237Requirements installation successful.238ruby-3.2.2 - #configure239ruby-3.2.2 - #download240 % Total % Received % Xferd Average Speed Time Time Time Current241 Dload Upload Total Spent Left Speed242 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0243100 27.9M 100 27.9M 0 0 13.5M 0 0:00:02 0:00:02 --:--:-- 39.2M244No checksum for downloaded archive, recording checksum in user configuration.245ruby-3.2.2 - #validate archive246ruby-3.2.2 - #extract247ruby-3.2.2 - #validate binary248ruby-3.2.2 - #setup249ruby-3.2.2 - #gemset created /home/travis/.rvm/gems/ruby-3.2.2@global250ruby-3.2.2 - #importing gemset /home/travis/.rvm/gemsets/global.gems..................................253ruby-3.2.2 - #gemset created /home/travis/.rvm/gems/ruby-3.2.2256Using /home/travis/.rvm/gems/ruby-3.2.2258$ export BUNDLE_GEMFILE=$PWD/Gemfilecache.1259Setting up build cache260$ export CASHER_DIR=${TRAVIS_HOME}/.casher263fetching PR.285/cache--linux-xenial-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855--rvm-3.2.2--gemfile-Gemfile.tgz264fetching PR.285/cache-linux-xenial-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855--rvm-3.2.2--gemfile-Gemfile.tgz265fetching PR.285/cache--rvm-3.2.2--gemfile-Gemfile.tgz266fetching prd-ruby-upgrade/cache--linux-xenial-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855--rvm-3.2.2--gemfile-Gemfile.tgz267fetching prd-ruby-upgrade/cache-linux-xenial-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855--rvm-3.2.2--gemfile-Gemfile.tgz268fetching prd-ruby-upgrade/cache--rvm-3.2.2--gemfile-Gemfile.tgz269fetching master/cache--linux-xenial-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855--rvm-3.2.2--gemfile-Gemfile.tgz270fetching master/cache-linux-xenial-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855--rvm-3.2.2--gemfile-Gemfile.tgz271fetching master/cache--rvm-3.2.2--gemfile-Gemfile.tgz272could not download cache274creating directory /home/travis/build/travis-ci/travis-migrations/vendor/bundleruby.versions277$ ruby --version278ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]279$ rvm --version280rvm 1.29.12-next (master) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]281$ bundle --version282Bundler version 2.4.10283$ gem --version2843.4.10install.bundler290[DEPRECATED] The `--deployment` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set --local deployment 'true'`, and stop using this flag291Bundler 2.4.17 is running, but your lockfile was generated with 2.4.14. Installing Bundler 2.4.14 and restarting using that version.292Fetching gem metadata from https://rubygems.org/.293Fetching bundler 2.4.14294Installing bundler 2.4.14295[DEPRECATED] The `--deployment` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set --local deployment 'true'`, and stop using this flag296Fetching gem metadata from https://rubygems.org/.........297Fetching rake 13.0.6298Installing rake 13.0.6299Fetching concurrent-ruby 1.2.2300Fetching builder 3.2.4301Fetching minitest 5.18.1302Installing builder 3.2.4303Fetching erubi 1.12.0304Installing minitest 5.18.1305Fetching racc 1.7.1306Installing erubi 1.12.0307Fetching crass 1.0.6308Installing racc 1.7.1 with native extensions309Installing crass 1.0.6310Fetching rack 2.2.7311Installing concurrent-ruby 1.2.2312Installing rack 2.2.7313Fetching nio4r 2.5.9314Fetching websocket-extensions 0.1.5315Installing websocket-extensions 0.1.5316Fetching marcel 1.0.2317Installing nio4r 2.5.9 with native extensions318Installing marcel 1.0.2319Fetching mini_mime 1.1.2320Installing mini_mime 1.1.2321Using date 3.3.3322Fetching timeout 0.4.0323Installing timeout 0.4.0324Fetching ansi 1.5.0325Installing ansi 1.5.0326Fetching ast 2.4.2327Installing ast 2.4.2328Fetching aws-eventstream 1.2.0329Installing aws-eventstream 1.2.0330Fetching aws-partitions 1.783.0331Installing aws-partitions 1.783.0332Fetching jmespath 1.6.2333Installing jmespath 1.6.2334Using bundler 2.4.14335Fetching colored 1.2336Installing colored 1.2337Fetching diff-lcs 1.5.0338Installing diff-lcs 1.5.0339Fetching docile 1.4.0340Installing docile 1.4.0341Using json 2.6.3342Fetching language_server-protocol 3.17.0.3343Installing language_server-protocol 3.17.0.3344Fetching method_source 1.0.0345Installing method_source 1.0.0346Fetching parallel 1.23.0347Installing parallel 1.23.0348Fetching pg 1.5.3349Installing pg 1.5.3 with native extensions350Fetching thor 1.2.2351Installing thor 1.2.2352Fetching zeitwerk 2.6.8353Installing zeitwerk 2.6.8354Fetching rainbow 3.1.1355Installing rainbow 3.1.1356Fetching regexp_parser 2.8.1357Installing regexp_parser 2.8.1358Fetching rexml 3.2.5359Installing rexml 3.2.5360Fetching routes 0.2.0361Installing routes 0.2.0362Fetching rspec-support 3.12.1363Installing rspec-support 3.12.1364Fetching ruby-progressbar 1.13.0365Installing ruby-progressbar 1.13.0366Fetching unicode-display_width 2.4.2367Installing unicode-display_width 2.4.2368Fetching simplecov-html 0.12.3369Installing simplecov-html 0.12.3370Fetching simplecov_json_formatter 0.1.4371Installing simplecov_json_formatter 0.1.4372Fetching i18n 1.14.1373Installing i18n 1.14.1374Fetching tzinfo 2.0.6375Installing tzinfo 2.0.6376Fetching rack-test 2.1.0377Installing rack-test 2.1.0378Fetching websocket-driver 0.7.5379Installing websocket-driver 0.7.5 with native extensions380Using net-protocol 0.2.1381Fetching aws-sigv4 1.6.0382Installing aws-sigv4 1.6.0383Fetching rake-notes 0.2.2384Installing rake-notes 0.2.2385Fetching nokogiri 1.15.2 (x86_64-linux)386Installing nokogiri 1.15.2 (x86_64-linux)387Fetching parser 3.2.2.3388Installing parser 3.2.2.3389Fetching rspec-core 3.12.2390Fetching rspec-expectations 3.12.3391Installing rspec-expectations 3.12.3392Installing rspec-core 3.12.2393Fetching rspec-mocks 3.12.5394Fetching terminal-table 3.0.2395Installing terminal-table 3.0.2396Installing rspec-mocks 3.12.5397Fetching simplecov 0.22.0398Fetching activesupport 7.0.6399Installing simplecov 0.22.0400Fetching net-imap 0.3.6401Installing activesupport 7.0.6402Installing net-imap 0.3.6403Fetching net-pop 0.1.2404Fetching net-smtp 0.3.3405Installing net-smtp 0.3.3406Installing net-pop 0.1.2407Fetching loofah 2.21.3408Fetching aws-sdk-core 3.176.1409Installing loofah 2.21.3410Fetching rubocop-ast 1.29.0411Installing aws-sdk-core 3.176.1412Installing rubocop-ast 1.29.0413Fetching rspec 3.12.0414Fetching simplecov-console 0.9.1415Installing rspec 3.12.0416Fetching rails-dom-testing 2.1.1417Installing simplecov-console 0.9.1418Fetching globalid 1.1.0419Installing rails-dom-testing 2.1.1420Installing globalid 1.1.0421Fetching mail 2.8.1422Fetching activemodel 7.0.6423Installing activemodel 7.0.6424Fetching rails-html-sanitizer 1.6.0425Installing mail 2.8.1426Installing rails-html-sanitizer 1.6.0427Fetching aws-sdk-kms 1.68.0428Fetching rubocop 1.54.1429Installing aws-sdk-kms 1.68.0430Fetching activejob 7.0.6431Installing activejob 7.0.6432Installing rubocop 1.54.1433Fetching activerecord 7.0.6434Installing activerecord 7.0.6435Fetching actionview 7.0.6436Fetching aws-sdk-s3 1.127.0437Installing actionview 7.0.6438Installing aws-sdk-s3 1.127.0439Fetching rubocop-capybara 2.18.0440Fetching rubocop-factory_bot 2.23.1441Installing rubocop-capybara 2.18.0442Fetching rubocop-performance 1.18.0443Installing rubocop-factory_bot 2.23.1444Fetching actionpack 7.0.6445Installing rubocop-performance 1.18.0446Fetching rubocop-rspec 2.22.0447Installing rubocop-rspec 2.22.0448Installing actionpack 7.0.6449Fetching actioncable 7.0.6450Fetching activestorage 7.0.6451Installing actioncable 7.0.6452Installing activestorage 7.0.6453Fetching actionmailer 7.0.6454Fetching railties 7.0.6455Installing actionmailer 7.0.6456Fetching actionmailbox 7.0.6457Installing railties 7.0.6458Installing actionmailbox 7.0.6459Fetching actiontext 7.0.6460Installing actiontext 7.0.6461Fetching rails 7.0.6462Installing rails 7.0.6463Bundle complete! 12 Gemfile dependencies, 85 gems now installed.464Bundled gems are installed into `./vendor/bundle`before_script.1before_script.2470Repo counts471 before aggregation472 after aggregating per repo473 after aggregating all counts474 does not raise if repos are missing475 does not raise if builds are deleted before stages477set_updated_at trigger478Dropped database 'travis_test'479Created database 'travis_test'480== 201207261749 CreatePlans: migrating ========================================481-- create_table(:plans, {:id=>:integer})482 -> 0.0023s483== 201207261749 CreatePlans: migrated (0.0024s) ===============================485== 20101126174706 CreateRepositories: migrating ===============================486-- create_table(:repositories, {:id=>:integer})487 -> 0.0019s488== 20101126174706 CreateRepositories: migrated (0.0020s) ======================490== 20101126174715 CreateBuilds: migrating =====================================491-- create_table(:builds, {:id=>:integer})492 -> 0.0026s493== 20101126174715 CreateBuilds: migrated (0.0026s) ============================495== 20110109130532 DeviseCreateUsers: migrating ================================496-- create_table(:users, {:id=>:integer})497 -> 0.0018s498-- add_index(:users, :login, {:unique=>true})499 -> 0.0008s500== 20110109130532 DeviseCreateUsers: migrated (0.0026s) =======================502== 20110116155100 RepositoriesAddUsername: migrating ==========================503-- change_table(:repositories)504 -> 0.0007s505== 20110116155100 RepositoriesAddUsername: migrated (0.0008s) =================507== 20110130102621 CreateTokens: migrating =====================================508-- create_table(:tokens, {:id=>:integer})509 -> 0.0019s510== 20110130102621 CreateTokens: migrated (0.0019s) ============================512== 20110301071656 AddBuildParentIdAndConfiguration: migrating =================513-- change_table(:builds)514 -> 0.0011s515-- change_column(:builds, :number, :string)516 -> 0.0019s517-- add_index(:builds, :repository_id)518 -> 0.0005s519-- add_index(:builds, :parent_id)520 -> 0.0005s521== 20110301071656 AddBuildParentIdAndConfiguration: migrated (0.0041s) ========523== 20110316174721 RepositoriesDenormalizeLastBuildAttributes: migrating =======524-- change_table(:repositories)525 -> 0.0021s526== 20110316174721 RepositoriesDenormalizeLastBuildAttributes: migrated (0.0022s)528== 20110321075539 RepositoriesAddOwnerNameAndOwnerEmail: migrating ============529-- change_table(:repositories)530 -> 0.0017s531-- remove_column(:repositories, :username)532 -> 0.0004s533== 20110321075539 RepositoriesAddOwnerNameAndOwnerEmail: migrated (0.0021s) ===535== 20110411171936 CreateHistoriesTable: migrating =============================536-- create_table(:histories, {:id=>:integer})537 -> 0.0021s538-- add_index(:histories, [:item, :table, :month, :year])539 -> 0.0007s540== 20110411171936 CreateHistoriesTable: migrated (0.0029s) ====================542== 20110411171937 RenameHistoriesToRailsAdminHistories: migrating =============543-- remove_index(:histories, nil, {:name=>:index_histories_on_item_and_table_and_month_and_year})544 -> 0.0004s545-- rename_table(:histories, :rails_admin_histories)546 -> 0.0034s547-- add_index("rails_admin_histories", ["item", "table", "month", "year"], {:name=>"index_histories_on_item_and_table_and_month_and_year"})548 -> 0.0006s549== 20110411171937 RenameHistoriesToRailsAdminHistories: migrated (0.0058s) ====551== 20110411172518 AddAdminFlagToUser: migrating ===============================552-- change_table(:users)553 -> 0.0028s554== 20110411172518 AddAdminFlagToUser: migrated (0.0028s) ======================556== 20110413101057 BuildsAddRef: migrating =====================================557-- change_table(:builds)558 -> 0.0010s559== 20110413101057 BuildsAddRef: migrated (0.0011s) ============================561== 20110414131100 BuildsAddGithubPayload: migrating ===========================562-- change_table(:builds)563 -> 0.0006s564== 20110414131100 BuildsAddGithubPayload: migrated (0.0006s) ==================566== 20110503150504 AddGithubIdToUsersTable: migrating ==========================567-- add_column(:users, :github_id, :integer)568 -> 0.0006s569-- add_index(:users, :github_id)570 -> 0.0005s571== 20110503150504 AddGithubIdToUsersTable: migrated (0.0012s) =================573== 20110523012243 RepositoriesChangeOwnerEmailType: migrating =================574-- change_column(:repositories, :owner_email, :text)575 -> 0.0006s576== 20110523012243 RepositoriesChangeOwnerEmailType: migrated (0.0006s) ========578== 20110611203537 AddGithubOauthTokenToUser: migrating ========================579-- add_column(:users, :github_oauth_token, :string)580 -> 0.0006s581-- add_index(:users, :github_oauth_token)582 -> 0.0005s583== 20110611203537 AddGithubOauthTokenToUser: migrated (0.0011s) ===============585== 20110613210252 AddCompareUrlToBuild: migrating =============================586-- add_column(:builds, :compare_url, :string)587 -> 0.0006s588== 20110613210252 AddCompareUrlToBuild: migrated (0.0006s) ====================590== 20110615152003 BuildsRemoveJobId: migrating ================================591-- change_table(:builds)592 -> 0.0006s593== 20110615152003 BuildsRemoveJobId: migrated (0.0006s) =======================595== 20110616211744 BuildRemoveLastBuiltAt: migrating ===========================596-- change_table(:repositories)597 -> 0.0006s598== 20110616211744 BuildRemoveLastBuiltAt: migrated (0.0006s) ==================600== 20110617114728 AddMissingIndexes: migrating ================================601-- add_index(:repositories, :last_build_started_at)602 -> 0.0008s603-- add_index(:repositories, [:owner_name, :name])604 -> 0.0005s605-- add_index(:builds, [:repository_id, :parent_id, :started_at])606 -> 0.0005s607== 20110617114728 AddMissingIndexes: migrated (0.0020s) =======================609== 20110619100906 AddActiveToRepositories: migrating ==========================610-- add_column(:repositories, :is_active, :boolean)611 -> 0.0006s612== 20110619100906 AddActiveToRepositories: migrated (0.0006s) =================614== 20110729094426 StoreTokenInBuild: migrating ================================615-- add_column(:builds, :token, :string)616 -> 0.0006s617== 20110729094426 StoreTokenInBuild: migrated (0.0006s) =======================619== 20110801161819 CreateRequestsCommitsAndTasks: migrating ====================620-- change_table(:builds)621 -> 0.0014s622-- create_table(:commits, {:force=>true, :id=>:integer})623 -> 0.0020s624-- create_table(:requests, {:force=>true, :id=>:integer})625 -> 0.0022s626-- create_table(:tasks, {:force=>true, :id=>:integer})627 -> 0.0024s628-- add_index(:commits, :commit)629 -> 0.0005s630-- add_index(:builds, :commit)631 -> 0.0005s632-- add_index(:requests, :commit)633 -> 0.0005s634-- add_index(:tasks, :commit)635 -> 0.0005s636-- execute("UPDATE requests SET commit_id = (SELECT commits.id FROM commits WHERE commits.commit = requests.commit LIMIT 1)")637 -> 0.0006s638-- execute("UPDATE tasks SET commit_id = (SELECT commits.id FROM commits WHERE commits.commit = tasks.commit LIMIT 1)")639 -> 0.0004s640-- execute("DELETE FROM builds WHERE parent_id IS NOT NULL")641 -> 0.0005s642-- execute("UPDATE builds SET request_id = (SELECT requests.id FROM requests WHERE requests.commit = builds.commit LIMIT 1)")643 -> 0.0004s644-- execute("UPDATE builds SET commit_id = (SELECT commits.id FROM commits WHERE commits.commit = builds.commit LIMIT 1)")645 -> 0.0003s646-- execute("CREATE SEQUENCE shared_builds_tasks_seq CACHE 30")647 -> 0.0005s648-- execute("ALTER TABLE builds ALTER COLUMN id TYPE BIGINT")649 -> 0.0024s650-- execute("ALTER TABLE builds ALTER COLUMN id SET DEFAULT nextval('shared_builds_tasks_seq')")651 -> 0.0005s652-- execute("ALTER TABLE tasks ALTER COLUMN id TYPE BIGINT")653 -> 0.0019s654-- execute("ALTER TABLE tasks ALTER COLUMN id SET DEFAULT nextval('shared_builds_tasks_seq')")655 -> 0.0004s656-- select_value("SELECT max(id) FROM commits")657 -> 0.0005s658-- execute("SELECT setval('commits_id_seq', 1)")659 -> 0.0003s660-- select_value("SELECT max(id) FROM requests")661 -> 0.0004s662-- execute("SELECT setval('requests_id_seq', 1)")663 -> 0.0003s664-- select_value("SELECT max(id) FROM tasks")665 -> 0.0005s666-- execute("SELECT setval('tasks_id_seq', 1)")667 -> 0.0002s668-- remove_column(:builds, :parent_id)669 -> 0.0005s670-- remove_column(:builds, :commit)671 -> 0.0004s672-- remove_column(:requests, :commit)673 -> 0.0005s674-- remove_column(:tasks, :commit)675 -> 0.0004s676== 20110801161819 CreateRequestsCommitsAndTasks: migrated (0.0224s) ===========678== 20110805030147 RepositoryRenameIsActiveToActive: migrating =================679-- rename_column(:repositories, :is_active, :active)680 -> 0.0153s681== 20110805030147 RepositoryRenameIsActiveToActive: migrated (0.0156s) ========683== 20110819232908 TasksAddTags: migrating =====================================684-- add_column(:tasks, :tags, :text)685 -> 0.0024s686== 20110819232908 TasksAddTags: migrated (0.0025s) ============================688== 20110911204538 CacheOneNumberForSharedBuildsTasksSequence: migrating =======689-- execute("ALTER SEQUENCE shared_builds_tasks_seq CACHE 1 NO MAXVALUE NO CYCLE")690 -> 0.0022s691== 20110911204538 CacheOneNumberForSharedBuildsTasksSequence: migrated (0.0023s)693== 20111107134436 RenameTasksToJobs: migrating ================================694-- rename_table(:tasks, :jobs)695 -> 0.0067s696-- execute("UPDATE jobs SET type = 'Job::Test' WHERE type = 'Task::Test'")697 -> 0.0006s698-- execute("UPDATE jobs SET type = 'Job::Configure' WHERE type = 'Task::Configure'")699 -> 0.0004s700== 20111107134436 RenameTasksToJobs: migrated (0.0078s) =======================702== 20111107134437 CreateArtifacts: migrating ==================================703-- create_table(:artifacts, {:id=>:integer})704 -> 0.0046s705-- execute("UPDATE artifacts SET job_id = id")706 -> 0.0006s707-- execute("select setval('artifacts_id_seq', (select max(id) + 1 from artifacts));")708 -> 0.0006s709-- add_index(:artifacts, [:type, :job_id])710 -> 0.0012s711== 20111107134437 CreateArtifacts: migrated (0.0073s) =========================713== 20111107134438 CreateWorkers: migrating ====================================714-- create_table(:workers, {:id=>:integer})715 -> 0.0054s716-- add_index(:workers, [:name, :host])717 -> 0.0008s718== 20111107134438 CreateWorkers: migrated (0.0064s) ===========================720== 20111107134439 JobsAddRetries: migrating ===================================721-- change_table(:jobs)722 -> 0.0066s723== 20111107134439 JobsAddRetries: migrated (0.0066s) ==========================725== 20111107134440 RemoveRailsAdmin: migrating =================================726-- drop_table(:rails_admin_histories)727 -> 0.0033s728== 20111107134440 RemoveRailsAdmin: migrated (0.0034s) ========================730== 20111128235043 AddIndexesToJobs: migrating =================================731-- add_index(:jobs, [:queue, :state])732 -> 0.0031s733== 20111128235043 AddIndexesToJobs: migrated (0.0032s) ========================735== 20111129014329 AddRepositoryIdIndexToJobs: migrating =======================736-- add_index(:jobs, :repository_id)737 -> 0.0030s738== 20111129014329 AddRepositoryIdIndexToJobs: migrated (0.0031s) ==============740== 20111129022625 AddOwnerAndTypeIndexToJobs: migrating =======================741-- add_index(:jobs, [:type, :owner_id, :owner_type])742 -> 0.0034s743== 20111129022625 AddOwnerAndTypeIndexToJobs: migrated (0.0035s) ==============745== 20111201113500 WorkersAddPayloadAndLastError: migrating ====================746-- change_table(:workers)747 -> 0.0050s748== 20111201113500 WorkersAddPayloadAndLastError: migrated (0.0051s) ===========750== 20111203002341 RepositoriesAddDescriptionAndLastLanguage: migrating ========751-- change_table(:repositories)752 -> 0.0078s753-- change_table(:builds)754 -> 0.0019s755== 20111203002341 RepositoriesAddDescriptionAndLastLanguage: migrated (0.0099s)757== 20111203221720 BuildsAddArchivedAt: migrating ==============================758-- change_table(:builds)759 -> 0.0043s760== 20111203221720 BuildsAddArchivedAt: migrated (0.0043s) =====================762== 20111207093700 MimicProductionDb: migrating ================================763-- column_exists?(:users, :oauth2_uid, :integer)764 -> 0.0056s765-- column_exists?(:users, :oauth2_token, :string)766 -> 0.0024s767-- column_exists?(:repositories, :user_id, :integer)768 -> 0.0037s769== 20111207093700 MimicProductionDb: migrated (0.0118s) =======================771== 20111212103859 BuildsAddDuration: migrating ================================772-- change_table(:builds)773 -> 0.0031s774== 20111212103859 BuildsAddDuration: migrated (0.0032s) =======================776== 20111212112411 RepositoriesAddLastBuildDuration: migrating =================777-- change_table(:repositories)778 -> 0.0030s779== 20111212112411 RepositoriesAddLastBuildDuration: migrated (0.0031s) ========781== 20111214173922 CreateSslKeys: migrating ====================================782-- create_table(:ssl_keys, {:id=>:integer})783 -> 0.0047s784-- add_index("ssl_keys", ["repository_id"], {:name=>"index_ssl_key_on_repository_id"})785 -> 0.0010s786== 20111214173922 CreateSslKeys: migrated (0.0058s) ===========================788== 20120114125404 AddAllowFailureToJobs: migrating ============================789-- add_column(:jobs, :allow_failure, :boolean, {:default=>false})790 -> 0.0063s791== 20120114125404 AddAllowFailureToJobs: migrated (0.0064s) ===================793== 20120216133223 AddPullRequestFieldsToRequest: migrating ====================794-- add_column(:requests, :event_type, :string)795 -> 0.0015s796-- add_column(:requests, :comments_url, :string)797 -> 0.0007s798-- add_column(:requests, :base_commit, :string)799 -> 0.0007s800-- add_column(:requests, :head_commit, :string)801 -> 0.0010s802== 20120216133223 AddPullRequestFieldsToRequest: migrated (0.0041s) ===========804== 20120222082522 AddGravatarIdToUsers: migrating =============================805-- add_column(:users, :gravatar_id, :string)806 -> 0.0011s807== 20120222082522 AddGravatarIdToUsers: migrated (0.0012s) ====================809== 20120301131209 OrganizationsCreate: migrating ==============================810-- create_table(:organizations, {:id=>:integer})811 -> 0.0046s812== 20120301131209 OrganizationsCreate: migrated (0.0047s) =====================814== 20120304000502 JobsRenameOwnerToSource: migrating ==========================815-- change_table(:jobs)816 -> 0.0112s817== 20120304000502 JobsRenameOwnerToSource: migrated (0.0112s) =================819== 20120304000503 RepositoriesAddOwner: migrating =============================820-- change_table(:repositories)821 -> 0.0023s822== 20120304000503 RepositoriesAddOwner: migrated (0.0023s) ====================824== 20120304000504 BuildsAddOwner: migrating ===================================825-- change_table(:builds)826 -> 0.0023s827== 20120304000504 BuildsAddOwner: migrated (0.0024s) ==========================829== 20120304000505 JobsAddOwner: migrating =====================================830-- change_table(:jobs)831 -> 0.0012s832== 20120304000505 JobsAddOwner: migrated (0.0013s) ============================834== 20120304000506 RequestsAddOwner: migrating =================================835-- change_table(:requests)836 -> 0.0011s837== 20120304000506 RequestsAddOwner: migrated (0.0011s) ========================839== 20120311234933 AddLocaleToUser: migrating ==================================840-- add_column(:users, :locale, :string)841 -> 0.0006s842== 20120311234933 AddLocaleToUser: migrated (0.0007s) =========================844== 20120316123726 CreateMemberships: migrating ================================845-- create_table(:memberships, {:id=>:integer})846 -> 0.0016s847== 20120316123726 CreateMemberships: migrated (0.0016s) =======================849== 20120319170001 RepositoriesAddPrivate: migrating ===========================850-- change_table(:repositories)851 -> 0.0026s852== 20120319170001 RepositoriesAddPrivate: migrated (0.0026s) ==================854== 20120324104051 CreateUrls: migrating =======================================855-- create_table(:urls, {:id=>:integer})856 -> 0.0020s857== 20120324104051 CreateUrls: migrated (0.0020s) ==============================859== 20120505165100 CopyStatusToResult: migrating ===============================860-- add_column(:builds, :result, :integer)861 -> 0.0007s862-- add_column(:jobs, :result, :integer)863 -> 0.0004s864-- add_column(:repositories, :last_build_result, :integer)865 -> 0.0004s866Executing: UPDATE builds SET result = status;867Executing: UPDATE jobs SET result = status;868Executing: UPDATE repositories SET last_build_result = last_build_status;869== 20120505165100 CopyStatusToResult: migrated (0.0027s) ======================871== 20120511171900 RequestsAddIndexOnHeadCommit: migrating =====================872-- add_index(:requests, :head_commit)873 -> 0.0008s874== 20120511171900 RequestsAddIndexOnHeadCommit: migrated (0.0008s) ============876== 20120521174400 CreatePermissions: migrating ================================877-- create_table(:permissions, {:id=>:integer})878 -> 0.0141s879-- add_index(:permissions, :user_id)880 -> 0.0012s881-- add_index(:permissions, :repository_id)882 -> 0.0013s883== 20120521174400 CreatePermissions: migrated (0.0167s) =======================885== 20120527235800 BuildsAddPreviousResult: migrating ==========================886-- change_table(:builds)887 -> 0.0024s888== 20120527235800 BuildsAddPreviousResult: migrated (0.0025s) =================890== 20120702111126 CreateSubscriptions: migrating ==============================891-- create_table(:subscriptions, {:id=>:integer})892 -> 0.0060s893== 20120702111126 CreateSubscriptions: migrated (0.0061s) =====================895== 20120703114226 AddBillingEmailCreditCardDataToSubscriptions: migrating =====896-- change_table(:subscriptions)897 -> 0.0055s898== 20120703114226 AddBillingEmailCreditCardDataToSubscriptions: migrated (0.0055s)900== 20120713140816 AddSyncInfoToUser: migrating ================================901-- add_column(:users, :in_sync, :boolean)902 -> 0.0019s903-- add_column(:users, :synced_at, :timestamp)904 -> 0.0011s905== 20120713140816 AddSyncInfoToUser: migrated (0.0032s) =======================907== 20120713153215 RenameInSyncToIsSyncing: migrating ==========================908-- rename_column(:users, :in_sync, :is_syncing)909 -> 0.0063s910== 20120713153215 RenameInSyncToIsSyncing: migrated (0.0063s) =================912== 20120725005300 AddQueueToWorkers: migrating ================================913-- add_column(:workers, :queue, :string)914 -> 0.0020s915== 20120725005300 AddQueueToWorkers: migrated (0.0021s) =======================917== 20120727151900 AddJobsIndexOnStateOwnerTypeOwnerId: migrating ==============918-- add_index(:jobs, ["state", "owner_id", "owner_type"], {:name=>"index_jobs_on_state_owner_type_owner_id"})919 -> 0.0027s920== 20120727151900 AddJobsIndexOnStateOwnerTypeOwnerId: migrated (0.0028s) =====922== 20120731005301 AddQueuedAtToJobs: migrating ================================923-- add_column(:jobs, :queued_at, :timestamp, {:precision=>nil})924 -> 0.0022s925== 20120731005301 AddQueuedAtToJobs: migrated (0.0026s) =======================927== 20120731074000 AddAmountToPlans: migrating =================================928-- change_table(:plans)929 -> 0.0025s930== 20120731074000 AddAmountToPlans: migrated (0.0027s) ========================932== 20120802001001 AddPushAndPullToPermissions: migrating ======================933-- add_column(:permissions, :push, :boolean, {:default=>false})934 -> 0.0032s935-- add_column(:permissions, :pull, :boolean, {:default=>false})936 -> 0.0027s937-- change_column_default(:permissions, :admin, false)938 -> 0.0025s939== 20120802001001 AddPushAndPullToPermissions: migrated (0.0087s) =============941== 20120803164000 CreateInvoices: migrating ===================================942-- create_table(:invoices, {:id=>:integer})943 -> 0.0022s944== 20120803164000 CreateInvoices: migrated (0.0023s) ==========================946== 20120803182300 AddInvoiceIdToInvoices: migrating ===========================947-- change_table(:invoices)948 -> 0.0021s949== 20120803182300 AddInvoiceIdToInvoices: migrated (0.0021s) ==================951== 20120804122700 AddStripeInvoiceIdToInvoices: migrating =====================952-- change_table(:invoices)953 -> 0.0030s954-- add_index(:invoices, :stripe_id)955 -> 0.0022s956== 20120804122700 AddStripeInvoiceIdToInvoices: migrated (0.0055s) ============958== 20120806120400 AddPlanToSubscriptions: migrating ===========================959-- change_table(:subscriptions)960 -> 0.0015s961== 20120806120400 AddPlanToSubscriptions: migrated (0.0015s) ==================963== 20120820164000 RenamePlanOnSubscriptions: migrating ========================964-- change_table(:subscriptions)965 -> 0.0042s966== 20120820164000 RenamePlanOnSubscriptions: migrated (0.0043s) ===============968== 20120905093300 CreateStripeEvents: migrating ===============================969-- create_table(:stripe_events, {:id=>:integer})970 -> 0.0108s971-- add_index(:stripe_events, :event_type)972 -> 0.0025s973-- add_index(:stripe_events, :date)974 -> 0.0022s975== 20120905093300 CreateStripeEvents: migrated (0.0157s) ======================977== 20120905171300 AddEventIdToStripeEvents: migrating =========================978-- change_table(:stripe_events)979 -> 0.0018s980-- add_index(:stripe_events, :event_id)981 -> 0.0021s982== 20120905171300 AddEventIdToStripeEvents: migrated (0.0040s) ================984== 20120911160000 AddBuildsIndexOnRepositoryIdAndState: migrating =============985-- remove_index("builds", nil, {:column=>"repository_id", :name=>"index_builds_on_repository_id"})986 -> 0.0103s987-- add_index("builds", ["repository_id", "state"])988 -> 0.0015s989== 20120911160000 AddBuildsIndexOnRepositoryIdAndState: migrated (0.0179s) ====991== 20120911230000 ArtifactsAddAggregatedAt: migrating =========================992-- add_column(:artifacts, :aggregated_at, :timestamp, {:precision=>nil})993 -> 0.0007s994== 20120911230000 ArtifactsAddAggregatedAt: migrated (0.0007s) ================996== 20120911230001 AddArtifactParts: migrating =================================997-- create_table(:artifact_parts, {:id=>:integer})998 -> 0.0022s999-- add_index(:artifact_parts, [:artifact_id, :number])1000 -> 0.0006s1001== 20120911230001 AddArtifactParts: migrated (0.0028s) ========================1003== 20120913143800 AddSubscriptionsCoupon: migrating ===========================1004-- change_table(:subscriptions)1005 -> 0.0007s1006== 20120913143800 AddSubscriptionsCoupon: migrated (0.0007s) ==================1008== 20120915012000 BuildsAddIndexOnFinishedAt: migrating =======================1009-- add_index("builds", "finished_at")1010 -> 0.0008s1011== 20120915012000 BuildsAddIndexOnFinishedAt: migrated (0.0009s) ==============1013== 20120915012001 CommitsAddIndexOnBranch: migrating ==========================1014-- add_index("commits", "branch")1015 -> 0.0007s1016== 20120915012001 CommitsAddIndexOnBranch: migrated (0.0008s) =================1018== 20120915150000 JobsAddIndexOnCreatedAt: migrating ==========================1019-- add_index("jobs", "created_at")1020 -> 0.0008s1021== 20120915150000 JobsAddIndexOnCreatedAt: migrated (0.0008s) =================1023== 20121015002500 CreateEvents: migrating =====================================1024-- create_table(:events, {:id=>:integer})1025 -> 0.0019s1026== 20121015002500 CreateEvents: migrated (0.0020s) ============================1028== 20121015002501 RequestsAddResultAndMessage: migrating ======================1029-- add_column(:requests, :result, :string)1030 -> 0.0007s1031-- add_column(:requests, :message, :string)1032 -> 0.0004s1033== 20121015002501 RequestsAddResultAndMessage: migrated (0.0011s) =============1035== 20121017040100 CreateBroadcasts: migrating =================================1036-- create_table(:broadcasts, {:id=>:integer})1037 -> 0.0019s1038== 20121017040100 CreateBroadcasts: migrated (0.0020s) ========================1040== 20121017040200 EventsChangeDataToText: migrating ===========================1041-- change_column(:events, :data, :text)1042 -> 0.0006s1043== 20121017040200 EventsChangeDataToText: migrated (0.0007s) ==================1045== 20121018201301 AddEventTypeToBuilds: migrating =============================1046-- add_column(:builds, :event_type, :string)1047 -> 0.0007s1048== 20121018201301 AddEventTypeToBuilds: migrated (0.0007s) ====================1050== 20121018203728 UpdateEventTypeOnBuilds: migrating ==========================1051-- execute(" UPDATE builds\n SET event_type = requests.event_type\n FROM requests\n WHERE builds.request_id = requests.id\n")1052 -> 0.0009s1053== 20121018203728 UpdateEventTypeOnBuilds: migrated (0.0009s) =================1055== 20121018210156 AddIndexOnRepositoryIdAndEventTypeToBuilds: migrating =======1056-- add_index(:builds, [:repository_id, :event_type])1057 -> 0.0008s1058== 20121018210156 AddIndexOnRepositoryIdAndEventTypeToBuilds: migrated (0.0008s)1060== 20121125122700 RepositoriesAddLastBuildState: migrating ====================1061-- add_column(:repositories, :last_build_state, :string)1062 -> 0.0006s1063== 20121125122700 RepositoriesAddLastBuildState: migrated (0.0007s) ===========1065== 20121125122701 BuildsAddPreviousState: migrating ===========================1066-- add_column(:builds, :previous_state, :string)1067 -> 0.0006s1068== 20121125122701 BuildsAddPreviousState: migrated (0.0006s) ==================1070== 20121222125200 ArtifactPartsAddFinal: migrating ============================1071-- add_column(:artifact_parts, :final, :boolean)1072 -> 0.0008s1073-- add_column(:artifact_parts, :created_at, :timestamp)1074 -> 0.0006s1075== 20121222125200 ArtifactPartsAddFinal: migrated (0.0016s) ===================1077== 20121222125300 ArtifactPartsChangeContentToText: migrating =================1078-- change_column(:artifact_parts, :content, :text)1079 -> 0.0006s1080== 20121222125300 ArtifactPartsChangeContentToText: migrated (0.0007s) ========1082== 20121222140200 ArtifactPartsAddIndexOnArtifactId: migrating ================1083-- add_index(:artifact_parts, :artifact_id)1084 -> 0.0016s1085== 20121222140200 ArtifactPartsAddIndexOnArtifactId: migrated (0.0018s) =======1087== 20121223162300 ArtifactPartsRemoveIndexOnArtifactId: migrating =============1088-- remove_index(:artifact_parts, :artifact_id, {:name=>"index_artifact_parts_on_artifact_id"})1089 -> 0.0046s1090== 20121223162300 ArtifactPartsRemoveIndexOnArtifactId: migrated (0.0070s) ====1092== 20130107165057 AddGithubScopesToUser: migrating ============================1093-- add_column(:users, :github_scopes, :text)1094 -> 0.0014s1095== 20130107165057 AddGithubScopesToUser: migrated (0.0015s) ===================1097== 20130115125836 AddIndexOnLastSeenAtToWorkers: migrating ====================1098-- add_index(:workers, :last_seen_at)1099 -> 0.0016s1100== 20130115125836 AddIndexOnLastSeenAtToWorkers: migrated (0.0017s) ===========1102== 20130115145728 CacheFullNameInWorkers: migrating ===========================1103-- add_column(:workers, :full_name, :string)1104 -> 0.0015s1105-- add_index(:workers, :full_name)1106 -> 0.0012s1107== 20130115145728 CacheFullNameInWorkers: migrated (0.0028s) ==================1109== 20130125002600 ArtifactsAddArchivedAt: migrating ===========================1110-- add_column(:artifacts, :archived_at, :timestamp, {:precision=>nil})1111 -> 0.0012s1112-- add_index(:artifacts, :archived_at)1113 -> 0.0009s1114== 20130125002600 ArtifactsAddArchivedAt: migrated (0.0023s) ==================1116== 20130125171100 ArtifactsAddArchivingAndVerified: migrating =================1117-- add_column(:artifacts, :archiving, :boolean)1118 -> 0.0014s1119-- add_column(:artifacts, :archive_verified, :boolean)1120 -> 0.0008s1121-- add_index(:artifacts, :archiving)1122 -> 0.0011s1123-- add_index(:artifacts, :archive_verified)1124 -> 0.0010s1125== 20130125171100 ArtifactsAddArchivingAndVerified: migrated (0.0044s) ========1127== 20130129142703 CreateEmails: migrating =====================================1128-- create_table(:emails, {:id=>:integer})1129 -> 0.0047s1130-- add_index(:emails, :user_id)1131 -> 0.0011s1132-- add_index(:emails, :email)1133 -> 0.0010s1134== 20130129142703 CreateEmails: migrated (0.0071s) ============================1136== 20130208135800 RenameArtifacts: migrating ==================================1137-- rename_table(:artifacts, :artifacts_backup)1138 -> 0.0123s1139-- rename_table(:artifact_parts, :artifact_parts_backup)1140 -> 0.0078s1141== 20130208135800 RenameArtifacts: migrated (0.0202s) =========================1143== 20130208135801 DropArtifacts: migrating ====================================1144-- drop_table(:artifacts_backup)1145 -> 0.0030s1146-- drop_table(:artifact_parts_backup)1147 -> 0.0018s1148== 20130208135801 DropArtifacts: migrated (0.0049s) ===========================1150== 20130306154311 CreatePgcryptoExtension: migrating ==========================1151-- execute("create extension if not exists pgcrypto")1152 -> 0.0078s1153== 20130306154311 CreatePgcryptoExtension: migrated (0.0079s) =================1155== 20130311211101 AddPullRequestTitleToBuilds: migrating ======================1156-- add_column(:builds, :pull_request_title, :text)1157 -> 0.0015s1158== 20130311211101 AddPullRequestTitleToBuilds: migrated (0.0016s) =============1160== 20130327100801 AddPullRequestNumberToBuilds: migrating =====================1161-- add_column(:builds, :pull_request_number, :integer)1162 -> 0.0015s1163== 20130327100801 AddPullRequestNumberToBuilds: migrated (0.0015s) ============1165== 20130418101437 AddIndexToBuildsRequestId: migrating ========================1166-- execute("CREATE INDEX CONCURRENTLY index_builds_on_request_id ON builds(request_id)")1167 -> 0.0019s1168== 20130418101437 AddIndexToBuildsRequestId: migrated (0.0020s) ===============1170== 20130418103306 AddIndexToJobsOnOwnerIdOwnerTypeAndState: migrating =========1171-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_owner_id_and_owner_type_and_state ON jobs(owner_id, owner_type, state)")1172 -> 0.0019s1173== 20130418103306 AddIndexToJobsOnOwnerIdOwnerTypeAndState: migrated (0.0020s)1175== 20130505023259 AddMoreIndexesToBuilds: migrating ===========================1176-- execute(" CREATE INDEX CONCURRENTLY index_builds_on_repository_id_and_event_type_and_state_and_branch\n ON builds(repository_id, event_type, state, branch);\n")1177 -> 0.0016s1178== 20130505023259 AddMoreIndexesToBuilds: migrated (0.0017s) ==================1180== 20130521115725 AddIndexOnBuildState: migrating =============================1181-- execute(" CREATE INDEX CONCURRENTLY index_builds_on_state\n ON builds(state);\n")1182 -> 0.0015s1183== 20130521115725 AddIndexOnBuildState: migrated (0.0016s) ====================1185== 20130521133050 UpdateFinishedJobs: migrating ===============================1186-- execute("UPDATE jobs SET state = 'passed' WHERE state = 'finished' AND result = 0 AND type = 'Job::Test'")1187 -> 0.0014s1188-- execute("UPDATE jobs SET state = 'failed' WHERE state = 'finished' AND result = 1 AND type = 'Job::Test'")1189 -> 0.0007s1190-- execute("UPDATE jobs SET state = 'errored' WHERE state = 'finished' AND result IS NULL AND type = 'Job::Test'")1191 -> 0.0007s1192-- execute("SELECT COUNT(*) FROM jobs WHERE state = 'finished' AND type = 'Job::Test'")1193 -> 0.0006s1194== 20130521133050 UpdateFinishedJobs: migrated (0.0036s) ======================1196== 20130521134224 UpdateFinishedBuilds: migrating =============================1197-- execute("UPDATE builds SET state = 'passed' WHERE state = 'finished' AND result = 0")1198 -> 0.0013s1199-- execute("UPDATE builds SET state = 'failed' WHERE state = 'finished' AND result = 1")1200 -> 0.0007s1201-- execute("UPDATE builds SET state = 'errored' WHERE state = 'finished' AND result IS NULL")1202 -> 0.0007s1203-- execute("SELECT COUNT(*) FROM builds WHERE state = 'finished'")1204 -> 0.0007s1205== 20130521134224 UpdateFinishedBuilds: migrated (0.0038s) ====================1207== 20130521134800 RemoveUnusedBuildColumns: migrating =========================1208-- remove_column(:builds, :result)1209 -> 0.0012s1210-- remove_column(:builds, :status)1211 -> 0.0006s1212-- remove_column(:builds, :previous_result)1213 -> 0.0007s1214-- remove_column(:builds, :agent)1215 -> 0.0006s1216-- remove_column(:builds, :language)1217 -> 0.0007s1218-- remove_column(:builds, :archived_at)1219 -> 0.0006s1220== 20130521134800 RemoveUnusedBuildColumns: migrated (0.0049s) ================1222== 20130521141357 RemoveUnusedJobColumns: migrating ===========================1223-- remove_column(:jobs, :status)1224 -> 0.0011s1225-- remove_column(:jobs, :job_id)1226 -> 0.0007s1227-- remove_column(:jobs, :retries)1228 -> 0.0009s1229== 20130521141357 RemoveUnusedJobColumns: migrated (0.0029s) ==================1231== 20130618084205 AddCoupons: migrating =======================================1232-- create_table(:coupons, {:id=>:integer})1233 -> 0.0052s1234== 20130618084205 AddCoupons: migrated (0.0053s) ==============================1236== 20130629122945 AddGithubIdToUsers: migrating ===============================1237-- add_column(:repositories, :github_id, :integer)1238 -> 0.0014s1239-- add_index(:repositories, :github_id)1240 -> 0.0012s1241== 20130629122945 AddGithubIdToUsers: migrated (0.0026s) ======================1243== 20130629133531 AddDefaultBranchToRepositories: migrating ===================1244-- add_column(:repositories, :default_branch, :string)1245 -> 0.0013s1246== 20130629133531 AddDefaultBranchToRepositories: migrated (0.0013s) ==========1248== 20130629174449 AddGithubLanguageToRepositories: migrating ==================1249-- add_column(:repositories, :github_language, :string)1250 -> 0.0012s1251== 20130629174449 AddGithubLanguageToRepositories: migrated (0.0012s) =========1253== 20130701175200 AddContactIdToSubscriptions: migrating ======================1254-- change_table(:subscriptions)1255 -> 0.0013s1256== 20130701175200 AddContactIdToSubscriptions: migrated (0.0014s) =============1258== 20130702123456 RemoveUnusedRepositoryColumns: migrating ====================1259-- remove_column(:repositories, :last_duration)1260 -> 0.0010s1261-- remove_column(:repositories, :last_build_status)1262 -> 0.0004s1263-- remove_column(:repositories, :last_build_result)1264 -> 0.0004s1265-- remove_column(:repositories, :last_build_language)1266 -> 0.0004s1267== 20130702123456 RemoveUnusedRepositoryColumns: migrated (0.0023s) ===========1269== 20130702144325 AddUniqueIndexOnUsersGithubIdAndRemoveUniqueIndexOnUsersLogin: migrating1270-- execute("DROP INDEX index_users_on_login")1271 -> 0.0008s1272-- execute("CREATE INDEX CONCURRENTLY index_users_on_login ON users(login)")1273 -> 0.0011s1274-- execute("DROP INDEX index_users_on_github_id")1275 -> 0.0009s1276-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_users_on_github_id ON users(github_id)")1277 -> 0.0010s1278== 20130702144325 AddUniqueIndexOnUsersGithubIdAndRemoveUniqueIndexOnUsersLogin: migrated (0.0041s)1280== 20130705123456 AddExtraColumnsToOrganizations: migrating ===================1281-- add_column(:organizations, :avatar_url, :string)1282 -> 0.0012s1283-- add_column(:organizations, :location, :string)1284 -> 0.0007s1285-- add_column(:organizations, :email, :string)1286 -> 0.0007s1287-- add_column(:organizations, :company, :string)1288 -> 0.0007s1289-- add_column(:organizations, :homepage, :string)1290 -> 0.0008s1291== 20130705123456 AddExtraColumnsToOrganizations: migrated (0.0044s) ==========1293== 20130707164854 AddIndexOnGithubIdToOrganizations: migrating ================1294-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_organizations_on_github_id ON organizations(github_id)")1295 -> 0.0012s1296== 20130707164854 AddIndexOnGithubIdToOrganizations: migrated (0.0013s) =======1298== 20130709185200 CreateAnnotations: migrating ================================1299-- create_table(:annotations, {:id=>:integer})1300 -> 0.0050s1301== 20130709185200 CreateAnnotations: migrated (0.0051s) =======================1303== 20130709233500 CreateAnnotationProviders: migrating ========================1304-- create_table(:annotation_providers, {:id=>:integer})1305 -> 0.0045s1306== 20130709233500 CreateAnnotationProviders: migrated (0.0046s) ===============1308== 20130710000745 AddAnnotationProviderIdToAnnotations: migrating =============1309-- add_column(:annotations, :annotation_provider_id, :integer, {:null=>false})1310 -> 0.0013s1311== 20130710000745 AddAnnotationProviderIdToAnnotations: migrated (0.0014s) ====1313== 20130726101124 AddCanceledAtToJobsAndBuilds: migrating =====================1314-- add_column(:builds, :canceled_at, :timestamp, {:precision=>nil})1315 -> 0.0013s1316-- add_column(:jobs, :canceled_at, :timestamp, {:precision=>nil})1317 -> 0.0008s1318== 20130726101124 AddCanceledAtToJobsAndBuilds: migrated (0.0024s) ============1320== 20130901183019 AddIndexOnRepositoryGithubId: migrating =====================1321-- execute("DROP INDEX index_repositories_on_github_id")1322 -> 0.0010s1323-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_github_id ON repositories(github_id)")1324 -> 0.0012s1325== 20130901183019 AddIndexOnRepositoryGithubId: migrated (0.0024s) ============1327== 20130909203321 AddCachedMatrixIdsToBuilds: migrating =======================1328-- execute("ALTER TABLE builds ADD COLUMN cached_matrix_ids integer[]")1329 -> 0.0011s1330== 20130909203321 AddCachedMatrixIdsToBuilds: migrated (0.0012s) ==============1332== 20130910184823 CreateIndexOnBuildsIdDescAndRepositoryIdAndEventType: migrating1333-- execute("CREATE INDEX CONCURRENTLY index_builds_on_id_repository_id_and_event_type_desc ON builds (id DESC, repository_id, event_type);")1334 -> 0.0015s1335== 20130910184823 CreateIndexOnBuildsIdDescAndRepositoryIdAndEventType: migrated (0.0016s)1337== 20130916101056 AddUniqueIndexOnRepositoryGithubId: migrating ===============1338-- execute("DROP INDEX index_repositories_on_github_id")1339 -> 0.0010s1340-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_repositories_on_github_id ON repositories(github_id)")1341 -> 0.0014s1342== 20130916101056 AddUniqueIndexOnRepositoryGithubId: migrated (0.0024s) ======1344== 20130920135744 AddSettingsToRepositories: migrating ========================1345-- add_column(:repositories, :settings, :json)1346 -> 0.0013s1347== 20130920135744 AddSettingsToRepositories: migrated (0.0015s) ===============1349== 20131104101056 RemoveWorkersTableAndIndexes: migrating =====================1350-- drop_table(:workers)1351 -> 0.0026s1352== 20131104101056 RemoveWorkersTableAndIndexes: migrated (0.0026s) ============1354== 20131109101056 RemoveEventsTable: migrating ================================1355-- drop_table(:events)1356 -> 0.0021s1357== 20131109101056 RemoveEventsTable: migrated (0.0022s) =======================1359== 20140120225125 RemoveAnnotationImageInfo: migrating ========================1360-- remove_column(:annotations, :image_url)1361 -> 0.0012s1362-- remove_column(:annotations, :image_alt)1363 -> 0.0007s1364== 20140120225125 RemoveAnnotationImageInfo: migrated (0.0020s) ===============1366== 20140121003026 AddStatusToAnnotations: migrating ===========================1367-- add_column(:annotations, :status, :string)1368 -> 0.0013s1369== 20140121003026 AddStatusToAnnotations: migrated (0.0015s) ==================1371== 20140204220926 AddIndicesToRequests: migrating =============================1372-- execute("CREATE INDEX CONCURRENTLY index_requests_on_repository_id ON requests(repository_id)")1373 -> 0.0013s1374-- execute("CREATE INDEX CONCURRENTLY index_requests_on_commit_id ON requests(commit_id)")1375 -> 0.0012s1376== 20140204220926 AddIndicesToRequests: migrated (0.0028s) ====================1378== 20140210003014 AddIndicesToMemberships: migrating ==========================1379-- execute("CREATE INDEX CONCURRENTLY index_memberships_on_user_id ON memberships(user_id)")1380 -> 0.0014s1381== 20140210003014 AddIndicesToMemberships: migrated (0.0014s) =================1383== 20140210012509 RemoveUnusedIndices: migrating ==============================1384-- execute("DROP INDEX CONCURRENTLY index_commits_on_commit")1385 -> 0.0008s1386-- execute("DROP INDEX CONCURRENTLY index_builds_on_state")1387 -> 0.0008s1388-- execute("DROP INDEX CONCURRENTLY index_commits_on_branch")1389 -> 0.0007s1390-- execute("DROP INDEX CONCURRENTLY index_users_on_github_oauth_token")1391 -> 0.0012s1392-- execute("DROP INDEX CONCURRENTLY index_builds_on_finished_at")1393 -> 0.0012s1394-- execute("DROP INDEX CONCURRENTLY index_jobs_on_queue_and_state")1395 -> 0.0010s1396-- execute("DROP INDEX CONCURRENTLY index_jobs_on_created_at")1397 -> 0.0011s1398== 20140210012509 RemoveUnusedIndices: migrated (0.0072s) =====================1400== 20140612131826 AddRemovedInfoToLogs: migrating =============================1401== 20140612131826 AddRemovedInfoToLogs: migrated (0.0015s) ====================1403== 20140827121945 AddEducationFieldToUser: migrating ==========================1404-- add_column(:users, :education, :boolean)1405 -> 0.0015s1406== 20140827121945 AddEducationFieldToUser: migrated (0.0016s) =================1408== 20150121135400 JobsAddReceivedAt: migrating ================================1409-- add_column(:jobs, :received_at, :timestamp, {:precision=>nil})1410 -> 0.0017s1411== 20150121135400 JobsAddReceivedAt: migrated (0.0018s) =======================1413== 20150121135401 BuildsAddReceivedAt: migrating ==============================1414-- add_column(:builds, :received_at, :timestamp, {:precision=>nil})1415 -> 0.0014s1416== 20150121135401 BuildsAddReceivedAt: migrated (0.0016s) =====================1418== 20150204144312 AddIndexOnRepositoryIdToCommits: migrating ==================1419-- execute("DROP INDEX IF EXISTS index_commits_on_repository_id")1420 -> 0.0004s1421-- execute("CREATE INDEX CONCURRENTLY index_commits_on_repository_id ON commits(repository_id)")1422 -> 0.0012s1423== 20150204144312 AddIndexOnRepositoryIdToCommits: migrated (0.0018s) =========1425== 20150210170900 IndexRequestsOnCreatedAt: migrating =========================1426-- execute("DROP INDEX IF EXISTS index_requests_on_created_at")1427 -> 0.0005s1428-- execute("CREATE INDEX CONCURRENTLY index_requests_on_created_at ON requests(created_at)")1429 -> 0.0013s1430== 20150210170900 IndexRequestsOnCreatedAt: migrated (0.0018s) ================1432== 20150223125700 CreateBranches: migrating ===================================1433-- create_table(:branches, {:id=>:integer})1434 -> 0.0055s1435-- add_index(:branches, [:repository_id, :name], {:unique=>true})1436 -> 0.0014s1437== 20150223125700 CreateBranches: migrated (0.0072s) ==========================1439== 20150311020321 AddNextBuildNumberToRepository: migrating ===================1440-- add_column(:repositories, :next_build_number, :integer)1441 -> 0.0015s1442== 20150311020321 AddNextBuildNumberToRepository: migrated (0.0016s) ==========1444== 20150316020321 AddActiveIndexToRepository: migrating =======================1445-- execute("DROP INDEX IF EXISTS index_repositories_on_active")1446 -> 0.0006s1447-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_active ON repositories(active)")1448 -> 0.0015s1449== 20150316020321 AddActiveIndexToRepository: migrated (0.0022s) ==============1451== 20150316080321 AddOwnerTypeAndOwnerIdIndexesToBuilds: migrating ============1452-- execute("DROP INDEX IF EXISTS index_builds_on_owner_type")1453 -> 0.0006s1454-- execute("DROP INDEX IF EXISTS index_builds_on_owner_id")1455 -> 0.0005s1456-- execute("CREATE INDEX CONCURRENTLY index_builds_on_owner_type ON builds(owner_type)")1457 -> 0.0017s1458-- execute("CREATE INDEX CONCURRENTLY index_builds_on_owner_id ON builds(owner_id)")1459 -> 0.0021s1460== 20150316080321 AddOwnerTypeAndOwnerIdIndexesToBuilds: migrated (0.0053s) ===1462== 20150316100321 AddOwnerTypeAndOwnerIdIndexesToRepositories: migrating ======1463-- execute("DROP INDEX IF EXISTS index_repositories_on_owner_type")1464 -> 0.0005s1465-- execute("DROP INDEX IF EXISTS index_repositories_on_owner_id")1466 -> 0.0006s1467-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_owner_type ON repositories(owner_type)")1468 -> 0.0012s1469-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_owner_id ON repositories(owner_id)")1470 -> 0.0015s1471== 20150316100321 AddOwnerTypeAndOwnerIdIndexesToRepositories: migrated (0.0042s)1473== 20150317004600 AddSlugIndexToRepositories: migrating =======================1474-- execute("CREATE EXTENSION IF NOT EXISTS pg_trgm")1475 -> 0.0117s1476-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_slug ON repositories USING gin((owner_name || '/' || name) gin_trgm_ops)")1477 -> 0.0016s1478== 20150317004600 AddSlugIndexToRepositories: migrated (0.0134s) ==============1480== 20150317020321 AddTokenIndexToTokens: migrating ============================1481-- execute("DROP INDEX IF EXISTS index_tokens_on_token")1482 -> 0.0017s1483-- execute("CREATE INDEX CONCURRENTLY index_tokens_on_token ON tokens(token)")1484 -> 0.0008s1485== 20150317020321 AddTokenIndexToTokens: migrated (0.0026s) ===================1487== 20150317080321 AddLoginIndexToOrganizations: migrating =====================1488-- execute("DROP INDEX IF EXISTS index_organizations_on_login")1489 -> 0.0018s1490-- execute("CREATE INDEX CONCURRENTLY index_organizations_on_login ON organizations(login)")1491 -> 0.0010s1492== 20150317080321 AddLoginIndexToOrganizations: migrated (0.0029s) ============1494== 20150414001337 AddLowerCaseIndices: migrating ==============================1495-- execute("DROP INDEX IF EXISTS index_organizations_on_lower_login")1496 -> 0.0006s1497-- execute("CREATE INDEX CONCURRENTLY index_organizations_on_lower_login ON organizations USING btree(lower(login))")1498 -> 0.0021s1499-- execute("DROP INDEX IF EXISTS index_users_on_lower_login")1500 -> 0.0008s1501-- execute("CREATE INDEX CONCURRENTLY index_users_on_lower_login ON users USING btree(lower(login))")1502 -> 0.0008s1503-- execute("DROP INDEX IF EXISTS index_repositories_on_lower_name")1504 -> 0.0009s1505-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_lower_name ON repositories USING btree(lower(name))")1506 -> 0.0009s1507-- execute("DROP INDEX IF EXISTS index_repositories_on_lower_owner_name")1508 -> 0.0006s1509-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_lower_owner_name ON repositories USING btree(lower(owner_name))")1510 -> 0.0009s1511== 20150414001337 AddLowerCaseIndices: migrated (0.0080s) =====================1513== 20150528101600 RepositoriesAddIndexOwnerName: migrating ====================1514-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_owner_name ON repositories(owner_name)")1515 -> 0.0019s1516== 20150528101600 RepositoriesAddIndexOwnerName: migrated (0.0019s) ===========1518== 20150528101601 RepositoriesAddIndexName: migrating =========================1519-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_name ON repositories(name)")1520 -> 0.0019s1521== 20150528101601 RepositoriesAddIndexName: migrated (0.0019s) ================1523== 20150528101602 RepositoriesDropIndexOwnerNameName: migrating ===============1524-- execute("DROP INDEX CONCURRENTLY index_repositories_on_owner_name_and_name")1525 -> 0.0018s1526== 20150528101602 RepositoriesDropIndexOwnerNameName: migrated (0.0018s) ======1528== 20150528101603 BuildsAddIndexEventType: migrating ==========================1529-- execute("CREATE INDEX CONCURRENTLY index_builds_on_event_type ON builds (event_type)")1530 -> 0.0016s1531== 20150528101603 BuildsAddIndexEventType: migrated (0.0016s) =================1533== 20150528101604 BuildsAddIndexRepositoryId: migrating =======================1534-- execute("CREATE INDEX CONCURRENTLY index_builds_on_repository_id ON builds (repository_id)")1535 -> 0.0018s1536== 20150528101604 BuildsAddIndexRepositoryId: migrated (0.0019s) ==============1538== 20150528101605 BuildsAddIndexState: migrating ==============================1539-- execute("CREATE INDEX CONCURRENTLY index_builds_on_state ON builds (state)")1540 -> 0.0008s1541== 20150528101605 BuildsAddIndexState: migrated (0.0009s) =====================1543== 20150528101607 BuildsAddIndexBranch: migrating =============================1544-- execute("CREATE INDEX CONCURRENTLY index_builds_on_branch ON builds (branch)")1545 -> 0.0008s1546== 20150528101607 BuildsAddIndexBranch: migrated (0.0008s) ====================1548== 20150528101608 BuildsDropIndexRepositoryIdAndState: migrating ==============1549-- execute("DROP INDEX CONCURRENTLY index_builds_on_repository_id_and_state")1550 -> 0.0010s1551== 20150528101608 BuildsDropIndexRepositoryIdAndState: migrated (0.0010s) =====1553== 20150528101609 BuildsDropIndexRepositoryIdAndEventType: migrating ==========1554-- execute("DROP INDEX CONCURRENTLY index_builds_on_repository_id_and_event_type")1555 -> 0.0013s1556== 20150528101609 BuildsDropIndexRepositoryIdAndEventType: migrated (0.0013s) =1558== 20150528101610 BuildsDropIndexIdRepositoryIdAndEventTypeDesc: migrating ====1559-- execute("DROP INDEX CONCURRENTLY index_builds_on_id_repository_id_and_event_type_desc")1560 -> 0.0010s1561== 20150528101610 BuildsDropIndexIdRepositoryIdAndEventTypeDesc: migrated (0.0010s)1563== 20150528101611 BuildsDropIndexRepositoryIdAndEventTypeAndStateAndBranch: migrating1564-- execute("DROP INDEX CONCURRENTLY index_builds_on_repository_id_and_event_type_and_state_and_bran")1565 -> 0.0008s1566== 20150528101611 BuildsDropIndexRepositoryIdAndEventTypeAndStateAndBranch: migrated (0.0008s)1568== 20150609175200 AddCancelationColumnsToSubscriptions: migrating =============1569-- change_table(:subscriptions)1570 -> 0.0018s1571== 20150609175200 AddCancelationColumnsToSubscriptions: migrated (0.0018s) ====1573== 20150610143500 JobsAddIndexOwnerId: migrating ==============================1574-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_owner_id ON jobs (owner_id)")1575 -> 0.0011s1576== 20150610143500 JobsAddIndexOwnerId: migrated (0.0011s) =====================1578== 20150610143501 JobsAddIndexOwnerType: migrating ============================1579-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_owner_type ON jobs (owner_type)")1580 -> 0.0014s1581== 20150610143501 JobsAddIndexOwnerType: migrated (0.0014s) ===================1583== 20150610143502 JobsAddIndexSourceId: migrating =============================1584-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_source_id ON jobs (source_id)")1585 -> 0.0009s1586== 20150610143502 JobsAddIndexSourceId: migrated (0.0010s) ====================1588== 20150610143503 JobsAddIndexSourceType: migrating ===========================1589-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_source_type ON jobs (source_type)")1590 -> 0.0021s1591== 20150610143503 JobsAddIndexSourceType: migrated (0.0021s) ==================1593== 20150610143504 JobsAddIndexType: migrating =================================1594-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_type ON jobs (type)")1595 -> 0.0016s1596== 20150610143504 JobsAddIndexType: migrated (0.0018s) ========================1598== 20150610143505 JobsDropIndexOwnerIdAndOwnerTypeAndState: migrating =========1599-- execute("DROP INDEX CONCURRENTLY index_jobs_on_owner_id_and_owner_type_and_state")1600 -> 0.0022s1601== 20150610143505 JobsDropIndexOwnerIdAndOwnerTypeAndState: migrated (0.0024s)1603== 20150610143506 JobsDropIndexStateOwnerTypeOwnerId: migrating ===============1604-- execute("DROP INDEX CONCURRENTLY index_jobs_on_state_owner_type_owner_id")1605 -> 0.0018s1606== 20150610143506 JobsDropIndexStateOwnerTypeOwnerId: migrated (0.0021s) ======1608== 20150610143507 JobsDropIndexTypeAndSourceIdAndSourceType: migrating ========1609-- index_exists?(:jobs, :index_jobs_on_type_and_owner_id_and_owner_type, {:name=>"index_jobs_on_index_jobs_on_type_and_owner_id_and_owner_type"})1610 -> 0.0112s1611== 20150610143507 JobsDropIndexTypeAndSourceIdAndSourceType: migrated (0.0113s)1613== 20150610143508 JobsAddIndexState: migrating ================================1614-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_state ON jobs (state)")1615 -> 0.0018s1616== 20150610143508 JobsAddIndexState: migrated (0.0019s) =======================1618== 20150610143509 JobsAddIndexQueue: migrating ================================1619-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_queue ON jobs (queue)")1620 -> 0.0020s1621== 20150610143509 JobsAddIndexQueue: migrated (0.0024s) =======================1623== 20150610143510 TokensAddIndexUserId: migrating =============================1624-- execute("CREATE INDEX CONCURRENTLY index_tokens_on_user_id ON tokens (user_id)")1625 -> 0.0017s1626== 20150610143510 TokensAddIndexUserId: migrated (0.0017s) ====================1628== 20150615103059 AddStatusToSubscriptions: migrating =========================1629-- add_column(:subscriptions, :status, :string)1630 -> 0.0024s1631== 20150615103059 AddStatusToSubscriptions: migrated (0.0026s) ================1633== 20150629231300 ReposAddInvalidatedAt: migrating ============================1634-- add_column(:repositories, :invalidated_at, :timestamp, {:precision=>nil})1635 -> 0.0019s1636== 20150629231300 ReposAddInvalidatedAt: migrated (0.0020s) ===================1638== 20150923131400 BroadcastsAddCategory: migrating ============================1639-- add_column(:broadcasts, :category, :string)1640 -> 0.0008s1641== 20150923131400 BroadcastsAddCategory: migrated (0.0008s) ===================1643== 20151112153500 CreateStars: migrating ======================================1644-- create_table(:stars, {:id=>:integer})1645 -> 0.0065s1646-- add_index(:stars, :user_id)1647 -> 0.0007s1648== 20151112153500 CreateStars: migrated (0.0074s) =============================1650== 20151113111400 StarsAddIndexUserIdAndRepositoryId: migrating ===============1651-- execute("CREATE UNIQUE INDEX index_stars_on_user_id_and_repository_id ON stars (user_id, repository_id)")1652 -> 0.0007s1653== 20151113111400 StarsAddIndexUserIdAndRepositoryId: migrated (0.0007s) ======1655== 20151127153500 UsersAddIndexGithubOauthToken: migrating ====================1656-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_users_on_github_oauth_token ON users (github_oauth_token)")1657 -> 0.0008s1658== 20151127153500 UsersAddIndexGithubOauthToken: migrated (0.0008s) ===========1660== 20151127154200 AnnotationsAddIndexJobId: migrating =========================1661-- execute("CREATE INDEX CONCURRENTLY index_annotations_on_job_id ON annotations (job_id)")1662 -> 0.0054s1663== 20151127154200 AnnotationsAddIndexJobId: migrated (0.0059s) ================1665== 20151127154600 BroadcastsAddIndexRecipientIdAndRecipientType: migrating ====1666-- execute("CREATE INDEX CONCURRENTLY index_broadcasts_on_recipient_id_and_recipient_type ON broadcasts (recipient_id, recipient_type)")1667 -> 0.0008s1668== 20151127154600 BroadcastsAddIndexRecipientIdAndRecipientType: migrated (0.0009s)1670== 20151202122200 UsersAddFirstLoggedInAt: migrating ==========================1671-- add_column(:users, :first_logged_in_at, :timestamp, {:precision=>nil})1672 -> 0.0009s1673== 20151202122200 UsersAddFirstLoggedInAt: migrated (0.0009s) =================1675== 20160107120927 AddCronTable: migrating =====================================1676-- create_table(:crons, {:id=>:integer})1677 -> 0.0030s1678== 20160107120927 AddCronTable: migrated (0.0030s) ============================1680== 20160303165750 AddDebugOptionsToJobs: migrating ============================1681-- add_column(:jobs, :debug_options, :text)1682 -> 0.0007s1683== 20160303165750 AddDebugOptionsToJobs: migrated (0.0008s) ===================1685== 20160412113020 BuildsDropIndexOwnerType: migrating =========================1686-- execute("DROP INDEX CONCURRENTLY index_builds_on_owner_type")1687 -> 0.0007s1688== 20160412113020 BuildsDropIndexOwnerType: migrated (0.0008s) ================1690== 20160412113070 RepositoriesDropIndexLastBuildStartedAt: migrating ==========1691-- execute("DROP INDEX CONCURRENTLY index_repositories_on_last_build_started_at")1692 -> 0.0007s1693== 20160412113070 RepositoriesDropIndexLastBuildStartedAt: migrated (0.0008s) =1695== 20160412121405 JobsDropIndexType: migrating ================================1696-- execute("DROP INDEX CONCURRENTLY index_jobs_on_type")1697 -> 0.0007s1698== 20160412121405 JobsDropIndexType: migrated (0.0007s) =======================1700== 20160412123900 JobsDropIndexSourceType: migrating ==========================1701-- execute("DROP INDEX CONCURRENTLY index_jobs_on_source_type")1702 -> 0.0007s1703== 20160412123900 JobsDropIndexSourceType: migrated (0.0008s) =================1705== 20160414214442 JobsAddIndexQueuedAt: migrating =============================1706-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_queued_at ON jobs (queued_at)")1707 -> 0.0009s1708== 20160414214442 JobsAddIndexQueuedAt: migrated (0.0009s) ====================1710== 20160422104300 BuildsAddIndexNumber: migrating =============================1711-- execute("CREATE INDEX CONCURRENTLY index_builds_on_number ON builds (number)")1712 -> 0.0008s1713== 20160422104300 BuildsAddIndexNumber: migrated (0.0008s) ====================1715== 20160422121400 BuildsAddIndexRepositoryIdAndNumberAndEventType: migrating ==1716-- execute("CREATE INDEX CONCURRENTLY index_builds_on_repository_id_and_number_and_event_type ON builds (repository_id, number, event_type)")1717 -> 0.0020s1718== 20160422121400 BuildsAddIndexRepositoryIdAndNumberAndEventType: migrated (0.0020s)1720== 20160510142700 JobsAddIndexCreatedAt: migrating ============================1721-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_created_at ON jobs (created_at)")1722 -> 0.0012s1723== 20160510142700 JobsAddIndexCreatedAt: migrated (0.0012s) ===================1725== 20160510144200 BuildsAddPrivate: migrating =================================1726-- change_table(:builds)1727 -> 0.0009s1728== 20160510144200 BuildsAddPrivate: migrated (0.0010s) ========================1730== 20160510150300 JobsAddPrivate: migrating ===================================1731-- change_table(:jobs)1732 -> 0.0008s1733== 20160510150300 JobsAddPrivate: migrated (0.0008s) ==========================1735== 20160510150400 RequestsAddPrivate: migrating ===============================1736-- change_table(:requests)1737 -> 0.0008s1738== 20160510150400 RequestsAddPrivate: migrated (0.0009s) ======================1740== 20160513074300 AddCurrentBuildIdToRepositories: migrating ==================1741-- add_column(:repositories, :current_build_id, :bigint)1742 -> 0.0007s1743-- execute("ALTER TABLE repositories ADD CONSTRAINT fk_repositories_current_build_id FOREIGN KEY (current_build_id) REFERENCES builds (id);")1744 -> 0.0028s1745== 20160513074300 AddCurrentBuildIdToRepositories: migrated (0.0036s) =========1747== 20160609163600 PermissionsAddIndexUserIdAndRepositoryId: migrating =========1748-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_permissions_on_user_id_and_repository_id ON permissions (user_id, repository_id)")1749 -> 0.0012s1750== 20160609163600 PermissionsAddIndexUserIdAndRepositoryId: migrated (0.0013s)1752== 20160623133900 CreatePreviousJobStates: migrating ==========================1753-- create_table(:previous_job_states, {:id=>:integer})1754 -> 0.0041s1755-- add_column(:jobs, :previous_job_state_id, :bigint)1756 -> 0.0007s1757== 20160623133900 CreatePreviousJobStates: migrated (0.0049s) =================1759== 20160623133901 AddPreviousStatesTriggers: migrating ========================1760-- execute(" CREATE FUNCTION save_state_change() RETURNS trigger AS $$\n DECLARE\n previous_job_state_id BIGINT;\n BEGIN\n if TG_OP='UPDATE' then\n UPDATE previous_job_states SET ended_at = NOW() WHERE id = OLD.previous_job_state_id;\n end if;\n\n INSERT INTO previous_job_states (job_id, set_at, state) VALUES(NEW.id, NOW(), NEW.state)\n RETURNING id INTO previous_job_state_id;\n NEW.previous_job_state_id = previous_job_state_id;\n\n RETURN NEW;\n END;\n $$ LANGUAGE plpgsql;\n\n CREATE TRIGGER save_state_change_on_update\n BEFORE UPDATE on jobs\n FOR EACH ROW\n WHEN (OLD.state IS DISTINCT FROM NEW.state)\n EXECUTE PROCEDURE save_state_change();\n\n CREATE TRIGGER save_state_change_on_insert\n BEFORE INSERT on jobs\n FOR EACH ROW\n EXECUTE PROCEDURE save_state_change();\n")1761 -> 0.0030s1762== 20160623133901 AddPreviousStatesTriggers: migrated (0.0031s) ===============1764== 20160712125400 RevertPreviousJobStates: migrating ==========================1765-- execute(" DROP TRIGGER IF EXISTS save_state_change_on_update on jobs;\n DROP TRIGGER IF EXISTS save_state_change_on_insert on jobs;\n DROP FUNCTION IF EXISTS save_state_change();\n")1766 -> 0.0010s1767-- remove_column(:jobs, :previous_job_state_id)1768 -> 0.0007s1769-- drop_table(:previous_job_states)1770 -> 0.0016s1771== 20160712125400 RevertPreviousJobStates: migrated (0.0038s) =================1773== 20160819103700 AddAvatarUrlToUsers: migrating ==============================1774-- add_column(:users, :avatar_url, :string)1775 -> 0.0010s1776== 20160819103700 AddAvatarUrlToUsers: migrated (0.0010s) =====================1778== 20160920220400 AddRoleToMemberships: migrating =============================1779-- add_column(:memberships, :role, :string)1780 -> 0.0048s1781== 20160920220400 AddRoleToMemberships: migrated (0.0048s) ====================1783== 20161028154600 RemoveTypeIndices: migrating ================================1784-- execute("DROP INDEX CONCURRENTLY IF EXISTS index_requests_on_event_type")1785 -> 0.0003s1786-- execute("DROP INDEX CONCURRENTLY IF EXISTS index_jobs_on_owner_type")1787 -> 0.0014s1788== 20161028154600 RemoveTypeIndices: migrated (0.0018s) =======================1790== 20161101000000 AddNextRunLastRunToCrons: migrating =========================1791-- column_exists?(:crons, :next_run)1792 -> 0.0100s1793-- add_column(:crons, :next_run, :timestamp, {:precision=>nil})1794 -> 0.0054s1795-- column_exists?(:crons, :last_run)1796 -> 0.0096s1797-- add_column(:crons, :last_run, :timestamp, {:precision=>nil})1798 -> 0.0368s1799== 20161101000000 AddNextRunLastRunToCrons: migrated (0.0620s) ================1801== 20161101000001 AddDontRunIfRecentBuildExists: migrating ====================1802-- column_exists?(:crons, :dont_run_if_recent_build_exists)1803 -> 0.0262s1804-- add_column(:crons, :dont_run_if_recent_build_exists, :boolean, {:default=>false})1805 -> 0.0320s1806== 20161101000001 AddDontRunIfRecentBuildExists: migrated (0.0583s) ===========1808== 20161201112200 CreateBetaFeatures: migrating ===============================1809-- create_table(:beta_features, {:id=>:integer})1810 -> 0.0090s1811== 20161201112200 CreateBetaFeatures: migrated (0.0091s) ======================1813== 20161201112600 CreateUserBetaFeatures: migrating ===========================1814-- create_table(:user_beta_features, {:id=>:integer})1815 -> 0.0017s1816-- add_index(:user_beta_features, [:user_id, :beta_feature_id])1817 -> 0.0006s1818== 20161201112600 CreateUserBetaFeatures: migrated (0.0023s) ==================1820== 20161202000000 RemoveDisableByBuildFromCrons: migrating ====================1821-- remove_column(:crons, :disable_by_build)1822 -> 0.0007s1823== 20161202000000 RemoveDisableByBuildFromCrons: migrated (0.0007s) ===========1825== 20161206155800 AddBillingAdminOnlyToOrganizations: migrating ===============1826-- add_column(:organizations, :billing_admin_only, :boolean)1827 -> 0.0006s1828== 20161206155800 AddBillingAdminOnlyToOrganizations: migrated (0.0007s) ======1830== 20161221171300 BuildsAddIndexRepositoryIdAndNumber: migrating ==============1831-- execute("CREATE INDEX CONCURRENTLY index_builds_on_repository_id_and_number ON builds(repository_id, (number::integer))")1832 -> 0.0008s1833== 20161221171300 BuildsAddIndexRepositoryIdAndNumber: migrated (0.0008s) =====1835== 20170211000000 JobsAddStageNumber: migrating ===============================1836-- add_column(:jobs, :stage_number, :string)1837 -> 0.0006s1838== 20170211000000 JobsAddStageNumber: migrated (0.0007s) ======================1840== 20170211000001 JobsAddStageId: migrating ===================================1841-- change_table(:jobs)1842 -> 0.0007s1843== 20170211000001 JobsAddStageId: migrated (0.0008s) ==========================1845== 20170211000002 StagesCreate: migrating =====================================1846-- create_table(:stages, {:id=>:integer})1847 -> 0.0017s1848== 20170211000002 StagesCreate: migrated (0.0018s) ============================1850== 20170211000003 StagesAddStateAndTimestamps: migrating ======================1851-- change_table(:stages)1852 -> 0.0014s1853== 20170211000003 StagesAddStateAndTimestamps: migrated (0.0014s) =============1855== 20170213124000 AddConstraintForOwnerIdToSubscriptions: migrating ===========1856-- execute("CREATE UNIQUE INDEX subscriptions_owner ON subscriptions (owner_id, owner_type) WHERE (status = 'subscribed');")1857 -> 0.0009s1858== 20170213124000 AddConstraintForOwnerIdToSubscriptions: migrated (0.0009s) ==1860== 20170316000000 QueueableJobsCreate: migrating ==============================1861-- create_table(:queueable_jobs, {:id=>:integer})1862 -> 0.0014s1863== 20170316000000 QueueableJobsCreate: migrated (0.0014s) =====================1865== 20170316000001 QueueableJobsIndexJobId: migrating ==========================1866-- add_index(:queueable_jobs, :job_id, {:algorithm=>:concurrently})1867 -> 0.0009s1868== 20170316000001 QueueableJobsIndexJobId: migrated (0.0009s) =================1870== 20170318000000 PullRequestsCreate: migrating ===============================1871-- create_table(:pull_requests, {:id=>:integer})1872 -> 0.0019s1873== 20170318000000 PullRequestsCreate: migrated (0.0019s) ======================1875== 20170318000001 RequestsAddPullRequestId: migrating =========================1876-- change_table(:requests)1877 -> 0.0007s1878== 20170318000001 RequestsAddPullRequestId: migrated (0.0007s) ================1880== 20170318000002 BuildsAddPullRequestId: migrating ===========================1881-- change_table(:builds)1882 -> 0.0007s1883== 20170318000002 BuildsAddPullRequestId: migrated (0.0007s) ==================1885== 20170322000000 AddIndexOnRequestsRepositoryIdAndIdDesc: migrating ==========1886-- execute("CREATE INDEX CONCURRENTLY index_requests_on_repository_id_and_id_desc ON requests (repository_id, id DESC);")1887 -> 0.0006s1888== 20170322000000 AddIndexOnRequestsRepositoryIdAndIdDesc: migrated (0.0006s) =1890== 20170331000000 AddIndexRepositoryIdOnPullRequests: migrating ===============1891-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_pull_requests_on_repository_id_and_number ON pull_requests (repository_id, (number::integer));")1892 -> 0.0006s1893== 20170331000000 AddIndexRepositoryIdOnPullRequests: migrated (0.0006s) ======1895== 20170401000000 OwnerGroupsCreate: migrating ================================1896-- create_table(:owner_groups, {:id=>:integer})1897 -> 0.0018s1898== 20170401000000 OwnerGroupsCreate: migrated (0.0018s) =======================1900== 20170401000001 OwnerGroupsIndexOwnerIdOwnerType: migrating =================1901-- execute("CREATE INDEX CONCURRENTLY index_owner_groups_on_owner_type_and_owner_id ON owner_groups (owner_type, owner_id);")1902 -> 0.0006s1903== 20170401000001 OwnerGroupsIndexOwnerIdOwnerType: migrated (0.0006s) ========1905== 20170401000002 OwnerGroupsIndexUuid: migrating =============================1906-- execute("CREATE INDEX CONCURRENTLY index_owner_groups_on_uuid ON owner_groups (uuid);")1907 -> 0.0006s1908== 20170401000002 OwnerGroupsIndexUuid: migrated (0.0006s) ====================1910== 20170405000000 TagsCreate: migrating =======================================1911-- create_table(:tags, {:id=>:integer})1912 -> 0.0017s1913== 20170405000000 TagsCreate: migrated (0.0018s) ==============================1915== 20170405000001 RequestsAddBranchIdAndTagId: migrating ======================1916-- change_table(:requests)1917 -> 0.0126s1918== 20170405000001 RequestsAddBranchIdAndTagId: migrated (0.0127s) =============1920== 20170405000002 CommitsAddBranchIdAndTagId: migrating =======================1921-- change_table(:commits)1922 -> 0.0013s1923== 20170405000002 CommitsAddBranchIdAndTagId: migrated (0.0017s) ==============1925== 20170405000003 BuildsAddBranchIdAndTagId: migrating ========================1926-- change_table(:builds)1927 -> 0.0048s1928== 20170405000003 BuildsAddBranchIdAndTagId: migrated (0.0049s) ===============1930== 20170408000000 RequestsAddSenderId: migrating ==============================1931-- change_table(:requests)1932 -> 0.0038s1933== 20170408000000 RequestsAddSenderId: migrated (0.0038s) =====================1935== 20170408000001 BuildsAddSenderId: migrating ================================1936-- change_table(:builds)1937 -> 0.0027s1938== 20170408000001 BuildsAddSenderId: migrated (0.0034s) =======================1940== 20170410000000 JobsIndexStageId: migrating =================================1941-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_stage_id ON jobs (stage_id);")1942 -> 0.0008s1943== 20170410000000 JobsIndexStageId: migrated (0.0008s) ========================1945== 20170411000000 TagsIndexRepoIdAndName: migrating ===========================1946-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_tags_on_repository_id_and_name ON tags (repository_id, name);")1947 -> 0.0009s1948== 20170411000000 TagsIndexRepoIdAndName: migrated (0.0009s) ==================1950== 20170419093249 AddSourceToSubscriptions: migrating =========================1951-- execute(" CREATE TYPE source_type AS ENUM ('manual', 'stripe', 'github', 'unknown');\n")1952 -> 0.0014s1953-- add_column(:subscriptions, :source, :source_type, {:default=>"unknown", :null=>false})1954 -> 0.0038s1955== 20170419093249 AddSourceToSubscriptions: migrated (0.0054s) ================1957== 20170531125700 AddIndexOnBuildsSenderTypeAndSenderId: migrating ============1958-- execute("CREATE INDEX CONCURRENTLY index_builds_on_sender_type_and_sender_id ON builds (sender_type, sender_id);")1959 -> 0.0009s1960== 20170531125700 AddIndexOnBuildsSenderTypeAndSenderId: migrated (0.0017s) ===1962== 20170601163700 DropIndexOnRepositoriesBuildsAndCommits: migrating ==========1963-- execute("DROP INDEX CONCURRENTLY index_repositories_on_lower_owner_name")1964 -> 0.0007s1965-- execute("DROP INDEX CONCURRENTLY index_repositories_on_owner_type")1966 -> 0.0011s1967-- execute("DROP INDEX CONCURRENTLY index_commits_on_repository_id")1968 -> 0.0011s1969-- execute("DROP INDEX CONCURRENTLY index_builds_on_number")1970 -> 0.0006s1971== 20170601163700 DropIndexOnRepositoriesBuildsAndCommits: migrated (0.0038s) =1973== 20170601164400 AddIndexOnBuildsAndStages: migrating ========================1974-- execute("CREATE INDEX CONCURRENTLY index_builds_on_repository_id_and_branch_and_event_type_and_id ON builds (repository_id, branch, event_type, id)")1975 -> 0.0009s1976-- execute("CREATE INDEX CONCURRENTLY index_stages_on_build_id ON stages (build_id)")1977 -> 0.0031s1978== 20170601164400 AddIndexOnBuildsAndStages: migrated (0.0053s) ===============1980== 20170609174400 DropUnusedIndexesOnJobsAndBuilds: migrating =================1981-- execute("DROP INDEX CONCURRENTLY index_jobs_on_repository_id")1982 -> 0.0006s1983-- execute("DROP INDEX CONCURRENTLY index_jobs_on_queued_at")1984 -> 0.0007s1985-- execute("DROP INDEX CONCURRENTLY index_jobs_on_queue")1986 -> 0.0007s1987-- execute("DROP INDEX CONCURRENTLY index_jobs_on_owner_id")1988 -> 0.0011s1989-- execute("DROP INDEX CONCURRENTLY index_builds_on_branch")1990 -> 0.0014s1991-- execute("DROP INDEX CONCURRENTLY index_builds_on_event_type")1992 -> 0.0015s1993-- execute("DROP INDEX CONCURRENTLY index_builds_on_owner_id")1994 -> 0.0007s1995== 20170609174400 DropUnusedIndexesOnJobsAndBuilds: migrated (0.0076s) ========1997== 20170613000000 CreateTrials: migrating =====================================1998-- create_table(:trials, {:id=>:integer})1999 -> 0.0046s2000-- execute("CREATE INDEX CONCURRENTLY index_trials_on_owner ON trials(owner_id, owner_type)")2001 -> 0.0008s2002== 20170613000000 CreateTrials: migrated (0.0055s) ============================2004== 20170620144500 AddIndexesOnBuildsAndJobsAndBranches: migrating =============2005-- execute("CREATE INDEX CONCURRENTLY index_builds_on_repository_id_and_branch_and_id_desc ON builds (repository_id, branch, id DESC)")2006 -> 0.0009s2007-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_owner_id_and_owner_type_and_state ON jobs (owner_id, owner_type, state)")2008 -> 0.0009s2009-- execute("CREATE INDEX CONCURRENTLY index_branches_on_repository_id ON branches (repository_id)")2010 -> 0.0007s2011== 20170620144500 AddIndexesOnBuildsAndJobsAndBranches: migrated (0.0027s) ====2013== 20170621142300 RemovePlansTable: migrating =================================2014-- drop_table(:plans)2015 -> 0.0013s2016== 20170621142300 RemovePlansTable: migrated (0.0013s) ========================2018== 20170713162000 AddCcLastDigitsToInvoices: migrating ========================2019-- change_table(:invoices)2020 -> 0.0008s2021== 20170713162000 AddCcLastDigitsToInvoices: migrated (0.0008s) ===============2023== 20170822171600 CreateMessages: migrating ===================================2024-- create_table("messages", {:force=>:cascade, :id=>:integer})2025 -> 0.0047s2026-- execute("CREATE INDEX CONCURRENTLY index_messages_on_subject_type_and_subject_id ON messages(subject_type, subject_id)")2027 -> 0.0012s2028== 20170822171600 CreateMessages: migrated (0.0061s) ==========================2030== 20170831000000 CreateTrialAllowances: migrating ============================2031-- create_table(:trial_allowances, {:id=>:integer})2032 -> 0.0042s2033-- add_index(:trial_allowances, :trial_id)2034 -> 0.0009s2035-- add_index(:trial_allowances, [:creator_id, :creator_type])2036 -> 0.0009s2037== 20170831000000 CreateTrialAllowances: migrated (0.0063s) ===================2039== 20170911172800 AddIndexOnJobsUpdatedAt: migrating ==========================2040-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_updated_at ON jobs (updated_at)")2041 -> 0.0014s2042== 20170911172800 AddIndexOnJobsUpdatedAt: migrated (0.0014s) =================2044== 20171017104500 AddConcurrencyToSubscriptions: migrating ====================2045-- change_table(:subscriptions)2046 -> 0.0009s2047== 20171017104500 AddConcurrencyToSubscriptions: migrated (0.0010s) ===========2049== 20171024000000 AddAbuseTable: migrating ====================================2050-- create_table(:abuses, {:id=>:integer})2051 -> 0.0092s2052-- execute("CREATE INDEX CONCURRENTLY index_abuses_on_owner ON abuses(owner_id)")2053 -> 0.0022s2054== 20171024000000 AddAbuseTable: migrated (0.0116s) ===========================2056== 20171025000000 AddUpdatedAtTriggerToBuildsAndJobs: migrating ===============2057-- execute(" CREATE FUNCTION set_updated_at() RETURNS trigger AS $$\n BEGIN\n IF TG_OP = 'INSERT' OR\n (TG_OP = 'UPDATE' AND NEW.* IS DISTINCT FROM OLD.*) THEN\n NEW.updated_at := statement_timestamp();\n END IF;\n RETURN NEW;\n END;\n $$ LANGUAGE plpgsql;\n\n CREATE TRIGGER set_updated_at_on_builds\n BEFORE INSERT OR UPDATE ON builds\n FOR EACH ROW\n EXECUTE PROCEDURE set_updated_at();\n\n CREATE TRIGGER set_updated_at_on_jobs\n BEFORE INSERT OR UPDATE ON jobs\n FOR EACH ROW\n EXECUTE PROCEDURE set_updated_at();\n")2058 -> 0.0012s2059== 20171025000000 AddUpdatedAtTriggerToBuildsAndJobs: migrated (0.0012s) ======2061== 20171103000000 UpdateIndexOnAbuses: migrating ==============================2062-- index_exists?(:abuses, :owner, {:name=>"index_abuses_on_owner"})2063 -> 0.0014s2064-- index_exists?(:abuses, [:owner_id, :owner_type, :level], {:name=>"index_abuses_on_owner_id_and_owner_type_and_level"})2065 -> 0.0012s2066-- add_index(:abuses, [:owner_id, :owner_type, :level], {:unique=>true, :algorithm=>:concurrently})2067 -> 0.0007s2068== 20171103000000 UpdateIndexOnAbuses: migrated (0.0034s) =====================2070== 20171211000000 AddRepositoryIdBranchEventTypeIndexOnBuilds: migrating ======2071-- execute("CREATE INDEX CONCURRENTLY index_builds_on_repository_id_and_branch_and_event_type ON builds (repository_id, branch, event_type) WHERE state IN ('created', 'queued', 'received')")2072 -> 0.0008s2073== 20171211000000 AddRepositoryIdBranchEventTypeIndexOnBuilds: migrated (0.0008s)2075== 20180212000000 UsersAddSuspended: migrating ================================2076-- add_column(:users, :suspended, :boolean, {:default=>false})2077 -> 0.0049s2078== 20180212000000 UsersAddSuspended: migrated (0.0051s) =======================2080== 20180213000000 UsersAddSuspendedAt: migrating ==============================2081-- add_column(:users, :suspended_at, :timestamp, {:precision=>nil})2082 -> 0.0022s2083== 20180213000000 UsersAddSuspendedAt: migrated (0.0024s) =====================2085== 20180222000000 AddComIdAndOrgId: migrating =================================2086-- add_column(:branches, :org_id, :integer)2087 -> 0.0022s2088-- add_column(:builds, :org_id, :integer)2089 -> 0.0013s2090-- add_column(:commits, :org_id, :integer)2091 -> 0.0013s2092-- add_column(:crons, :org_id, :integer)2093 -> 0.0126s2094-- add_column(:jobs, :org_id, :integer)2095 -> 0.0022s2096-- add_column(:organizations, :org_id, :integer)2097 -> 0.0022s2098-- add_column(:permissions, :org_id, :integer)2099 -> 0.0019s2100-- add_column(:pull_requests, :org_id, :integer)2101 -> 0.0019s2102-- add_column(:repositories, :org_id, :integer)2103 -> 0.0021s2104-- add_column(:requests, :org_id, :integer)2105 -> 0.0038s2106-- add_column(:ssl_keys, :org_id, :integer)2107 -> 0.0019s2108-- add_column(:stages, :org_id, :integer)2109 -> 0.0019s2110-- add_column(:tags, :org_id, :integer)2111 -> 0.0019s2112-- add_column(:users, :org_id, :integer)2113 -> 0.0020s2114-- add_column(:branches, :com_id, :integer)2115 -> 0.0018s2116-- add_column(:builds, :com_id, :integer)2117 -> 0.0019s2118-- add_column(:commits, :com_id, :integer)2119 -> 0.0018s2120-- add_column(:crons, :com_id, :integer)2121 -> 0.0018s2122-- add_column(:jobs, :com_id, :integer)2123 -> 0.0020s2124-- add_column(:organizations, :com_id, :integer)2125 -> 0.0019s2126-- add_column(:permissions, :com_id, :integer)2127 -> 0.0019s2128-- add_column(:pull_requests, :com_id, :integer)2129 -> 0.0015s2130-- add_column(:repositories, :com_id, :integer)2131 -> 0.0006s2132-- add_column(:requests, :com_id, :integer)2133 -> 0.0004s2134-- add_column(:ssl_keys, :com_id, :integer)2135 -> 0.0004s2136-- add_column(:stages, :com_id, :integer)2137 -> 0.0004s2138-- add_column(:tags, :com_id, :integer)2139 -> 0.0004s2140-- add_column(:users, :com_id, :integer)2141 -> 0.0004s2142== 20180222000000 AddComIdAndOrgId: migrated (0.0616s) ========================2144== 20180222000001 AddComIdAndOrgIdIndices: migrating ==========================2145-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_branches_on_org_id ON branches USING btree (org_id)")2146 -> 0.0007s2147-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_builds_on_org_id ON builds USING btree (org_id)")2148 -> 0.0007s2149-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_jobs_on_org_id ON jobs USING btree (org_id)")2150 -> 0.0007s2151-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_commits_on_org_id ON commits USING btree (org_id)")2152 -> 0.0006s2153-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_crons_on_org_id ON crons USING btree (org_id)")2154 -> 0.0006s2155-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_organizations_on_org_id ON organizations USING btree (org_id)")2156 -> 0.0006s2157-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_permissions_on_org_id ON permissions USING btree (org_id)")2158 -> 0.0006s2159-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_pull_requests_on_org_id ON pull_requests USING btree (org_id)")2160 -> 0.0006s2161-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_repositories_on_org_id ON repositories USING btree (org_id)")2162 -> 0.0006s2163-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_requests_on_org_id ON requests USING btree (org_id)")2164 -> 0.0006s2165-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_ssl_keys_on_org_id ON ssl_keys USING btree (org_id)")2166 -> 0.0006s2167-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_stages_on_org_id ON stages USING btree (org_id)")2168 -> 0.0006s2169-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_tags_on_org_id ON tags USING btree (org_id)")2170 -> 0.0007s2171-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_users_on_org_id ON users USING btree (org_id)")2172 -> 0.0006s2173-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_branches_on_com_id ON branches USING btree (com_id)")2174 -> 0.0006s2175-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_builds_on_com_id ON builds USING btree (com_id)")2176 -> 0.0006s2177-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_jobs_on_com_id ON jobs USING btree (com_id)")2178 -> 0.0006s2179-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_commits_on_com_id ON commits USING btree (com_id)")2180 -> 0.0006s2181-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_crons_on_com_id ON crons USING btree (com_id)")2182 -> 0.0005s2183-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_organizations_on_com_id ON organizations USING btree (com_id)")2184 -> 0.0005s2185-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_permissions_on_com_id ON permissions USING btree (com_id)")2186 -> 0.0006s2187-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_pull_requests_on_com_id ON pull_requests USING btree (com_id)")2188 -> 0.0005s2189-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_repositories_on_com_id ON repositories USING btree (com_id)")2190 -> 0.0006s2191-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_requests_on_com_id ON requests USING btree (com_id)")2192 -> 0.0006s2193-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_ssl_keys_on_com_id ON ssl_keys USING btree (com_id)")2194 -> 0.0005s2195-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_stages_on_com_id ON stages USING btree (com_id)")2196 -> 0.0005s2197-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_tags_on_com_id ON tags USING btree (com_id)")2198 -> 0.0005s2199-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_users_on_com_id ON users USING btree (com_id)")2200 -> 0.0006s2201== 20180222000001 AddComIdAndOrgIdIndices: migrated (0.0172s) =================2203== 20180222000002 AddMigrating: migrating =====================================2204-- add_column(:repositories, :migrating, :boolean)2205 -> 0.0007s2206-- add_column(:repositories, :migrated_at, :timestamp, {:precision=>nil})2207 -> 0.0004s2208-- add_column(:organizations, :migrating, :boolean)2209 -> 0.0004s2210-- add_column(:organizations, :migrated_at, :timestamp, {:precision=>nil})2211 -> 0.0004s2212-- add_column(:users, :migrating, :boolean)2213 -> 0.0004s2214-- add_column(:users, :migrated_at, :timestamp, {:precision=>nil})2215 -> 0.0004s2216== 20180222000002 AddMigrating: migrated (0.0028s) ============================2218== 20180222000003 DropFkRepositoriesCurrentBuildId: migrating =================2219-- execute("ALTER TABLE repositories DROP CONSTRAINT fk_repositories_current_build_id")2220 -> 0.0008s2221== 20180222000003 DropFkRepositoriesCurrentBuildId: migrated (0.0009s) ========2223== 20180222000009 CreateRepoCounts: migrating =================================2224-- create_table(:repo_counts, {:id=>false})2225 -> 0.0016s2226-- add_index(:repo_counts, :repository_id)2227 -> 0.0006s2228== 20180222000009 CreateRepoCounts: migrated (0.0022s) ========================2230== 20180222000012 CreateRepoCountsTriggers: migrating =========================2231-- execute("create or replace function count_requests() returns trigger as $$\ndeclare\n c text;\n r record;\nbegin\n if tg_argv[0]::int > 0 then r := new; else r := old; end if;\n if r.repository_id is not null then\n insert into repo_counts(repository_id, requests)\n values(r.repository_id, tg_argv[0]::int);\n end if;\n return r;\nexception when others then\n get stacked diagnostics c = pg_exception_context;\n raise warning '% context: %s', sqlerrm, c;\n return r;\nend;\n$$\nlanguage plpgsql;\ndrop trigger if exists trg_count_request_inserted on requests;\ncreate trigger trg_count_request_inserted after insert on requests\nfor each row when (now() > '2018-01-01 00:00:00') execute procedure count_requests(1);\ndrop trigger if exists trg_count_request_deleted on requests;\ncreate trigger trg_count_request_deleted after delete on requests\nfor each row when (now() > '2018-01-01 00:00:00') execute procedure count_requests('-1');\n\ncreate or replace function count_commits() returns trigger as $$\ndeclare\n c text;\n r record;\nbegin\n if tg_argv[0]::int > 0 then r := new; else r := old; end if;\n if r.repository_id is not null then\n insert into repo_counts(repository_id, commits)\n values(r.repository_id, tg_argv[0]::int);\n end if;\n return r;\nexception when others then\n get stacked diagnostics c = pg_exception_context;\n raise warning '% context: %s', sqlerrm, c;\n return r;\nend;\n$$\nlanguage plpgsql;\ndrop trigger if exists trg_count_commit_inserted on commits;\ncreate trigger trg_count_commit_inserted after insert on commits\nfor each row when (now() > '2018-01-01 00:00:00') execute procedure count_commits(1);\ndrop trigger if exists trg_count_commit_deleted on commits;\ncreate trigger trg_count_commit_deleted after delete on commits\nfor each row when (now() > '2018-01-01 00:00:00') execute procedure count_commits('-1');\n\ncreate or replace function count_branches() returns trigger as $$\ndeclare\n c text;\n r record;\nbegin\n if tg_argv[0]::int > 0 then r := new; else r := old; end if;\n if r.repository_id is not null then\n insert into repo_counts(repository_id, branches)\n values(r.repository_id, tg_argv[0]::int);\n end if;\n return r;\nexception when others then\n get stacked diagnostics c = pg_exception_context;\n raise warning '% context: %s', sqlerrm, c;\n return r;\nend;\n$$\nlanguage plpgsql;\ndrop trigger if exists trg_count_branch_inserted on branches;\ncreate trigger trg_count_branch_inserted after insert on branches\nfor each row when (now() > '2018-01-01 00:00:00') execute procedure count_branches(1);\ndrop trigger if exists trg_count_branch_deleted on branches;\ncreate trigger trg_count_branch_deleted after delete on branches\nfor each row when (now() > '2018-01-01 00:00:00') execute procedure count_branches('-1');\n\ncreate or replace function count_pull_requests() returns trigger as $$\ndeclare\n c text;\n r record;\nbegin\n if tg_argv[0]::int > 0 then r := new; else r := old; end if;\n if r.repository_id is not null then\n insert into repo_counts(repository_id, pull_requests)\n values(r.repository_id, tg_argv[0]::int);\n end if;\n return r;\nexception when others then\n get stacked diagnostics c = pg_exception_context;\n raise warning '% context: %s', sqlerrm, c;\n return r;\nend;\n$$\nlanguage plpgsql;\ndrop trigger if exists trg_count_pull_request_inserted on pull_requests;\ncreate trigger trg_count_pull_request_inserted after insert on pull_requests\nfor each row when (now() > '2018-01-01 00:00:00') execute procedure count_pull_requests(1);\ndrop trigger if exists trg_count_pull_request_deleted on pull_requests;\ncreate trigger trg_count_pull_request_deleted after delete on pull_requests\nfor each row when (now() > '2018-01-01 00:00:00') execute procedure count_pull_requests('-1');\n\ncreate or replace function count_tags() returns trigger as $$\ndeclare\n c text;\n r record;\nbegin\n if tg_argv[0]::int > 0 then r := new; else r := old; end if;\n if r.repository_id is not null is not null then\n insert into repo_counts(repository_id, tags)\n values(r.repository_id, tg_argv[0]::int);\n end if;\n return r;\nexception when others then\n get stacked diagnostics c = pg_exception_context;\n raise warning '% context: %s', sqlerrm, c;\n return r;\nend;\n$$\nlanguage plpgsql;\ndrop trigger if exists trg_count_tag_inserted on tags;\ncreate trigger trg_count_tag_inserted after insert on tags\nfor each row when (now() > '2018-01-01 00:00:00') execute procedure count_tags(1);\ndrop trigger if exists trg_count_tag_deleted on tags;\ncreate trigger trg_count_tag_deleted after delete on tags\nfor each row when (now() > '2018-01-01 00:00:00') execute procedure count_tags('-1');\n\ncreate or replace function count_builds() returns trigger as $$\ndeclare\n c text;\n r record;\nbegin\n if tg_argv[0]::int > 0 then r := new; else r := old; end if;\n if r.repository_id is not null then\n insert into repo_counts(repository_id, builds)\n values(r.repository_id, tg_argv[0]::int);\n end if;\n return r;\nexception when others then\n get stacked diagnostics c = pg_exception_context;\n raise warning '% context: %s', sqlerrm, c;\n return r;\nend;\n$$\nlanguage plpgsql;\ndrop trigger if exists trg_count_build_inserted on builds;\ncreate trigger trg_count_build_inserted after insert on builds\nfor each row when (now() > '2018-01-01 00:00:00') execute procedure count_builds(1);\ndrop trigger if exists trg_count_build_deleted on builds;\ncreate trigger trg_count_build_deleted after delete on builds\nfor each row when (now() > '2018-01-01 00:00:00') execute procedure count_builds('-1');\n\n-- -- todo stages really should have a repository_id\n-- create or replace function count_stages() returns trigger as $$\n-- declare\n-- c text;\n-- r record;\n-- build record;\n-- begin\n-- if tg_argv[0]::int > 0 then r := new; else r := old; end if;\n-- select repository_id from builds as b where b.id = r.build_id into build;\n-- if build.repository_id is not null then\n-- insert into repo_counts(repository_id, stages)\n-- values(build.repository_id, tg_argv[0]::int);\n-- end if;\n-- return r;\n-- exception when others then\n-- get stacked diagnostics c = pg_exception_context;\n-- raise warning '% context: %s', sqlerrm, c;\n-- return r;\n-- end;\n-- $$\n-- language plpgsql;\n-- drop trigger if exists trg_count_stage_inserted on stages;\n-- create trigger trg_count_stage_inserted after insert on stages\n-- for each row when (now() > '2018-01-01 00:00:00') execute procedure count_stages(1);\n-- drop trigger if exists trg_count_stage_deleted on stages;\n-- create trigger trg_count_stage_deleted after delete on stages\n-- for each row when (now() > '2018-01-01 00:00:00') execute procedure count_stages('-1');\n\ncreate or replace function count_jobs() returns trigger as $$\ndeclare\n c text;\n r record;\nbegin\n if tg_argv[0]::int > 0 then r := new; else r := old; end if;\n if r.repository_id is not null then\n insert into repo_counts(repository_id, jobs)\n values(r.repository_id, tg_argv[0]::int);\n end if;\n return r;\nexception when others then\n get stacked diagnostics c = pg_exception_context;\n raise warning '% context: %s', sqlerrm, c;\n return r;\nend;\n$$\nlanguage plpgsql;\ndrop trigger if exists trg_count_job_inserted on jobs;\ncreate trigger trg_count_job_inserted after insert on jobs\nfor each row when (now() > '2018-01-01 00:00:00') execute procedure count_jobs(1);\ndrop trigger if exists trg_count_job_deleted on jobs;\ncreate trigger trg_count_job_deleted after delete on jobs\nfor each row when (now() > '2018-01-01 00:00:00') execute procedure count_jobs('-1');\n\ndrop function if exists count_requests(_start int, _end int);\ncreate or replace function count_requests(_start int, _end int)\nreturns table (repository_id int, requests bigint, range varchar) as $$\nbegin\n return query select t.repository_id, count(id) as requests, ('requests' || ':' || _start || ':' || _end)::varchar as range\n from requests as t\n where t.id between _start and _end and t.created_at <= '2018-01-01 00:00:00' and t.repository_id is not null\n group by t.repository_id;\nend;\n$$\nlanguage plpgsql;\n\ndrop function if exists count_commits(_start int, _end int);\ncreate or replace function count_commits(_start int, _end int)\nreturns table (repository_id int, commits bigint, range varchar) as $$\nbegin\n return query select r.id, count(t.id) as commits, ('commits' || ':' || _start || ':' || _end)::varchar as range\n from commits as t\n join repositories as r on t.repository_id = r.id\n where t.id between _start and _end and t.created_at <= '2018-01-01 00:00:00' and t.repository_id is not null\n group by r.id;\nend;\n$$\nlanguage plpgsql;\n\ndrop function if exists count_branches(_start int, _end int);\ncreate or replace function count_branches(_start int, _end int)\nreturns table (repository_id int, branches bigint, range varchar) as $$\nbegin\n return query select r.id, count(t.id) as branches, ('branches' || ':' || _start || ':' || _end)::varchar as range\n from branches as t\n join repositories as r on t.repository_id = r.id\n where t.id between _start and _end and t.created_at <= '2018-01-01 00:00:00' and t.repository_id is not null\n group by r.id;\nend;\n$$\nlanguage plpgsql;\n\ndrop function if exists count_pull_requests(_start int, _end int);\ncreate or replace function count_pull_requests(_start int, _end int)\nreturns table (repository_id int, pull_requests bigint, range varchar) as $$\nbegin\n return query select r.id, count(t.id) as pull_requests, ('pull_requests' || ':' || _start || ':' || _end)::varchar as range\n from pull_requests as t\n join repositories as r on t.repository_id = r.id\n where t.id between _start and _end and t.created_at <= '2018-01-01 00:00:00' and t.repository_id is not null\n group by r.id;\nend;\n$$\nlanguage plpgsql;\n\ndrop function if exists count_tags(_start int, _end int);\ncreate or replace function count_tags(_start int, _end int)\nreturns table (repository_id int, tags bigint, range varchar) as $$\nbegin\n return query select r.id, count(t.id) as tags, ('tags' || ':' || _start || ':' || _end)::varchar as range\n from tags as t\n join repositories as r on t.repository_id = r.id\n where t.id between _start and _end and t.created_at <= '2018-01-01 00:00:00' and t.repository_id is not null\n group by r.id;\nend;\n$$\nlanguage plpgsql;\n\ndrop function if exists count_builds(_start int, _end int);\ncreate or replace function count_builds(_start int, _end int)\nreturns table (repository_id int, builds bigint, range varchar) as $$\nbegin\n return query select t.repository_id, count(id) as builds, ('builds' || ':' || _start || ':' || _end)::varchar as range\n from builds as t\n where t.id between _start and _end and t.created_at <= '2018-01-01 00:00:00' and t.repository_id is not null\n group by t.repository_id;\nend;\n$$\nlanguage plpgsql;\n\n-- drop function if exists count_stages(_start int, _end int);\n-- create or replace function count_stages(_start int, _end int)\n-- returns table (repository_id int, stages bigint, range varchar) as $$\n-- begin\n-- return query select b.repository_id, count(t.id) as stages, ('stages' || ':' || _start || ':' || _end)::varchar as range\n-- from stages as t\n-- join builds as b on t.build_id = b.id\n-- where t.id between _start and _end and b.created_at <= '2018-01-01 00:00:00' and b.repository_id is not null\n-- group by b.repository_id;\n-- end;\n-- $$\n-- language plpgsql;\n\ndrop function if exists count_jobs(_start int, _end int);\ncreate or replace function count_jobs(_start int, _end int)\nreturns table (repository_id int, jobs bigint, range varchar) as $$\nbegin\n return query select t.repository_id, count(id) as jobs, ('jobs' || ':' || _start || ':' || _end)::varchar as range\n from jobs as t\n where t.id between _start and _end and t.created_at <= '2018-01-01 00:00:00' and t.repository_id is not null\n group by t.repository_id;\nend;\n$$\nlanguage plpgsql;\n\ndrop function if exists count_all_requests(_count int, _start int, _end int);\ncreate or replace function count_all_requests(_count int, _start int, _end int) returns boolean as $$\ndeclare max int;\nbegin\n select id + _count from requests order by id desc limit 1 into max;\n for i in _start.._end by _count loop\n if i > max then exit; end if;\n begin\n raise notice 'counting requests %', i;\n insert into repo_counts(repository_id, requests, range)\n select * from count_requests(i, i + _count - 1);\n exception when unique_violation then end;\n end loop;\n\n return true;\nend\n$$\nlanguage plpgsql;\n\ndrop function if exists count_all_commits(_count int, _start int, _end int);\ncreate or replace function count_all_commits(_count int, _start int, _end int) returns boolean as $$\ndeclare max int;\nbegin\n select id + _count from commits order by id desc limit 1 into max;\n\n for i in _start.._end by _count loop\n if i > max then exit; end if;\n begin\n raise notice 'counting commits %', i;\n insert into repo_counts(repository_id, commits, range)\n select * from count_commits(i, i + _count - 1);\n exception when unique_violation then end;\n end loop;\n\n return true;\nend\n$$\nlanguage plpgsql;\n\ndrop function if exists count_all_branches(_count int, _start int, _end int);\ncreate or replace function count_all_branches(_count int, _start int, _end int) returns boolean as $$\ndeclare max int;\nbegin\n select id + _count from branches order by id desc limit 1 into max;\n\n for i in _start.._end by _count loop\n if i > max then exit; end if;\n begin\n raise notice 'counting branches %', i;\n insert into repo_counts(repository_id, branches, range)\n select * from count_branches(i, i + _count - 1);\n exception when unique_violation then end;\n end loop;\n\n return true;\nend\n$$\nlanguage plpgsql;\n\ndrop function if exists count_all_pull_requests(_count int, _start int, _end int);\ncreate or replace function count_all_pull_requests(_count int, _start int, _end int) returns boolean as $$\ndeclare max int;\nbegin\n select id + _count from pull_requests order by id desc limit 1 into max;\n\n for i in _start.._end by _count loop\n if i > max then exit; end if;\n begin\n raise notice 'counting pull_requests %', i;\n insert into repo_counts(repository_id, pull_requests, range)\n select * from count_pull_requests(i, i + _count - 1);\n exception when unique_violation then end;\n end loop;\n\n return true;\nend\n$$\nlanguage plpgsql;\n\ndrop function if exists count_all_tags(_count int, _start int, _end int);\ncreate or replace function count_all_tags(_count int, _start int, _end int) returns boolean as $$\ndeclare max int;\nbegin\n select id + _count from tags order by id desc limit 1 into max;\n\n for i in _start.._end by _count loop\n if i > max then exit; end if;\n begin\n raise notice 'counting tags %', i;\n insert into repo_counts(repository_id, tags, range)\n select * from count_tags(i, i + _count - 1);\n exception when unique_violation then end;\n end loop;\n\n return true;\nend\n$$\nlanguage plpgsql;\n\ndrop function if exists count_all_builds(_count int, _start int, _end int);\ncreate or replace function count_all_builds(_count int, _start int, _end int) returns boolean as $$\ndeclare max int;\nbegin\n select id + _count from builds order by id desc limit 1 into max;\n\n for i in _start.._end by _count loop\n if i > max then exit; end if;\n begin\n raise notice 'counting builds %', i;\n insert into repo_counts(repository_id, builds, range)\n select * from count_builds(i, i + _count - 1);\n exception when unique_violation then end;\n end loop;\n\n return true;\nend\n$$\nlanguage plpgsql;\n\n-- drop function if exists count_all_stages(_count int, _start int, _end int);\n-- create or replace function count_all_stages(_count int, _start int, _end int) returns boolean as $$\n-- declare max int;\n-- begin\n-- select id + _count from stages order by id desc limit 1 into max;\n--\n-- for i in _start.._end by _count loop\n-- if i > max then exit; end if;\n-- begin\n-- raise notice 'counting stages %', i;\n-- insert into repo_counts(repository_id, stages, range)\n-- select * from count_stages(i, i + _count - 1);\n-- exception when unique_violation then end;\n-- end loop;\n--\n-- return true;\n-- end\n-- $$\n-- language plpgsql;\n\ndrop function if exists count_all_jobs(_count int, _start int, _end int);\ncreate or replace function count_all_jobs(_count int, _start int, _end int) returns boolean as $$\ndeclare max int;\nbegin\n select id + _count from jobs order by id desc limit 1 into max;\n\n for i in _start.._end by _count loop\n if i > max then exit; end if;\n begin\n raise notice 'counting jobs %', i;\n insert into repo_counts(repository_id, jobs, range)\n select * from count_jobs(i, i + _count - 1);\n exception when unique_violation then end;\n end loop;\n\n return true;\nend\n$$\nlanguage plpgsql;\n\n\ncreate or replace function agg_all_repo_counts()\nreturns boolean as $$\nbegin\n with src as (\n select cnt.repository_id\n from repo_counts cnt\n group by cnt.repository_id\n having count(1) > 1\n ),\n del as (\n delete from repo_counts cnt\n using src\n where cnt.repository_id = src.repository_id\n returning cnt.*\n ),\n agg as (\n select\n del.repository_id,\n sum(del.requests)::integer as requests,\n sum(del.commits)::integer as commits,\n sum(del.branches)::integer as branches,\n sum(del.pull_requests)::integer as pull_requests,\n sum(del.tags)::integer as tags,\n sum(del.builds)::integer as builds,\n -- sum(del.stages)::integer as stages,\n sum(del.jobs)::integer as jobs\n from del\n group by del.repository_id\n )\n insert into repo_counts(\n repository_id,\n requests,\n commits,\n branches,\n pull_requests,\n tags,\n builds,\n -- stages,\n jobs\n )\n select\n agg.repository_id,\n agg.requests,\n agg.commits,\n agg.branches,\n agg.pull_requests,\n agg.tags,\n agg.builds,\n -- agg.stages,\n agg.jobs\n from agg;\n\n return true;\nend;\n$$\nlanguage plpgsql;\n\ncreate or replace function agg_repo_counts(_repo_id int)\nreturns boolean as $$\nbegin\n with src as (\n select cnt.repository_id\n from repo_counts cnt\n where cnt.repository_id = _repo_id\n group by cnt.repository_id\n having count(1) > 1\n ),\n del as (\n delete from repo_counts cnt\n using src\n where cnt.repository_id = src.repository_id\n returning cnt.*\n ),\n agg as (\n select\n del.repository_id,\n sum(del.requests)::integer as requests,\n sum(del.commits)::integer as commits,\n sum(del.branches)::integer as branches,\n sum(del.pull_requests)::integer as pull_requests,\n sum(del.tags)::integer as tags,\n sum(del.builds)::integer as builds,\n -- sum(del.stages)::integer as stages,\n sum(del.jobs)::integer as jobs\n from del\n group by del.repository_id\n )\n insert into repo_counts(\n repository_id,\n requests,\n commits,\n branches,\n pull_requests,\n tags,\n builds,\n -- stages,\n jobs\n )\n select\n agg.repository_id,\n agg.requests,\n agg.commits,\n agg.branches,\n agg.pull_requests,\n agg.tags,\n agg.builds,\n -- agg.stages,\n agg.jobs\n from agg\n where agg.requests > 0 or agg.builds > 0 or agg.jobs > 0;\n\n return true;\nend;\n$$\nlanguage plpgsql;\n")2232 -> 0.0344s2233== 20180222000012 CreateRepoCountsTriggers: migrated (0.0349s) ================2235== 20180222164100 DropAnnotations: migrating ==================================2236-- drop_table(:annotations)2237 -> 0.0019s2238-- drop_table(:annotation_providers)2239 -> 0.0017s2240== 20180222164100 DropAnnotations: migrated (0.0038s) =========================2242== 20180305143800 IndexBuildsOnRepositoryIdWhereStateNotFinished: migrating ===2243-- execute("CREATE INDEX CONCURRENTLY index_builds_on_repository_id_where_state_not_finished ON builds (repository_id) WHERE state IN ('created', 'queued', 'received', 'started');")2244 -> 0.0013s2245== 20180305143800 IndexBuildsOnRepositoryIdWhereStateNotFinished: migrated (0.0015s)2247== 20180321102400 IndexJobsOnRepositoryIdWhereStateRunning: migrating =========2248-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_repository_id_where_state_running ON jobs (repository_id) WHERE state IN ('queued', 'received', 'started')")2249 -> 0.0051s2250== 20180321102400 IndexJobsOnRepositoryIdWhereStateRunning: migrated (0.0052s)2252== 20180330000000 CreateRequestPayloads: migrating ============================2253-- create_table(:request_payloads, {:id=>:integer})2254 -> 0.0076s2255-- add_index(:request_payloads, :request_id)2256 -> 0.0013s2257-- add_index(:request_payloads, [:created_at, :archived])2258 -> 0.0016s2259== 20180330000000 CreateRequestPayloads: migrated (0.0107s) ===================2261== 20180331000000 CreateConfigs: migrating ====================================2262-- create_table(:request_configs, {:id=>:integer})2263 -> 0.0068s2264-- create_table(:build_configs, {:id=>:integer})2265 -> 0.0067s2266-- create_table(:job_configs, {:id=>:integer})2267 -> 0.0066s2268-- add_index(:request_configs, [:repository_id, :key])2269 -> 0.0014s2270-- add_index(:build_configs, [:repository_id, :key])2271 -> 0.0015s2272-- add_index(:job_configs, [:repository_id, :key])2273 -> 0.0016s2274-- add_column(:requests, :config_id, :integer)2275 -> 0.0014s2276-- add_column(:builds, :config_id, :integer)2277 -> 0.0010s2278-- add_column(:jobs, :config_id, :integer)2279 -> 0.0014s2280== 20180331000000 CreateConfigs: migrated (0.0288s) ===========================2282== 20180404000001 CreateInstallations: migrating ==============================2283-- create_table(:installations, {:id=>:integer})2284 -> 0.0134s2285-- change_table(:repositories)2286 -> 0.0021s2287== 20180404000001 CreateInstallations: migrated (0.0155s) =====================2289== 20180410000000 RequestsDropPayload: migrating ==============================2290-- remove_column(:requests, :payload, :text)2291 -> 0.0010s2292== 20180410000000 RequestsDropPayload: migrated (0.0011s) =====================2294== 20180413000000 IndexBranchesOnRepositoryIdAndNameAndId: migrating ==========2295-- execute("CREATE INDEX CONCURRENTLY index_branches_on_repository_id_and_name_and_id ON branches (repository_id, name, id)")2296 -> 0.0015s2297-- execute("DROP INDEX CONCURRENTLY index_branches_on_repository_id_and_name")2298 -> 0.0011s2299== 20180413000000 IndexBranchesOnRepositoryIdAndNameAndId: migrated (0.0027s) =2301== 20180417000000 IndexBuildsOrganizationsUsersOnUpdatedAt: migrating =========2302-- execute("CREATE INDEX CONCURRENTLY index_builds_on_updated_at ON builds (updated_at)")2303 -> 0.0015s2304-- execute("CREATE INDEX CONCURRENTLY index_users_on_updated_at ON users (updated_at)")2305 -> 0.0011s2306-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_updated_at ON repositories (updated_at)")2307 -> 0.0012s2308-- execute("CREATE INDEX CONCURRENTLY index_organizations_on_updated_at ON organizations (updated_at)")2309 -> 0.0010s2310== 20180417000000 IndexBuildsOrganizationsUsersOnUpdatedAt: migrated (0.0048s)2312== 20180420000000 ConstraintsAndIndexesForGhApps: migrating ===================2313-- execute("CREATE UNIQUE INDEX CONCURRENTLY github_id_installations_idx ON installations (github_id)")2314 -> 0.0011s2315-- execute("CREATE INDEX CONCURRENTLY managed_repositories_idx ON repositories (managed_by_installation_at)")2316 -> 0.0011s2317-- execute("CREATE UNIQUE INDEX CONCURRENTLY owner_installations_idx ON installations (owner_id, owner_type) WHERE removed_by_id IS NULL")2318 -> 0.0048s2319== 20180420000000 ConstraintsAndIndexesForGhApps: migrated (0.0070s) ==========2321== 20180425000000 IndexActiveOnOrg: migrating =================================2322-- execute("CREATE INDEX CONCURRENTLY index_active_on_org ON repositories (active_on_org)")2323 -> 0.0008s2324== 20180425000000 IndexActiveOnOrg: migrated (0.0008s) ========================2326== 20180425100000 AddRemovedAtOnInstallations: migrating ======================2327-- add_column(:installations, :removed_at, :timestamp, {:precision=>nil})2328 -> 0.0008s2329== 20180425100000 AddRemovedAtOnInstallations: migrated (0.0009s) =============2331== 20180429000000 IndexRepositoriesOnOwnerNameAndName: migrating ==============2332-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_owner_name_and_name ON repositories (owner_name, name) WHERE invalidated_at IS NULL")2333 -> 0.0014s2334== 20180429000000 IndexRepositoriesOnOwnerNameAndName: migrated (0.0014s) =====2336== 20180501000000 IndexJobsOnOwnerWhereStateRunning: migrating ================2337-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_owner_where_state_running ON jobs (owner_id, owner_type) WHERE state IN ('queued', 'received', 'started')")2338 -> 0.0016s2339== 20180501000000 IndexJobsOnOwnerWhereStateRunning: migrated (0.0016s) =======2341== 20180517000000 IndexRequestsConfigId: migrating ============================2342-- execute("CREATE INDEX CONCURRENTLY index_requests_on_config_id ON requests (config_id)")2343 -> 0.0013s2344== 20180517000000 IndexRequestsConfigId: migrated (0.0013s) ===================2346== 20180517000001 IndexBuildsConfigId: migrating ==============================2347-- execute("CREATE INDEX CONCURRENTLY index_builds_on_config_id ON requests (config_id)")2348 -> 0.0044s2349== 20180517000001 IndexBuildsConfigId: migrated (0.0044s) =====================2351== 20180517000002 IndexJobsConfigId: migrating ================================2352-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_config_id ON requests (config_id)")2353 -> 0.0009s2354== 20180517000002 IndexJobsConfigId: migrated (0.0009s) =======================2356== 20180518000000 IndexBuildsOnMultiple: migrating ============================2357-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_builds_on_repo_branch_event_type_and_private ON builds (repository_id, branch, event_type, private)")2358 -> 0.0050s2359== 20180518000000 IndexBuildsOnMultiple: migrated (0.0050s) ===================2361== 20180522000000 AddActiveFlagToCrons: migrating =============================2362-- change_table(:crons)2363 -> 0.0038s2364-- add_index(:crons, :next_run, {:where=>"(active IS TRUE)", :algorithm=>:concurrently})2365 -> 0.0014s2366== 20180522000000 AddActiveFlagToCrons: migrated (0.0054s) ====================2368== 20180531000000 CreateRequestYamlConfigs: migrating =========================2369-- create_table(:request_yaml_configs, {:id=>:integer})2370 -> 0.0047s2371-- add_index(:request_yaml_configs, [:repository_id, :key])2372 -> 0.0014s2373-- add_column(:requests, :yaml_config_id, :integer)2374 -> 0.0010s2375== 20180531000000 CreateRequestYamlConfigs: migrated (0.0074s) ================2377== 20180606000000 IndexCommitsOnRepositoryId: migrating =======================2378-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_commits_on_repository_id ON commits (repository_id)")2379 -> 0.0017s2380== 20180606000000 IndexCommitsOnRepositoryId: migrated (0.0018s) ==============2382== 20180606000001 IndexJobsOnRepositoryId: migrating ==========================2383-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_jobs_on_repository_id ON jobs (repository_id)")2384 -> 0.0016s2385== 20180606000001 IndexJobsOnRepositoryId: migrated (0.0016s) =================2387== 20180614000000 DropRequestsConfig: migrating ===============================2388-- remove_column(:requests, :config)2389 -> 0.0010s2390== 20180614000000 DropRequestsConfig: migrated (0.0011s) ======================2392== 20180614000001 DropBuildsConfig: migrating =================================2393-- remove_column(:builds, :config)2394 -> 0.0010s2395== 20180614000001 DropBuildsConfig: migrated (0.0010s) ========================2397== 20180614000002 DropJobsConfig: migrating ===================================2398-- remove_column(:jobs, :config)2399 -> 0.0010s2400== 20180614000002 DropJobsConfig: migrated (0.0011s) ==========================2402== 20180620000000 IndexBuildsOnRepositoryIdEventTypeId: migrating =============2403-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_builds_on_repository_id_event_type_id ON builds (repository_id, event_type, id DESC)")2404 -> 0.0017s2405== 20180620000000 IndexBuildsOnRepositoryIdEventTypeId: migrated (0.0017s) ====2407== 20180725000000 CreateCancellations: migrating ==============================2408-- create_table(:cancellations, {:id=>:integer})2409 -> 0.0076s2410== 20180725000000 CreateCancellations: migrated (0.0077s) =====================2412== 20180726000000 CommitsIndexAuthorEmail: migrating ==========================2413-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_commits_on_author_email ON commits (author_email)")2414 -> 0.0023s2415== 20180726000000 CommitsIndexAuthorEmail: migrated (0.0023s) =================2417== 20180726000001 CommitsIndexCommitterEmail: migrating =======================2418-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_commits_on_committer_email ON commits (committer_email)")2419 -> 0.0014s2420== 20180726000001 CommitsIndexCommitterEmail: migrated (0.0018s) ==============2422== 20180801000001 UsersAddRedactedAt: migrating ===============================2423-- change_table(:users)2424 -> 0.0018s2425== 20180801000001 UsersAddRedactedAt: migrated (0.0019s) ======================2427== 20180822000000 CreateEmailUnsubscribes: migrating ==========================2428-- create_table(:email_unsubscribes, {:id=>:integer})2429 -> 0.0229s2430== 20180822000000 CreateEmailUnsubscribes: migrated (0.0230s) =================2432== 20180823000000 AddPreferences: migrating ===================================2433-- change_table(:users)2434 -> 0.0050s2435== 20180823000000 AddPreferences: migrated (0.0053s) ==========================2437== 20180828000000 ChangePreferencesDefault: migrating =========================2438-- change_column_default(:users, :preferences, {})2439 -> 0.0096s2440== 20180828000000 ChangePreferencesDefault: migrated (0.0098s) ================2442== 20180829000000 MakeEmailUnsubscribesIdBigint: migrating ====================2443-- change_column(:email_unsubscribes, :id, :bigint)2444 -> 0.0027s2445== 20180829000000 MakeEmailUnsubscribesIdBigint: migrated (0.0028s) ===========2447== 20180830000001 JobsAddRestartedAt: migrating ===============================2448-- change_table(:jobs)2449 -> 0.0014s2450== 20180830000001 JobsAddRestartedAt: migrated (0.0015s) ======================2452== 20180830000002 BuildsAddRestartedAt: migrating =============================2453-- change_table(:builds)2454 -> 0.0014s2455== 20180830000002 BuildsAddRestartedAt: migrated (0.0015s) ====================2457== 20180830000003 JobVersionsCreate: migrating ================================2458-- create_table(:job_versions, {:id=>:integer})2459 -> 0.0034s2460== 20180830000003 JobVersionsCreate: migrated (0.0037s) =======================2462== 20180903000000 JobConfigsIndexConfigResourcesGpu: migrating ================2463-- execute("CREATE OR REPLACE FUNCTION is_json(text) RETURNS boolean LANGUAGE plpgsql immutable AS $$\n BEGIN\n perform $1::json;\n return true;\n EXCEPTION WHEN invalid_text_representation THEN\n return false;\n END\n$$;\n")2464 -> 0.0011s2465-- execute("CREATE INDEX CONCURRENTLY index_job_configs_on_config_resources_gpu ON job_configs (((config ->> 'resources')::jsonb ->> 'gpu')) WHERE is_json((config ->> 'resources')::text) AND ((config ->> 'resources')::jsonb ->> 'gpu') IS NOT NULL;\n")2466 -> 0.0014s2467== 20180903000000 JobConfigsIndexConfigResourcesGpu: migrated (0.0028s) =======2469== 20180903000001 FixIndexesOnBuildsAndJobsConfigId: migrating ================2470-- execute("DROP INDEX index_builds_on_config_id")2471 -> 0.0011s2472-- execute("CREATE INDEX CONCURRENTLY index_builds_on_config_id ON builds (config_id)")2473 -> 0.0014s2474-- execute("DROP INDEX index_jobs_on_config_id")2475 -> 0.0009s2476-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_config_id ON jobs (config_id)")2477 -> 0.0013s2478== 20180903000001 FixIndexesOnBuildsAndJobsConfigId: migrated (0.0052s) =======2480== 20180904000001 CreateJobConfigsGpu: migrating ==============================2481-- execute("CREATE MATERIALIZED VIEW job_configs_gpu AS\nSELECT id FROM job_configs WHERE\n is_json((config ->> 'resources')::text) AND\n ((config ->> 'resources')::jsonb ->> 'gpu') IS NOT NULL;\n")2482 -> 0.0020s2483== 20180904000001 CreateJobConfigsGpu: migrated (0.0022s) =====================2485== 20180906000000 AddIndexUsersPreferencesBuildEmails: migrating ==============2486-- execute("CREATE INDEX CONCURRENTLY user_preferences_build_emails_false ON users (id) WHERE preferences->>'build_emails' = 'false';\n")2487 -> 0.0013s2488== 20180906000000 AddIndexUsersPreferencesBuildEmails: migrated (0.0016s) =====2490== 20181002115306 DeleteDuplicateRecordsFromMemberships: migrating ============2491-- execute("DELETE FROM memberships WHERE id in (\n\tSELECT a.id FROM\n\t\t(SELECT m.id, row_number() OVER (ORDER BY m.id) as rnum\n FROM (SELECT user_id, organization_id\n FROM memberships\n GROUP BY (user_id, organization_id)\n HAVING count(*) > 1) t\n INNER JOIN memberships m ON m.user_id = t.user_id AND m.organization_id = t.organization_id) AS a\n WHERE mod(a.rnum, 2) = 0);\n")2492 -> 0.0027s2493== 20181002115306 DeleteDuplicateRecordsFromMemberships: migrated (0.0033s) ===2495== 20181002115307 AddConstraintOnOrganizationAndUserToMemberships: migrating ==2496-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_organization_id_and_user_id_on_memberships ON memberships USING btree (organization_id, user_id);\n")2497 -> 0.0017s2498== 20181002115307 AddConstraintOnOrganizationAndUserToMemberships: migrated (0.0021s)2500== 20181018000000 IndexBuildsOnCreatedAt: migrating ===========================2501-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_builds_on_created_at ON builds (created_at)")2502 -> 0.0014s2503== 20181018000000 IndexBuildsOnCreatedAt: migrated (0.0017s) ==================2505== 20181029120000 AddMigrationStatusColumnToRepositories: migrating ===========2506-- add_column(:repositories, :migration_status, :string)2507 -> 0.0037s2508== 20181029120000 AddMigrationStatusColumnToRepositories: migrated (0.0042s) ==2510== 20181113120000 AddGithubGuidColumnToRequests: migrating ====================2511-- add_column(:requests, :github_guid, :text)2512 -> 0.0022s2513-- add_index(:requests, :github_guid, {:algorithm=>:concurrently, :unique=>true})2514 -> 0.0026s2515== 20181113120000 AddGithubGuidColumnToRequests: migrated (0.0057s) ===========2517== 20181116800000 AddConstraintsToMultipleTables: migrating ===================2518-- execute("ALTER TABLE repositories ADD CONSTRAINT fk_repositories_on_current_build_id FOREIGN KEY (current_build_id) REFERENCES builds(id) ON DELETE SET NULL NOT VALID")2519 -> 0.0021s2520-- execute("ALTER TABLE repositories ADD CONSTRAINT fk_repositories_on_last_build_id FOREIGN KEY (last_build_id) REFERENCES builds(id) ON DELETE SET NULL NOT VALID")2521 -> 0.0024s2522-- execute("ALTER TABLE builds ADD CONSTRAINT fk_builds_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) NOT VALID")2523 -> 0.0014s2524-- execute("ALTER TABLE builds ADD CONSTRAINT fk_builds_on_commit_id FOREIGN KEY (commit_id) REFERENCES commits(id) NOT VALID")2525 -> 0.0014s2526-- execute("ALTER TABLE builds ADD CONSTRAINT fk_builds_on_request_id FOREIGN KEY (request_id) REFERENCES requests(id) NOT VALID")2527 -> 0.0020s2528-- execute("ALTER TABLE builds ADD CONSTRAINT fk_builds_on_pull_request_id FOREIGN KEY (pull_request_id) REFERENCES pull_requests(id) NOT VALID")2529 -> 0.0020s2530-- execute("ALTER TABLE builds ADD CONSTRAINT fk_builds_on_branch_id FOREIGN KEY (branch_id) REFERENCES branches(id) NOT VALID")2531 -> 0.0017s2532-- execute("ALTER TABLE builds ADD CONSTRAINT fk_builds_on_tag_id FOREIGN KEY (tag_id) REFERENCES tags(id) NOT VALID")2533 -> 0.0013s2534-- execute("ALTER TABLE builds ADD CONSTRAINT fk_builds_on_config_id FOREIGN KEY (config_id) REFERENCES build_configs(id) NOT VALID")2535 -> 0.0011s2536-- execute("ALTER TABLE jobs ADD CONSTRAINT fk_jobs_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) NOT VALID")2537 -> 0.0017s2538-- execute("ALTER TABLE jobs ADD CONSTRAINT fk_jobs_on_commit_id FOREIGN KEY (commit_id) REFERENCES commits(id) NOT VALID")2539 -> 0.0021s2540-- execute("ALTER TABLE jobs ADD CONSTRAINT fk_jobs_on_stage_id FOREIGN KEY (stage_id) REFERENCES stages(id) NOT VALID")2541 -> 0.0020s2542-- execute("ALTER TABLE jobs ADD CONSTRAINT fk_jobs_on_config_id FOREIGN KEY (config_id) REFERENCES job_configs(id) NOT VALID")2543 -> 0.0014s2544-- execute("ALTER TABLE branches ADD CONSTRAINT fk_branches_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) NOT VALID")2545 -> 0.0013s2546-- execute("ALTER TABLE branches ADD CONSTRAINT fk_branches_on_last_build_id FOREIGN KEY (last_build_id) REFERENCES builds(id) ON DELETE SET NULL NOT VALID")2547 -> 0.0010s2548-- execute("ALTER TABLE tags ADD CONSTRAINT fk_tags_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) NOT VALID")2549 -> 0.0008s2550-- execute("ALTER TABLE tags ADD CONSTRAINT fk_tags_on_last_build_id FOREIGN KEY (last_build_id) REFERENCES builds(id) ON DELETE SET NULL NOT VALID")2551 -> 0.0009s2552-- execute("ALTER TABLE commits ADD CONSTRAINT fk_commits_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) NOT VALID")2553 -> 0.0009s2554-- execute("ALTER TABLE commits ADD CONSTRAINT fk_commits_on_branch_id FOREIGN KEY (branch_id) REFERENCES branches(id) NOT VALID")2555 -> 0.0008s2556-- execute("ALTER TABLE commits ADD CONSTRAINT fk_commits_on_tag_id FOREIGN KEY (tag_id) REFERENCES tags(id) NOT VALID")2557 -> 0.0009s2558-- execute("ALTER TABLE crons ADD CONSTRAINT fk_crons_on_branch_id FOREIGN KEY (branch_id) REFERENCES branches(id) NOT VALID")2559 -> 0.0009s2560-- execute("ALTER TABLE job_configs ADD CONSTRAINT fk_job_configs_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) NOT VALID")2561 -> 0.0011s2562-- execute("ALTER TABLE build_configs ADD CONSTRAINT fk_build_configs_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) NOT VALID")2563 -> 0.0009s2564-- execute("ALTER TABLE pull_requests ADD CONSTRAINT fk_pull_requests_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) NOT VALID")2565 -> 0.0009s2566-- execute("ALTER TABLE ssl_keys ADD CONSTRAINT fk_ssl_keys_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) NOT VALID")2567 -> 0.0009s2568-- execute("ALTER TABLE requests ADD CONSTRAINT fk_requests_on_commit_id FOREIGN KEY (commit_id) REFERENCES commits(id) NOT VALID")2569 -> 0.0009s2570-- execute("ALTER TABLE requests ADD CONSTRAINT fk_requests_on_pull_request_id FOREIGN KEY (pull_request_id) REFERENCES pull_requests(id) NOT VALID")2571 -> 0.0008s2572-- execute("ALTER TABLE requests ADD CONSTRAINT fk_requests_on_branch_id FOREIGN KEY (branch_id) REFERENCES branches(id) NOT VALID")2573 -> 0.0009s2574-- execute("ALTER TABLE requests ADD CONSTRAINT fk_requests_on_tag_id FOREIGN KEY (tag_id) REFERENCES tags(id) NOT VALID")2575 -> 0.0009s2576-- execute("ALTER TABLE requests ADD CONSTRAINT fk_requests_on_config_id FOREIGN KEY (config_id) REFERENCES request_configs(id) NOT VALID")2577 -> 0.0009s2578-- execute("ALTER TABLE stages ADD CONSTRAINT fk_stages_on_build_id FOREIGN KEY (build_id) REFERENCES builds(id) NOT VALID")2579 -> 0.0010s2580== 20181116800000 AddConstraintsToMultipleTables: migrated (0.0430s) ==========2582== 20181116800001 ValidateConstraints: migrating ==============================2583-- execute("ALTER TABLE repositories VALIDATE CONSTRAINT fk_repositories_on_current_build_id")2584 -> 0.0025s2585-- execute("ALTER TABLE repositories VALIDATE CONSTRAINT fk_repositories_on_last_build_id")2586 -> 0.0015s2587-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_builds_on_repository_id")2588 -> 0.0018s2589-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_builds_on_commit_id")2590 -> 0.0015s2591-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_builds_on_request_id")2592 -> 0.0019s2593-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_builds_on_pull_request_id")2594 -> 0.0018s2595-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_builds_on_branch_id")2596 -> 0.0017s2597-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_builds_on_tag_id")2598 -> 0.0016s2599-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_builds_on_config_id")2600 -> 0.0018s2601-- execute("ALTER TABLE jobs VALIDATE CONSTRAINT fk_jobs_on_repository_id")2602 -> 0.0022s2603-- execute("ALTER TABLE jobs VALIDATE CONSTRAINT fk_jobs_on_commit_id")2604 -> 0.0015s2605-- execute("ALTER TABLE jobs VALIDATE CONSTRAINT fk_jobs_on_stage_id")2606 -> 0.0022s2607-- execute("ALTER TABLE jobs VALIDATE CONSTRAINT fk_jobs_on_config_id")2608 -> 0.0011s2609-- execute("ALTER TABLE branches VALIDATE CONSTRAINT fk_branches_on_repository_id")2610 -> 0.0012s2611-- execute("ALTER TABLE branches VALIDATE CONSTRAINT fk_branches_on_last_build_id")2612 -> 0.0048s2613-- execute("ALTER TABLE tags VALIDATE CONSTRAINT fk_tags_on_repository_id")2614 -> 0.0009s2615-- execute("ALTER TABLE tags VALIDATE CONSTRAINT fk_tags_on_last_build_id")2616 -> 0.0009s2617-- execute("ALTER TABLE commits VALIDATE CONSTRAINT fk_commits_on_repository_id")2618 -> 0.0008s2619-- execute("ALTER TABLE commits VALIDATE CONSTRAINT fk_commits_on_branch_id")2620 -> 0.0008s2621-- execute("ALTER TABLE commits VALIDATE CONSTRAINT fk_commits_on_tag_id")2622 -> 0.0008s2623-- execute("ALTER TABLE crons VALIDATE CONSTRAINT fk_crons_on_branch_id")2624 -> 0.0010s2625-- execute("ALTER TABLE job_configs VALIDATE CONSTRAINT fk_job_configs_on_repository_id")2626 -> 0.0011s2627-- execute("ALTER TABLE build_configs VALIDATE CONSTRAINT fk_build_configs_on_repository_id")2628 -> 0.0011s2629-- execute("ALTER TABLE pull_requests VALIDATE CONSTRAINT fk_pull_requests_on_repository_id")2630 -> 0.0012s2631-- execute("ALTER TABLE ssl_keys VALIDATE CONSTRAINT fk_ssl_keys_on_repository_id")2632 -> 0.0015s2633-- execute("ALTER TABLE requests VALIDATE CONSTRAINT fk_requests_on_commit_id")2634 -> 0.0013s2635-- execute("ALTER TABLE requests VALIDATE CONSTRAINT fk_requests_on_pull_request_id")2636 -> 0.0012s2637-- execute("ALTER TABLE requests VALIDATE CONSTRAINT fk_requests_on_branch_id")2638 -> 0.0011s2639-- execute("ALTER TABLE requests VALIDATE CONSTRAINT fk_requests_on_tag_id")2640 -> 0.0011s2641-- execute("ALTER TABLE requests VALIDATE CONSTRAINT fk_requests_on_config_id")2642 -> 0.0013s2643-- execute("ALTER TABLE stages VALIDATE CONSTRAINT fk_stages_on_build_id")2644 -> 0.0013s2645== 20181116800001 ValidateConstraints: migrated (0.0480s) =====================2647== 20181126080000 AddIndexesForForeignKeys: migrating =========================2648-- index_exists?(:builds, :branch_id)2649 -> 0.0299s2650-- add_index(:builds, :branch_id, {:algorithm=>:concurrently})2651 -> 0.0025s2652-- index_exists?(:builds, :commit_id)2653 -> 0.0107s2654-- add_index(:builds, :commit_id, {:algorithm=>:concurrently})2655 -> 0.0008s2656-- index_exists?(:builds, :pull_request_id)2657 -> 0.0077s2658-- add_index(:builds, :pull_request_id, {:algorithm=>:concurrently})2659 -> 0.0009s2660-- index_exists?(:builds, :tag_id)2661 -> 0.0091s2662-- add_index(:builds, :tag_id, {:algorithm=>:concurrently})2663 -> 0.0008s2664-- index_exists?(:jobs, :commit_id)2665 -> 0.0059s2666-- add_index(:jobs, :commit_id, {:algorithm=>:concurrently})2667 -> 0.0008s2668-- index_exists?(:branches, :last_build_id)2669 -> 0.0023s2670-- add_index(:branches, :last_build_id, {:algorithm=>:concurrently})2671 -> 0.0007s2672-- index_exists?(:tags, :repository_id)2673 -> 0.0019s2674-- add_index(:tags, :repository_id, {:algorithm=>:concurrently})2675 -> 0.0007s2676-- index_exists?(:tags, :last_build_id)2677 -> 0.0022s2678-- add_index(:tags, :last_build_id, {:algorithm=>:concurrently})2679 -> 0.0006s2680-- index_exists?(:commits, :tag_id)2681 -> 0.0026s2682-- add_index(:commits, :tag_id, {:algorithm=>:concurrently})2683 -> 0.0008s2684-- index_exists?(:commits, :branch_id)2685 -> 0.0036s2686-- add_index(:commits, :branch_id, {:algorithm=>:concurrently})2687 -> 0.0007s2688-- index_exists?(:job_configs, :repository_id)2689 -> 0.0014s2690-- add_index(:job_configs, :repository_id, {:algorithm=>:concurrently})2691 -> 0.0007s2692-- index_exists?(:build_configs, :repository_id)2693 -> 0.0012s2694-- add_index(:build_configs, :repository_id, {:algorithm=>:concurrently})2695 -> 0.0006s2696-- index_exists?(:pull_requests, :repository_id)2697 -> 0.0019s2698-- add_index(:pull_requests, :repository_id, {:algorithm=>:concurrently})2699 -> 0.0007s2700-- index_exists?(:requests, :pull_request_id)2701 -> 0.0255s2702-- add_index(:requests, :pull_request_id, {:algorithm=>:concurrently})2703 -> 0.0022s2704-- index_exists?(:requests, :tag_id)2705 -> 0.0109s2706-- add_index(:requests, :tag_id, {:algorithm=>:concurrently})2707 -> 0.0021s2708-- index_exists?(:requests, :branch_id)2709 -> 0.0133s2710-- add_index(:requests, :branch_id, {:algorithm=>:concurrently})2711 -> 0.0020s2712-- index_exists?(:repositories, :current_build_id)2713 -> 0.0112s2714-- add_index(:repositories, :current_build_id, {:algorithm=>:concurrently})2715 -> 0.0015s2716-- index_exists?(:repositories, :last_build_id)2717 -> 0.0065s2718-- add_index(:repositories, :last_build_id, {:algorithm=>:concurrently})2719 -> 0.0011s2720-- index_exists?(:crons, :branch_id)2721 -> 0.0027s2722-- add_index(:crons, :branch_id, {:algorithm=>:concurrently})2723 -> 0.0009s2724== 20181126080000 AddIndexesForForeignKeys: migrated (0.1744s) ================2726== 20181128120000 AddUniqueIndexToBranchesOnRepositoryIdAndName: migrating ====2727-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_branches_on_repository_id_and_name ON branches(repository_id, name)")2728 -> 0.0009s2729== 20181128120000 AddUniqueIndexToBranchesOnRepositoryIdAndName: migrated (0.0009s)2731== 20181203075818 AddUniqueNameColumnToBranches: migrating ====================2732-- add_column(:branches, :unique_name, :text)2733 -> 0.0017s2734== 20181203075818 AddUniqueNameColumnToBranches: migrated (0.0020s) ===========2736== 20181203075819 AddSetUniqueNameTriggerToBranches: migrating ================2737-- execute("DROP TRIGGER IF EXISTS set_unique_name_on_branches ON branches;\nDROP FUNCTION IF EXISTS set_unique_name();\nCREATE FUNCTION set_unique_name() RETURNS trigger AS $$\nDECLARE\n disable boolean;\nBEGIN\n disable := 'f';\n IF TG_OP = 'INSERT' OR TG_OP = 'UPDATE' THEN\n BEGIN\n disable := current_setting('set_unique_name_on_branches.disable');\n EXCEPTION\n WHEN others THEN\n set set_unique_name_on_branches.disable = 'f';\n END;\n\n IF NOT disable THEN\n NEW.unique_name := NEW.name;\n END IF;\n END IF;\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;\n\nCREATE TRIGGER set_unique_name_on_branches\nBEFORE INSERT OR UPDATE ON branches\nFOR EACH ROW\nEXECUTE PROCEDURE set_unique_name();\n")2738 -> 0.0017s2739== 20181203075819 AddSetUniqueNameTriggerToBranches: migrated (0.0024s) =======2741== 20181203080356 CreateIndexOnBranchesUniqueNameAndRepositoryId: migrating ===2742-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_branches_repository_id_unique_name ON branches(repository_id, unique_name) WHERE unique_name IS NOT NULL")2743 -> 0.0011s2744== 20181203080356 CreateIndexOnBranchesUniqueNameAndRepositoryId: migrated (0.0012s)2746== 20181205152712 AddUniqueIndexToCronsOnBranchId: migrating ==================2747-- execute("DROP INDEX CONCURRENTLY index_crons_on_branch_id")2748 -> 0.0007s2749-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_crons_on_branch_id ON crons(branch_id)")2750 -> 0.0007s2751== 20181205152712 AddUniqueIndexToCronsOnBranchId: migrated (0.0015s) =========2753== 20190102000000 AddOrganizationPreferences: migrating =======================2754-- change_table(:organizations)2755 -> 0.0015s2756== 20190102000000 AddOrganizationPreferences: migrated (0.0016s) ==============2758== 20190102000001 ChangeOrganizationPreferencesDefault: migrating =============2759-- change_column_default(:organizations, :preferences, {})2760 -> 0.0039s2761== 20190102000001 ChangeOrganizationPreferencesDefault: migrated (0.0039s) ====2763== 20190109000000 CreateBetaMigrationRequestTable: migrating ==================2764-- create_table(:beta_migration_requests, {:id=>:integer})2765 -> 0.0064s2766-- add_index(:beta_migration_requests, [:owner_type, :owner_id])2767 -> 0.0019s2768== 20190109000000 CreateBetaMigrationRequestTable: migrated (0.0085s) =========2770== 20190118000000 AddBetaMigrationRequestColumnToOrganizations: migrating =====2771-- add_column(:organizations, :beta_migration_request_id, :integer)2772 -> 0.0017s2773== 20190118000000 AddBetaMigrationRequestColumnToOrganizations: migrated (0.0018s)2775== 20190204000000 MakeSubscriptionOwnerNotNullable: migrating =================2776-- change_column_null(:subscriptions, :owner_type, false)2777 -> 0.0016s2778-- change_column_null(:subscriptions, :owner_id, false)2779 -> 0.0008s2780== 20190204000000 MakeSubscriptionOwnerNotNullable: migrated (0.0025s) ========2782== 20190313000000 RequestRawConfigsCreate: migrating ==========================2783-- create_table(:request_raw_configs, {:id=>:integer})2784 -> 0.0062s2785-- add_index(:request_raw_configs, [:repository_id, :key])2786 -> 0.0015s2787-- create_table(:request_raw_configurations, {:id=>:integer})2788 -> 0.0048s2789-- add_index(:request_raw_configurations, :request_id)2790 -> 0.0014s2791-- add_index(:request_raw_configurations, :request_raw_config_id)2792 -> 0.0013s2793== 20190313000000 RequestRawConfigsCreate: migrated (0.0154s) =================2795== 20190329093854 CreateGatekeeperWorkers: migrating ==========================2796-- create_table(:gatekeeper_workers)2797 -> 0.0055s2798-- execute("INSERT INTO gatekeeper_workers(id) SELECT generate_series(1,200) as id;")2799 -> 0.0010s2800== 20190329093854 CreateGatekeeperWorkers: migrated (0.0065s) =================2802== 20190409133118 AddUniqueNumberColumnToBuilds: migrating ====================2803-- add_column(:builds, :unique_number, :int)2804 -> 0.0023s2805== 20190409133118 AddUniqueNumberColumnToBuilds: migrated (0.0024s) ===========2807== 20190409133320 AddSetUniqueNumberTriggerToBuilds: migrating ================2808-- execute("DROP TRIGGER IF EXISTS set_unique_number_on_builds ON builds;\nDROP FUNCTION IF EXISTS set_unique_number();\nCREATE FUNCTION set_unique_number() RETURNS trigger AS $$\nDECLARE\n disable boolean;\nBEGIN\n disable := 'f';\n IF TG_OP = 'INSERT' OR TG_OP = 'UPDATE' THEN\n BEGIN\n disable := current_setting('set_unique_number_on_builds.disable');\n EXCEPTION\n WHEN others THEN\n set set_unique_number_on_builds.disable = 'f';\n END;\n\n IF NOT disable THEN\n IF NEW.unique_number IS NULL OR NEW.unique_number > 0 THEN\n NEW.unique_number := NEW.number;\n END IF;\n END IF;\n END IF;\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;\n\nCREATE TRIGGER set_unique_number_on_builds\nBEFORE INSERT OR UPDATE ON builds\nFOR EACH ROW\nEXECUTE PROCEDURE set_unique_number();\n")2809 -> 0.0010s2810== 20190409133320 AddSetUniqueNumberTriggerToBuilds: migrated (0.0011s) =======2812== 20190409133444 CreateUniqueIndexOnRepositoryIdAndNumberOnBuilds: migrating =2813-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_builds_repository_id_unique_number ON builds(repository_id, unique_number) WHERE unique_number IS NOT NULL")2814 -> 0.0008s2815== 20190409133444 CreateUniqueIndexOnRepositoryIdAndNumberOnBuilds: migrated (0.0009s)2817== 20190410121039 MakeSetUniqueNumberTriggerRunOnlyOnInsert: migrating ========2818-- execute(" DROP TRIGGER set_unique_number_on_builds ON builds;\n CREATE TRIGGER set_unique_number_on_builds\n BEFORE INSERT ON builds\n FOR EACH ROW\n EXECUTE PROCEDURE set_unique_number();\n")2819 -> 0.0007s2820== 20190410121039 MakeSetUniqueNumberTriggerRunOnlyOnInsert: migrated (0.0008s)2822== 20190416071629 RemoveUniqueNameFromBranches: migrating =====================2823-- execute("drop index concurrently index_branches_repository_id_unique_name;")2824 -> 0.0006s2825-- execute("DROP TRIGGER IF EXISTS set_unique_name_on_branches ON branches;\nDROP FUNCTION IF EXISTS set_unique_name();\n\n")2826 -> 0.0004s2827-- remove_column(:branches, :unique_name)2828 -> 0.0004s2829== 20190416071629 RemoveUniqueNameFromBranches: migrated (0.0015s) ============2831== 20190417072423 AlterBuildsUniqueNumberIndex: migrating =====================2832-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_builds_repository_id_unique_number_new ON builds(repository_id, unique_number) WHERE unique_number IS NOT NULL AND unique_number > 0")2833 -> 0.0008s2834-- execute("DROP INDEX CONCURRENTLY index_builds_repository_id_unique_number")2835 -> 0.0006s2836-- execute("ALTER INDEX index_builds_repository_id_unique_number_new RENAME TO index_builds_repository_id_unique_number")2837 -> 0.0003s2838== 20190417072423 AlterBuildsUniqueNumberIndex: migrated (0.0018s) ============2840== 20190417072838 ReinstallSetUniqueNumberTrigger: migrating ==================2841-- execute("DROP TRIGGER IF EXISTS set_unique_number_on_builds ON builds;\nDROP FUNCTION IF EXISTS set_unique_number();\n")2842 -> 0.0013s2843-- execute("DROP TRIGGER IF EXISTS set_unique_number_on_builds ON builds;\nDROP FUNCTION IF EXISTS set_unique_number();\nCREATE FUNCTION set_unique_number() RETURNS trigger AS $$\nDECLARE\n disable boolean;\nBEGIN\n disable := 'f';\n IF TG_OP = 'INSERT' OR TG_OP = 'UPDATE' THEN\n BEGIN\n disable := current_setting('set_unique_number_on_builds.disable');\n EXCEPTION\n WHEN others THEN\n set set_unique_number_on_builds.disable = 'f';\n END;\n\n IF NOT disable THEN\n IF NEW.unique_number IS NULL OR NEW.unique_number > 0 THEN\n NEW.unique_number := NEW.number;\n END IF;\n END IF;\n END IF;\n RETURN NEW;\nEND;\n$$ LANGUAGE plpgsql;\n\nCREATE TRIGGER set_unique_number_on_builds\nBEFORE INSERT OR UPDATE ON builds\nFOR EACH ROW\nEXECUTE PROCEDURE set_unique_number();\n")2844 -> 0.0009s2845== 20190417072838 ReinstallSetUniqueNumberTrigger: migrated (0.0025s) =========2847== 20190502175059 AddMergeableStateToPullRequests: migrating ==================2848-- add_column(:pull_requests, :mergeable_state, :string)2849 -> 0.0012s2850== 20190502175059 AddMergeableStateToPullRequests: migrated (0.0013s) =========2852== 20190510121000 AddReposIndexOnLowerOwnerNameAndName: migrating =============2853-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_repositories_on_lower_owner_name_and_name ON repositories (LOWER(owner_name), LOWER(name)) WHERE invalidated_at IS NULL")2854 -> 0.0015s2855== 20190510121000 AddReposIndexOnLowerOwnerNameAndName: migrated (0.0016s) ====2857== 20190605121000 AddHistoryMigrationStatusToRepositories: migrating ==========2858-- add_column(:repositories, :history_migration_status, :string)2859 -> 0.0022s2860== 20190605121000 AddHistoryMigrationStatusToRepositories: migrated (0.0025s) =2862== 20190605155459 AddPullRequestMergeableToRequests: migrating ================2863-- add_column(:requests, :pull_request_mergeable, :string)2864 -> 0.0022s2865== 20190605155459 AddPullRequestMergeableToRequests: migrated (0.0025s) =======2867== 20190613120000 SoftDeleteRepositoryAlongWithItsData: migrating =============2868-- execute("create table if not exists deleted_builds (like builds)")2869 -> 0.0040s2870-- execute("create table if not exists deleted_stages (like stages)")2871 -> 0.0050s2872-- execute("create table if not exists deleted_jobs (like jobs)")2873 -> 0.0022s2874-- execute("create table if not exists deleted_requests (like requests)")2875 -> 0.0022s2876-- execute("create table if not exists deleted_commits (like commits)")2877 -> 0.0019s2878-- execute("create table if not exists deleted_pull_requests (like pull_requests)")2879 -> 0.0017s2880-- execute("create table if not exists deleted_job_configs (like job_configs)")2881 -> 0.0049s2882-- execute("create table if not exists deleted_build_configs (like build_configs)")2883 -> 0.0050s2884-- execute("create table if not exists deleted_request_configs (like request_configs)")2885 -> 0.0052s2886-- execute("create table if not exists deleted_request_payloads (like request_payloads)")2887 -> 0.0058s2888-- execute("create table if not exists deleted_ssl_keys (like ssl_keys)")2889 -> 0.0052s2890-- execute("create table if not exists deleted_tags (like tags)")2891 -> 0.0022s2892-- execute("DROP FUNCTION IF EXISTS soft_delete_repo_data(bigint);\nCREATE FUNCTION soft_delete_repo_data(r_id bigint) RETURNS void AS $$\nDECLARE\n request_raw_config_ids bigint[];\n request_raw_configuration_ids bigint[];\n request_yaml_config_ids bigint[];\n request_config_ids bigint[];\n tag_ids bigint[];\n ssl_key_ids bigint[];\n build_config_ids bigint[];\n job_config_ids bigint[];\n build_ids bigint[];\n pull_request_ids bigint[];\n commit_ids bigint[];\n request_ids bigint[];\n request_payload_ids bigint[];\n stage_ids bigint[];\n job_ids bigint[];\nBEGIN\n SELECT INTO job_ids array_agg(id) FROM jobs WHERE repository_id = r_id;\n SELECT INTO stage_ids array_agg(id) FROM stages WHERE build_id IN (SELECT id FROM builds WHERE repository_id = r_id);\n SELECT INTO request_payload_ids array_agg(id) FROM request_payloads WHERE request_id IN (SELECT id FROM requests WHERE repository_id = r_id);\n SELECT INTO request_ids array_agg(id) FROM requests WHERE repository_id = r_id;\n SELECT INTO commit_ids array_agg(id) FROM commits WHERE repository_id = r_id;\n SELECT INTO pull_request_ids array_agg(id) FROM pull_requests WHERE repository_id = r_id;\n SELECT INTO build_ids array_agg(id) FROM builds WHERE repository_id = r_id;\n SELECT INTO job_config_ids array_agg(id) FROM job_configs WHERE repository_id = r_id;\n SELECT INTO build_config_ids array_agg(id) FROM build_configs WHERE repository_id = r_id;\n SELECT INTO ssl_key_ids array_agg(id) FROM ssl_keys WHERE repository_id = r_id;\n SELECT INTO tag_ids array_agg(id) FROM tags WHERE repository_id = r_id;\n SELECT INTO request_config_ids array_agg(id) FROM request_configs WHERE repository_id = r_id;\n SELECT INTO request_yaml_config_ids array_agg(id) FROM request_yaml_configs WHERE repository_id = r_id;\n SELECT INTO request_raw_configuration_ids array_agg(id) FROM request_raw_configurations WHERE request_id = ANY(request_ids);\n SELECT INTO request_raw_config_ids array_agg(id) FROM request_raw_configs WHERE id IN (SELECT request_raw_config_id FROM request_raw_configurations WHERE request_id = ANY(request_ids));\n\n INSERT INTO deleted_jobs SELECT * FROM jobs WHERE id = ANY(job_ids);\n INSERT INTO deleted_stages SELECT * FROM stages WHERE id = ANY(stage_ids);\n INSERT INTO deleted_request_payloads SELECT * FROM request_payloads WHERE id = ANY(request_payload_ids);\n INSERT INTO deleted_requests SELECT * FROM requests WHERE id = ANY(request_ids);\n INSERT INTO deleted_commits SELECT * FROM commits WHERE id = ANY(commit_ids);\n INSERT INTO deleted_pull_requests SELECT * FROM pull_requests WHERE id = ANY(pull_request_ids);\n INSERT INTO deleted_builds SELECT * FROM builds WHERE id = ANY(build_ids);\n INSERT INTO deleted_job_configs SELECT * FROM job_configs WHERE id = ANY(job_config_ids);\n INSERT INTO deleted_build_configs SELECT * FROM build_configs WHERE id = ANY(build_config_ids);\n INSERT INTO deleted_ssl_keys SELECT * FROM ssl_keys WHERE id = ANY(ssl_key_ids);\n INSERT INTO deleted_tags SELECT * FROM tags WHERE id = ANY(tag_ids);\n INSERT INTO deleted_request_configs SELECT * FROM request_configs WHERE id = ANY(request_config_ids);\n INSERT INTO deleted_request_yaml_configs SELECT * FROM request_yaml_configs WHERE id = ANY(request_yaml_config_ids);\n INSERT INTO deleted_request_raw_configurations SELECT * FROM request_raw_configurations WHERE id = ANY(request_raw_configuration_ids);\n INSERT INTO deleted_request_raw_configs SELECT * FROM request_raw_configs WHERE id = ANY(request_raw_config_ids);\n\n DELETE FROM jobs WHERE id = ANY(job_ids);\n DELETE FROM stages WHERE id = ANY(stage_ids);\n DELETE FROM request_payloads WHERE id = ANY(request_payload_ids);\n DELETE FROM requests WHERE id = ANY(request_ids);\n DELETE FROM commits WHERE id = ANY(commit_ids);\n DELETE FROM pull_requests WHERE id = ANY(pull_request_ids);\n DELETE FROM builds WHERE id = ANY(build_ids);\n DELETE FROM job_configs WHERE id = ANY(job_config_ids);\n DELETE FROM build_configs WHERE id = ANY(build_config_ids);\n DELETE FROM ssl_keys WHERE id = ANY(ssl_key_ids);\n DELETE FROM tags WHERE id = ANY(tag_ids);\n DELETE FROM request_configs WHERE id = ANY(request_config_ids);\n DELETE FROM request_yaml_configs WHERE id = ANY(request_yaml_config_ids);\n DELETE FROM request_raw_configurations WHERE id = ANY(request_raw_configuration_ids);\n DELETE FROM request_raw_configs WHERE id = ANY(request_raw_config_ids);\nEND;\n$$ LANGUAGE plpgsql;\n")2893 -> 0.0027s2894== 20190613120000 SoftDeleteRepositoryAlongWithItsData: migrated (0.0489s) ====2896== 20190618082559 AddVcsTypeToUser: migrating =================================2897-- add_column(:users, :vcs_type, :string, {:default=>nil})2898 -> 0.0027s2899-- execute("ALTER TABLE users ALTER COLUMN vcs_type SET DEFAULT 'GithubUser'")2900 -> 0.0012s2901-- select_value("SELECT id FROM users ORDER BY id DESC LIMIT 1")2902 -> 0.0016s2903-- execute("UPDATE users SET vcs_type = 'GithubUser' WHERE id BETWEEN 0 AND 5000")2904 -> 0.0012s2905== 20190618082559 AddVcsTypeToUser: migrated (0.0079s) ========================2907== 20190701082559 AddVcsTypeToRepository: migrating ===========================2908-- add_column(:repositories, :vcs_type, :string, {:default=>nil})2909 -> 0.0014s2910-- execute("ALTER TABLE repositories ALTER COLUMN vcs_type SET DEFAULT 'GithubRepository'")2911 -> 0.0005s2912-- select_value("SELECT id FROM repositories ORDER BY id DESC LIMIT 1")2913 -> 0.0011s2914-- execute("UPDATE repositories SET vcs_type = 'GithubRepository' WHERE id BETWEEN 0 AND 5000")2915 -> 0.0009s2916== 20190701082559 AddVcsTypeToRepository: migrated (0.0051s) ==================2918== 20190704082559 AddVcsTypeToOrganization: migrating =========================2919-- add_column(:organizations, :vcs_type, :string, {:default=>nil})2920 -> 0.0015s2921-- execute("ALTER TABLE organizations ALTER COLUMN vcs_type SET DEFAULT 'GithubOrganization'")2922 -> 0.0005s2923-- select_value("SELECT id FROM organizations ORDER BY id DESC LIMIT 1")2924 -> 0.0011s2925-- execute("UPDATE organizations SET vcs_type = 'GithubOrganization' WHERE id BETWEEN 0 AND 5000")2926 -> 0.0008s2927== 20190704082559 AddVcsTypeToOrganization: migrated (0.0049s) ================2929== 20190718092750 AddDeleteCascadeToForeignKeys: migrating ====================2930-- execute("ALTER TABLE builds ADD CONSTRAINT fk_new_builds_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) ON DELETE CASCADE NOT VALID")2931 -> 0.0016s2932-- execute("ALTER TABLE builds ADD CONSTRAINT fk_new_builds_on_commit_id FOREIGN KEY (commit_id) REFERENCES commits(id) ON DELETE CASCADE NOT VALID")2933 -> 0.0010s2934-- execute("ALTER TABLE builds ADD CONSTRAINT fk_new_builds_on_request_id FOREIGN KEY (request_id) REFERENCES requests(id) ON DELETE CASCADE NOT VALID")2935 -> 0.0012s2936-- execute("ALTER TABLE builds ADD CONSTRAINT fk_new_builds_on_pull_request_id FOREIGN KEY (pull_request_id) REFERENCES pull_requests(id) ON DELETE CASCADE NOT VALID")2937 -> 0.0010s2938-- execute("ALTER TABLE builds ADD CONSTRAINT fk_new_builds_on_branch_id FOREIGN KEY (branch_id) REFERENCES branches(id) ON DELETE CASCADE NOT VALID")2939 -> 0.0010s2940-- execute("ALTER TABLE builds ADD CONSTRAINT fk_new_builds_on_tag_id FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE CASCADE NOT VALID")2941 -> 0.0011s2942-- execute("ALTER TABLE builds ADD CONSTRAINT fk_new_builds_on_config_id FOREIGN KEY (config_id) REFERENCES build_configs(id) ON DELETE CASCADE NOT VALID")2943 -> 0.0009s2944-- execute("ALTER TABLE jobs ADD CONSTRAINT fk_new_jobs_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) ON DELETE CASCADE NOT VALID")2945 -> 0.0010s2946-- execute("ALTER TABLE jobs ADD CONSTRAINT fk_new_jobs_on_commit_id FOREIGN KEY (commit_id) REFERENCES commits(id) ON DELETE CASCADE NOT VALID")2947 -> 0.0011s2948-- execute("ALTER TABLE jobs ADD CONSTRAINT fk_new_jobs_on_stage_id FOREIGN KEY (stage_id) REFERENCES stages(id) ON DELETE CASCADE NOT VALID")2949 -> 0.0009s2950-- execute("ALTER TABLE jobs ADD CONSTRAINT fk_new_jobs_on_config_id FOREIGN KEY (config_id) REFERENCES job_configs(id) ON DELETE CASCADE NOT VALID")2951 -> 0.0009s2952-- execute("ALTER TABLE branches ADD CONSTRAINT fk_new_branches_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) ON DELETE CASCADE NOT VALID")2953 -> 0.0012s2954-- execute("ALTER TABLE tags ADD CONSTRAINT fk_new_tags_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) ON DELETE CASCADE NOT VALID")2955 -> 0.0012s2956-- execute("ALTER TABLE commits ADD CONSTRAINT fk_new_commits_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) ON DELETE CASCADE NOT VALID")2957 -> 0.0009s2958-- execute("ALTER TABLE commits ADD CONSTRAINT fk_new_commits_on_branch_id FOREIGN KEY (branch_id) REFERENCES branches(id) ON DELETE CASCADE NOT VALID")2959 -> 0.0011s2960-- execute("ALTER TABLE commits ADD CONSTRAINT fk_new_commits_on_tag_id FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE CASCADE NOT VALID")2961 -> 0.0009s2962-- execute("ALTER TABLE crons ADD CONSTRAINT fk_new_crons_on_branch_id FOREIGN KEY (branch_id) REFERENCES branches(id) ON DELETE CASCADE NOT VALID")2963 -> 0.0011s2964-- execute("ALTER TABLE job_configs ADD CONSTRAINT fk_new_job_configs_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) ON DELETE CASCADE NOT VALID")2965 -> 0.0012s2966-- execute("ALTER TABLE build_configs ADD CONSTRAINT fk_new_build_configs_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) ON DELETE CASCADE NOT VALID")2967 -> 0.0016s2968-- execute("ALTER TABLE pull_requests ADD CONSTRAINT fk_new_pull_requests_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) ON DELETE CASCADE NOT VALID")2969 -> 0.0013s2970-- execute("ALTER TABLE ssl_keys ADD CONSTRAINT fk_new_ssl_keys_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) ON DELETE CASCADE NOT VALID")2971 -> 0.0015s2972-- execute("ALTER TABLE requests ADD CONSTRAINT fk_new_requests_on_commit_id FOREIGN KEY (commit_id) REFERENCES commits(id) ON DELETE CASCADE NOT VALID")2973 -> 0.0013s2974-- execute("ALTER TABLE requests ADD CONSTRAINT fk_new_requests_on_pull_request_id FOREIGN KEY (pull_request_id) REFERENCES pull_requests(id) ON DELETE CASCADE NOT VALID")2975 -> 0.0015s2976-- execute("ALTER TABLE requests ADD CONSTRAINT fk_new_requests_on_branch_id FOREIGN KEY (branch_id) REFERENCES branches(id) ON DELETE CASCADE NOT VALID")2977 -> 0.0015s2978-- execute("ALTER TABLE requests ADD CONSTRAINT fk_new_requests_on_tag_id FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE CASCADE NOT VALID")2979 -> 0.0013s2980-- execute("ALTER TABLE requests ADD CONSTRAINT fk_new_requests_on_config_id FOREIGN KEY (config_id) REFERENCES request_configs(id) ON DELETE CASCADE NOT VALID")2981 -> 0.0015s2982-- execute("ALTER TABLE stages ADD CONSTRAINT fk_new_stages_on_build_id FOREIGN KEY (build_id) REFERENCES builds(id) ON DELETE CASCADE NOT VALID")2983 -> 0.0013s2984-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_new_builds_on_repository_id")2985 -> 0.0026s2986-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_new_builds_on_commit_id")2987 -> 0.0019s2988-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_new_builds_on_request_id")2989 -> 0.0019s2990-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_new_builds_on_pull_request_id")2991 -> 0.0014s2992-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_new_builds_on_branch_id")2993 -> 0.0023s2994-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_new_builds_on_tag_id")2995 -> 0.0027s2996-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_new_builds_on_config_id")2997 -> 0.0013s2998-- execute("ALTER TABLE jobs VALIDATE CONSTRAINT fk_new_jobs_on_repository_id")2999 -> 0.0016s3000-- execute("ALTER TABLE jobs VALIDATE CONSTRAINT fk_new_jobs_on_commit_id")3001 -> 0.0013s3002-- execute("ALTER TABLE jobs VALIDATE CONSTRAINT fk_new_jobs_on_stage_id")3003 -> 0.0014s3004-- execute("ALTER TABLE jobs VALIDATE CONSTRAINT fk_new_jobs_on_config_id")3005 -> 0.0015s3006-- execute("ALTER TABLE branches VALIDATE CONSTRAINT fk_new_branches_on_repository_id")3007 -> 0.0014s3008-- execute("ALTER TABLE tags VALIDATE CONSTRAINT fk_new_tags_on_repository_id")3009 -> 0.0011s3010-- execute("ALTER TABLE commits VALIDATE CONSTRAINT fk_new_commits_on_repository_id")3011 -> 0.0012s3012-- execute("ALTER TABLE commits VALIDATE CONSTRAINT fk_new_commits_on_branch_id")3013 -> 0.0012s3014-- execute("ALTER TABLE commits VALIDATE CONSTRAINT fk_new_commits_on_tag_id")3015 -> 0.0010s3016-- execute("ALTER TABLE crons VALIDATE CONSTRAINT fk_new_crons_on_branch_id")3017 -> 0.0013s3018-- execute("ALTER TABLE job_configs VALIDATE CONSTRAINT fk_new_job_configs_on_repository_id")3019 -> 0.0012s3020-- execute("ALTER TABLE build_configs VALIDATE CONSTRAINT fk_new_build_configs_on_repository_id")3021 -> 0.0011s3022-- execute("ALTER TABLE pull_requests VALIDATE CONSTRAINT fk_new_pull_requests_on_repository_id")3023 -> 0.0011s3024-- execute("ALTER TABLE ssl_keys VALIDATE CONSTRAINT fk_new_ssl_keys_on_repository_id")3025 -> 0.0011s3026-- execute("ALTER TABLE requests VALIDATE CONSTRAINT fk_new_requests_on_commit_id")3027 -> 0.0013s3028-- execute("ALTER TABLE requests VALIDATE CONSTRAINT fk_new_requests_on_pull_request_id")3029 -> 0.0012s3030-- execute("ALTER TABLE requests VALIDATE CONSTRAINT fk_new_requests_on_branch_id")3031 -> 0.0011s3032-- execute("ALTER TABLE requests VALIDATE CONSTRAINT fk_new_requests_on_tag_id")3033 -> 0.0011s3034-- execute("ALTER TABLE requests VALIDATE CONSTRAINT fk_new_requests_on_config_id")3035 -> 0.0011s3036-- execute("ALTER TABLE stages VALIDATE CONSTRAINT fk_new_stages_on_build_id")3037 -> 0.0010s3038-- execute("ALTER TABLE builds DROP CONSTRAINT fk_builds_on_repository_id")3039 -> 0.0012s3040-- execute("ALTER TABLE builds DROP CONSTRAINT fk_builds_on_commit_id")3041 -> 0.0011s3042-- execute("ALTER TABLE builds DROP CONSTRAINT fk_builds_on_request_id")3043 -> 0.0010s3044-- execute("ALTER TABLE builds DROP CONSTRAINT fk_builds_on_pull_request_id")3045 -> 0.0012s3046-- execute("ALTER TABLE builds DROP CONSTRAINT fk_builds_on_branch_id")3047 -> 0.0010s3048-- execute("ALTER TABLE builds DROP CONSTRAINT fk_builds_on_tag_id")3049 -> 0.0012s3050-- execute("ALTER TABLE builds DROP CONSTRAINT fk_builds_on_config_id")3051 -> 0.0011s3052-- execute("ALTER TABLE jobs DROP CONSTRAINT fk_jobs_on_repository_id")3053 -> 0.0012s3054-- execute("ALTER TABLE jobs DROP CONSTRAINT fk_jobs_on_commit_id")3055 -> 0.0011s3056-- execute("ALTER TABLE jobs DROP CONSTRAINT fk_jobs_on_stage_id")3057 -> 0.0010s3058-- execute("ALTER TABLE jobs DROP CONSTRAINT fk_jobs_on_config_id")3059 -> 0.0009s3060-- execute("ALTER TABLE branches DROP CONSTRAINT fk_branches_on_repository_id")3061 -> 0.0010s3062-- execute("ALTER TABLE tags DROP CONSTRAINT fk_tags_on_repository_id")3063 -> 0.0010s3064-- execute("ALTER TABLE commits DROP CONSTRAINT fk_commits_on_repository_id")3065 -> 0.0013s3066-- execute("ALTER TABLE commits DROP CONSTRAINT fk_commits_on_branch_id")3067 -> 0.0009s3068-- execute("ALTER TABLE commits DROP CONSTRAINT fk_commits_on_tag_id")3069 -> 0.0008s3070-- execute("ALTER TABLE crons DROP CONSTRAINT fk_crons_on_branch_id")3071 -> 0.0010s3072-- execute("ALTER TABLE job_configs DROP CONSTRAINT fk_job_configs_on_repository_id")3073 -> 0.0009s3074-- execute("ALTER TABLE build_configs DROP CONSTRAINT fk_build_configs_on_repository_id")3075 -> 0.0009s3076-- execute("ALTER TABLE pull_requests DROP CONSTRAINT fk_pull_requests_on_repository_id")3077 -> 0.0010s3078-- execute("ALTER TABLE ssl_keys DROP CONSTRAINT fk_ssl_keys_on_repository_id")3079 -> 0.0010s3080-- execute("ALTER TABLE requests DROP CONSTRAINT fk_requests_on_commit_id")3081 -> 0.0010s3082-- execute("ALTER TABLE requests DROP CONSTRAINT fk_requests_on_pull_request_id")3083 -> 0.0010s3084-- execute("ALTER TABLE requests DROP CONSTRAINT fk_requests_on_branch_id")3085 -> 0.0009s3086-- execute("ALTER TABLE requests DROP CONSTRAINT fk_requests_on_tag_id")3087 -> 0.0009s3088-- execute("ALTER TABLE requests DROP CONSTRAINT fk_requests_on_config_id")3089 -> 0.0010s3090-- execute("ALTER TABLE stages DROP CONSTRAINT fk_stages_on_build_id")3091 -> 0.0010s3092-- execute("ALTER TABLE builds RENAME CONSTRAINT fk_new_builds_on_repository_id TO fk_builds_on_repository_id")3093 -> 0.0005s3094-- execute("ALTER TABLE builds RENAME CONSTRAINT fk_new_builds_on_commit_id TO fk_builds_on_commit_id")3095 -> 0.0005s3096-- execute("ALTER TABLE builds RENAME CONSTRAINT fk_new_builds_on_request_id TO fk_builds_on_request_id")3097 -> 0.0006s3098-- execute("ALTER TABLE builds RENAME CONSTRAINT fk_new_builds_on_pull_request_id TO fk_builds_on_pull_request_id")3099 -> 0.0004s3100-- execute("ALTER TABLE builds RENAME CONSTRAINT fk_new_builds_on_branch_id TO fk_builds_on_branch_id")3101 -> 0.0005s3102-- execute("ALTER TABLE builds RENAME CONSTRAINT fk_new_builds_on_tag_id TO fk_builds_on_tag_id")3103 -> 0.0005s3104-- execute("ALTER TABLE builds RENAME CONSTRAINT fk_new_builds_on_config_id TO fk_builds_on_config_id")3105 -> 0.0004s3106-- execute("ALTER TABLE jobs RENAME CONSTRAINT fk_new_jobs_on_repository_id TO fk_jobs_on_repository_id")3107 -> 0.0004s3108-- execute("ALTER TABLE jobs RENAME CONSTRAINT fk_new_jobs_on_commit_id TO fk_jobs_on_commit_id")3109 -> 0.0006s3110-- execute("ALTER TABLE jobs RENAME CONSTRAINT fk_new_jobs_on_stage_id TO fk_jobs_on_stage_id")3111 -> 0.0006s3112-- execute("ALTER TABLE jobs RENAME CONSTRAINT fk_new_jobs_on_config_id TO fk_jobs_on_config_id")3113 -> 0.0005s3114-- execute("ALTER TABLE branches RENAME CONSTRAINT fk_new_branches_on_repository_id TO fk_branches_on_repository_id")3115 -> 0.0005s3116-- execute("ALTER TABLE tags RENAME CONSTRAINT fk_new_tags_on_repository_id TO fk_tags_on_repository_id")3117 -> 0.0005s3118-- execute("ALTER TABLE commits RENAME CONSTRAINT fk_new_commits_on_repository_id TO fk_commits_on_repository_id")3119 -> 0.0005s3120-- execute("ALTER TABLE commits RENAME CONSTRAINT fk_new_commits_on_branch_id TO fk_commits_on_branch_id")3121 -> 0.0005s3122-- execute("ALTER TABLE commits RENAME CONSTRAINT fk_new_commits_on_tag_id TO fk_commits_on_tag_id")3123 -> 0.0005s3124-- execute("ALTER TABLE crons RENAME CONSTRAINT fk_new_crons_on_branch_id TO fk_crons_on_branch_id")3125 -> 0.0004s3126-- execute("ALTER TABLE job_configs RENAME CONSTRAINT fk_new_job_configs_on_repository_id TO fk_job_configs_on_repository_id")3127 -> 0.0004s3128-- execute("ALTER TABLE build_configs RENAME CONSTRAINT fk_new_build_configs_on_repository_id TO fk_build_configs_on_repository_id")3129 -> 0.0004s3130-- execute("ALTER TABLE pull_requests RENAME CONSTRAINT fk_new_pull_requests_on_repository_id TO fk_pull_requests_on_repository_id")3131 -> 0.0005s3132-- execute("ALTER TABLE ssl_keys RENAME CONSTRAINT fk_new_ssl_keys_on_repository_id TO fk_ssl_keys_on_repository_id")3133 -> 0.0004s3134-- execute("ALTER TABLE requests RENAME CONSTRAINT fk_new_requests_on_commit_id TO fk_requests_on_commit_id")3135 -> 0.0004s3136-- execute("ALTER TABLE requests RENAME CONSTRAINT fk_new_requests_on_pull_request_id TO fk_requests_on_pull_request_id")3137 -> 0.0005s3138-- execute("ALTER TABLE requests RENAME CONSTRAINT fk_new_requests_on_branch_id TO fk_requests_on_branch_id")3139 -> 0.0005s3140-- execute("ALTER TABLE requests RENAME CONSTRAINT fk_new_requests_on_tag_id TO fk_requests_on_tag_id")3141 -> 0.0005s3142-- execute("ALTER TABLE requests RENAME CONSTRAINT fk_new_requests_on_config_id TO fk_requests_on_config_id")3143 -> 0.0005s3144-- execute("ALTER TABLE stages RENAME CONSTRAINT fk_new_stages_on_build_id TO fk_stages_on_build_id")3145 -> 0.0005s3146== 20190718092750 AddDeleteCascadeToForeignKeys: migrated (0.1152s) ===========3148== 20190718100426 UpdateSoftDeleteProcedure: migrating ========================3149-- execute("DROP FUNCTION IF EXISTS soft_delete_repo_data(bigint);\nCREATE FUNCTION soft_delete_repo_data(r_id bigint) RETURNS void AS $$\nDECLARE\n request_raw_config_ids bigint[];\n request_raw_configuration_ids bigint[];\n request_yaml_config_ids bigint[];\n request_config_ids bigint[];\n tag_ids bigint[];\n ssl_key_ids bigint[];\n build_config_ids bigint[];\n job_config_ids bigint[];\n build_ids bigint[];\n pull_request_ids bigint[];\n commit_ids bigint[];\n request_ids bigint[];\n request_payload_ids bigint[];\n stage_ids bigint[];\n job_ids bigint[];\nBEGIN\n SELECT INTO job_ids array_agg(id) FROM jobs WHERE repository_id = r_id;\n SELECT INTO stage_ids array_agg(id) FROM stages WHERE build_id IN (SELECT id FROM builds WHERE repository_id = r_id);\n SELECT INTO request_payload_ids array_agg(id) FROM request_payloads WHERE request_id IN (SELECT id FROM requests WHERE repository_id = r_id);\n SELECT INTO request_ids array_agg(id) FROM requests WHERE repository_id = r_id;\n SELECT INTO commit_ids array_agg(id) FROM commits WHERE repository_id = r_id;\n SELECT INTO pull_request_ids array_agg(id) FROM pull_requests WHERE repository_id = r_id;\n SELECT INTO build_ids array_agg(id) FROM builds WHERE repository_id = r_id;\n SELECT INTO job_config_ids array_agg(id) FROM job_configs WHERE repository_id = r_id;\n SELECT INTO build_config_ids array_agg(id) FROM build_configs WHERE repository_id = r_id;\n SELECT INTO ssl_key_ids array_agg(id) FROM ssl_keys WHERE repository_id = r_id;\n SELECT INTO tag_ids array_agg(id) FROM tags WHERE repository_id = r_id;\n SELECT INTO request_config_ids array_agg(id) FROM request_configs WHERE repository_id = r_id;\n SELECT INTO request_yaml_config_ids array_agg(id) FROM request_yaml_configs WHERE repository_id = r_id;\n SELECT INTO request_raw_configuration_ids array_agg(id) FROM request_raw_configurations WHERE request_id = ANY(request_ids);\n SELECT INTO request_raw_config_ids array_agg(id) FROM request_raw_configs WHERE id IN (SELECT request_raw_config_id FROM request_raw_configurations WHERE request_id = ANY(request_ids));\n\n INSERT INTO deleted_jobs SELECT * FROM jobs WHERE id = ANY(job_ids);\n INSERT INTO deleted_stages SELECT * FROM stages WHERE id = ANY(stage_ids);\n INSERT INTO deleted_request_payloads SELECT * FROM request_payloads WHERE id = ANY(request_payload_ids);\n INSERT INTO deleted_requests SELECT * FROM requests WHERE id = ANY(request_ids);\n INSERT INTO deleted_commits SELECT * FROM commits WHERE id = ANY(commit_ids);\n INSERT INTO deleted_pull_requests SELECT * FROM pull_requests WHERE id = ANY(pull_request_ids);\n INSERT INTO deleted_builds SELECT * FROM builds WHERE id = ANY(build_ids);\n INSERT INTO deleted_job_configs SELECT * FROM job_configs WHERE id = ANY(job_config_ids);\n INSERT INTO deleted_build_configs SELECT * FROM build_configs WHERE id = ANY(build_config_ids);\n INSERT INTO deleted_ssl_keys SELECT * FROM ssl_keys WHERE id = ANY(ssl_key_ids);\n INSERT INTO deleted_tags SELECT * FROM tags WHERE id = ANY(tag_ids);\n INSERT INTO deleted_request_configs SELECT * FROM request_configs WHERE id = ANY(request_config_ids);\n INSERT INTO deleted_request_yaml_configs SELECT * FROM request_yaml_configs WHERE id = ANY(request_yaml_config_ids);\n INSERT INTO deleted_request_raw_configurations SELECT * FROM request_raw_configurations WHERE id = ANY(request_raw_configuration_ids);\n INSERT INTO deleted_request_raw_configs SELECT * FROM request_raw_configs WHERE id = ANY(request_raw_config_ids);\n\n DELETE FROM jobs WHERE id = ANY(job_ids);\n DELETE FROM stages WHERE id = ANY(stage_ids);\n DELETE FROM request_payloads WHERE id = ANY(request_payload_ids);\n DELETE FROM requests WHERE id = ANY(request_ids);\n DELETE FROM commits WHERE id = ANY(commit_ids);\n DELETE FROM pull_requests WHERE id = ANY(pull_request_ids);\n DELETE FROM builds WHERE id = ANY(build_ids);\n DELETE FROM job_configs WHERE id = ANY(job_config_ids);\n DELETE FROM build_configs WHERE id = ANY(build_config_ids);\n DELETE FROM ssl_keys WHERE id = ANY(ssl_key_ids);\n DELETE FROM tags WHERE id = ANY(tag_ids);\n DELETE FROM request_configs WHERE id = ANY(request_config_ids);\n DELETE FROM request_yaml_configs WHERE id = ANY(request_yaml_config_ids);\n DELETE FROM request_raw_configurations WHERE id = ANY(request_raw_configuration_ids);\n DELETE FROM request_raw_configs WHERE id = ANY(request_raw_config_ids);\nEND;\n$$ LANGUAGE plpgsql;\n")3150 -> 0.0028s3151== 20190718100426 UpdateSoftDeleteProcedure: migrated (0.0031s) ===============3153== 20190725103113 UpdateSoftDelete: migrating =================================3154-- execute("create table deleted_request_yaml_configs (like request_yaml_configs)")3155 -> 0.0017s3156-- execute("DROP FUNCTION IF EXISTS soft_delete_repo_data(bigint);\nCREATE FUNCTION soft_delete_repo_data(r_id bigint) RETURNS void AS $$\nDECLARE\n request_raw_config_ids bigint[];\n request_raw_configuration_ids bigint[];\n request_yaml_config_ids bigint[];\n request_config_ids bigint[];\n tag_ids bigint[];\n ssl_key_ids bigint[];\n build_config_ids bigint[];\n job_config_ids bigint[];\n build_ids bigint[];\n pull_request_ids bigint[];\n commit_ids bigint[];\n request_ids bigint[];\n request_payload_ids bigint[];\n stage_ids bigint[];\n job_ids bigint[];\nBEGIN\n SELECT INTO job_ids array_agg(id) FROM jobs WHERE repository_id = r_id;\n SELECT INTO stage_ids array_agg(id) FROM stages WHERE build_id IN (SELECT id FROM builds WHERE repository_id = r_id);\n SELECT INTO request_payload_ids array_agg(id) FROM request_payloads WHERE request_id IN (SELECT id FROM requests WHERE repository_id = r_id);\n SELECT INTO request_ids array_agg(id) FROM requests WHERE repository_id = r_id;\n SELECT INTO commit_ids array_agg(id) FROM commits WHERE repository_id = r_id;\n SELECT INTO pull_request_ids array_agg(id) FROM pull_requests WHERE repository_id = r_id;\n SELECT INTO build_ids array_agg(id) FROM builds WHERE repository_id = r_id;\n SELECT INTO job_config_ids array_agg(id) FROM job_configs WHERE repository_id = r_id;\n SELECT INTO build_config_ids array_agg(id) FROM build_configs WHERE repository_id = r_id;\n SELECT INTO ssl_key_ids array_agg(id) FROM ssl_keys WHERE repository_id = r_id;\n SELECT INTO tag_ids array_agg(id) FROM tags WHERE repository_id = r_id;\n SELECT INTO request_config_ids array_agg(id) FROM request_configs WHERE repository_id = r_id;\n SELECT INTO request_yaml_config_ids array_agg(id) FROM request_yaml_configs WHERE repository_id = r_id;\n SELECT INTO request_raw_configuration_ids array_agg(id) FROM request_raw_configurations WHERE request_id = ANY(request_ids);\n SELECT INTO request_raw_config_ids array_agg(id) FROM request_raw_configs WHERE id IN (SELECT request_raw_config_id FROM request_raw_configurations WHERE request_id = ANY(request_ids));\n\n INSERT INTO deleted_jobs SELECT * FROM jobs WHERE id = ANY(job_ids);\n INSERT INTO deleted_stages SELECT * FROM stages WHERE id = ANY(stage_ids);\n INSERT INTO deleted_request_payloads SELECT * FROM request_payloads WHERE id = ANY(request_payload_ids);\n INSERT INTO deleted_requests SELECT * FROM requests WHERE id = ANY(request_ids);\n INSERT INTO deleted_commits SELECT * FROM commits WHERE id = ANY(commit_ids);\n INSERT INTO deleted_pull_requests SELECT * FROM pull_requests WHERE id = ANY(pull_request_ids);\n INSERT INTO deleted_builds SELECT * FROM builds WHERE id = ANY(build_ids);\n INSERT INTO deleted_job_configs SELECT * FROM job_configs WHERE id = ANY(job_config_ids);\n INSERT INTO deleted_build_configs SELECT * FROM build_configs WHERE id = ANY(build_config_ids);\n INSERT INTO deleted_ssl_keys SELECT * FROM ssl_keys WHERE id = ANY(ssl_key_ids);\n INSERT INTO deleted_tags SELECT * FROM tags WHERE id = ANY(tag_ids);\n INSERT INTO deleted_request_configs SELECT * FROM request_configs WHERE id = ANY(request_config_ids);\n INSERT INTO deleted_request_yaml_configs SELECT * FROM request_yaml_configs WHERE id = ANY(request_yaml_config_ids);\n INSERT INTO deleted_request_raw_configurations SELECT * FROM request_raw_configurations WHERE id = ANY(request_raw_configuration_ids);\n INSERT INTO deleted_request_raw_configs SELECT * FROM request_raw_configs WHERE id = ANY(request_raw_config_ids);\n\n DELETE FROM jobs WHERE id = ANY(job_ids);\n DELETE FROM stages WHERE id = ANY(stage_ids);\n DELETE FROM request_payloads WHERE id = ANY(request_payload_ids);\n DELETE FROM requests WHERE id = ANY(request_ids);\n DELETE FROM commits WHERE id = ANY(commit_ids);\n DELETE FROM pull_requests WHERE id = ANY(pull_request_ids);\n DELETE FROM builds WHERE id = ANY(build_ids);\n DELETE FROM job_configs WHERE id = ANY(job_config_ids);\n DELETE FROM build_configs WHERE id = ANY(build_config_ids);\n DELETE FROM ssl_keys WHERE id = ANY(ssl_key_ids);\n DELETE FROM tags WHERE id = ANY(tag_ids);\n DELETE FROM request_configs WHERE id = ANY(request_config_ids);\n DELETE FROM request_yaml_configs WHERE id = ANY(request_yaml_config_ids);\n DELETE FROM request_raw_configurations WHERE id = ANY(request_raw_configuration_ids);\n DELETE FROM request_raw_configs WHERE id = ANY(request_raw_config_ids);\nEND;\n$$ LANGUAGE plpgsql;\n")3157 -> 0.0019s3158== 20190725103113 UpdateSoftDelete: migrated (0.0039s) ========================3160== 20190725105934 AddOrgIdToConfigs: migrating ================================3161-- add_column(:job_configs, :org_id, :bigint)3162 -> 0.0008s3163-- add_column(:deleted_job_configs, :org_id, :bigint)3164 -> 0.0007s3165-- add_column(:build_configs, :org_id, :bigint)3166 -> 0.0006s3167-- add_column(:deleted_build_configs, :org_id, :bigint)3168 -> 0.0006s3169-- add_column(:request_configs, :org_id, :bigint)3170 -> 0.0006s3171-- add_column(:deleted_request_configs, :org_id, :bigint)3172 -> 0.0006s3173-- add_column(:request_yaml_configs, :org_id, :bigint)3174 -> 0.0005s3175-- add_column(:deleted_request_yaml_configs, :org_id, :bigint)3176 -> 0.0006s3177-- add_column(:request_payloads, :org_id, :bigint)3178 -> 0.0005s3179-- add_column(:deleted_request_payloads, :org_id, :bigint)3180 -> 0.0006s3181-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_job_configs_on_org_id ON job_configs (org_id)")3182 -> 0.0009s3183-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_build_configs_on_org_id ON build_configs (org_id)")3184 -> 0.0009s3185-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_request_configs_on_org_id ON request_configs (org_id)")3186 -> 0.0008s3187-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_request_yaml_configs_on_org_id ON request_yaml_configs (org_id)")3188 -> 0.0008s3189-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_request_payloads_on_org_id ON request_payloads (org_id)")3190 -> 0.0008s3191== 20190725105934 AddOrgIdToConfigs: migrated (0.0111s) =======================3193== 20190729105934 AddOrgAndComIdsToRawConfigs: migrating ======================3194-- add_column(:request_raw_configs, :org_id, :bigint)3195 -> 0.0007s3196-- add_column(:request_raw_configurations, :org_id, :bigint)3197 -> 0.0006s3198-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_request_raw_configs_on_org_id ON request_raw_configs (org_id)")3199 -> 0.0008s3200-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_request_raw_configurations_on_org_id ON request_raw_configurations (org_id)")3201 -> 0.0008s3202== 20190729105934 AddOrgAndComIdsToRawConfigs: migrated (0.0030s) =============3204== 20190801120510 AddMoreDeletedTables: migrating =============================3205-- execute("create table if not exists deleted_request_raw_configs (like request_raw_configs)")3206 -> 0.0016s3207-- execute("create table if not exists deleted_request_raw_configurations (like request_raw_configurations)")3208 -> 0.0012s3209-- execute("DROP FUNCTION IF EXISTS soft_delete_repo_data(bigint);\nCREATE FUNCTION soft_delete_repo_data(r_id bigint) RETURNS void AS $$\nDECLARE\n request_raw_config_ids bigint[];\n request_raw_configuration_ids bigint[];\n request_yaml_config_ids bigint[];\n request_config_ids bigint[];\n tag_ids bigint[];\n ssl_key_ids bigint[];\n build_config_ids bigint[];\n job_config_ids bigint[];\n build_ids bigint[];\n pull_request_ids bigint[];\n commit_ids bigint[];\n request_ids bigint[];\n request_payload_ids bigint[];\n stage_ids bigint[];\n job_ids bigint[];\nBEGIN\n SELECT INTO job_ids array_agg(id) FROM jobs WHERE repository_id = r_id;\n SELECT INTO stage_ids array_agg(id) FROM stages WHERE build_id IN (SELECT id FROM builds WHERE repository_id = r_id);\n SELECT INTO request_payload_ids array_agg(id) FROM request_payloads WHERE request_id IN (SELECT id FROM requests WHERE repository_id = r_id);\n SELECT INTO request_ids array_agg(id) FROM requests WHERE repository_id = r_id;\n SELECT INTO commit_ids array_agg(id) FROM commits WHERE repository_id = r_id;\n SELECT INTO pull_request_ids array_agg(id) FROM pull_requests WHERE repository_id = r_id;\n SELECT INTO build_ids array_agg(id) FROM builds WHERE repository_id = r_id;\n SELECT INTO job_config_ids array_agg(id) FROM job_configs WHERE repository_id = r_id;\n SELECT INTO build_config_ids array_agg(id) FROM build_configs WHERE repository_id = r_id;\n SELECT INTO ssl_key_ids array_agg(id) FROM ssl_keys WHERE repository_id = r_id;\n SELECT INTO tag_ids array_agg(id) FROM tags WHERE repository_id = r_id;\n SELECT INTO request_config_ids array_agg(id) FROM request_configs WHERE repository_id = r_id;\n SELECT INTO request_yaml_config_ids array_agg(id) FROM request_yaml_configs WHERE repository_id = r_id;\n SELECT INTO request_raw_configuration_ids array_agg(id) FROM request_raw_configurations WHERE request_id = ANY(request_ids);\n SELECT INTO request_raw_config_ids array_agg(id) FROM request_raw_configs WHERE id IN (SELECT request_raw_config_id FROM request_raw_configurations WHERE request_id = ANY(request_ids));\n\n INSERT INTO deleted_jobs SELECT * FROM jobs WHERE id = ANY(job_ids);\n INSERT INTO deleted_stages SELECT * FROM stages WHERE id = ANY(stage_ids);\n INSERT INTO deleted_request_payloads SELECT * FROM request_payloads WHERE id = ANY(request_payload_ids);\n INSERT INTO deleted_requests SELECT * FROM requests WHERE id = ANY(request_ids);\n INSERT INTO deleted_commits SELECT * FROM commits WHERE id = ANY(commit_ids);\n INSERT INTO deleted_pull_requests SELECT * FROM pull_requests WHERE id = ANY(pull_request_ids);\n INSERT INTO deleted_builds SELECT * FROM builds WHERE id = ANY(build_ids);\n INSERT INTO deleted_job_configs SELECT * FROM job_configs WHERE id = ANY(job_config_ids);\n INSERT INTO deleted_build_configs SELECT * FROM build_configs WHERE id = ANY(build_config_ids);\n INSERT INTO deleted_ssl_keys SELECT * FROM ssl_keys WHERE id = ANY(ssl_key_ids);\n INSERT INTO deleted_tags SELECT * FROM tags WHERE id = ANY(tag_ids);\n INSERT INTO deleted_request_configs SELECT * FROM request_configs WHERE id = ANY(request_config_ids);\n INSERT INTO deleted_request_yaml_configs SELECT * FROM request_yaml_configs WHERE id = ANY(request_yaml_config_ids);\n INSERT INTO deleted_request_raw_configurations SELECT * FROM request_raw_configurations WHERE id = ANY(request_raw_configuration_ids);\n INSERT INTO deleted_request_raw_configs SELECT * FROM request_raw_configs WHERE id = ANY(request_raw_config_ids);\n\n DELETE FROM jobs WHERE id = ANY(job_ids);\n DELETE FROM stages WHERE id = ANY(stage_ids);\n DELETE FROM request_payloads WHERE id = ANY(request_payload_ids);\n DELETE FROM requests WHERE id = ANY(request_ids);\n DELETE FROM commits WHERE id = ANY(commit_ids);\n DELETE FROM pull_requests WHERE id = ANY(pull_request_ids);\n DELETE FROM builds WHERE id = ANY(build_ids);\n DELETE FROM job_configs WHERE id = ANY(job_config_ids);\n DELETE FROM build_configs WHERE id = ANY(build_config_ids);\n DELETE FROM ssl_keys WHERE id = ANY(ssl_key_ids);\n DELETE FROM tags WHERE id = ANY(tag_ids);\n DELETE FROM request_configs WHERE id = ANY(request_config_ids);\n DELETE FROM request_yaml_configs WHERE id = ANY(request_yaml_config_ids);\n DELETE FROM request_raw_configurations WHERE id = ANY(request_raw_configuration_ids);\n DELETE FROM request_raw_configs WHERE id = ANY(request_raw_config_ids);\nEND;\n$$ LANGUAGE plpgsql;\n")3210 -> 0.0018s3211== 20190801120510 AddMoreDeletedTables: migrated (0.0051s) ====================3213== 20190815152336 AddComIdToMoreTables: migrating =============================3214-- add_column(:request_configs, :com_id, :bigint)3215 -> 0.0007s3216-- add_column(:request_yaml_configs, :com_id, :bigint)3217 -> 0.0006s3218-- add_column(:deleted_request_configs, :com_id, :bigint)3219 -> 0.0006s3220-- add_column(:deleted_request_yaml_configs, :com_id, :bigint)3221 -> 0.0006s3222-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_request_configs_on_com_id ON request_configs (com_id)")3223 -> 0.0009s3224-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_request_yaml_configs_on_com_id ON request_yaml_configs (com_id)")3225 -> 0.0008s3226== 20190815152336 AddComIdToMoreTables: migrated (0.0044s) ====================3228== 20190815164320 AddComIdToBuildConfigs: migrating ===========================3229-- add_column(:build_configs, :com_id, :bigint)3230 -> 0.0006s3231-- add_column(:deleted_build_configs, :com_id, :bigint)3232 -> 0.0006s3233-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_build_configs_on_com_id ON build_configs (com_id)")3234 -> 0.0008s3235== 20190815164320 AddComIdToBuildConfigs: migrated (0.0022s) ==================3237== 20190815172205 AddComIdToJobConfigs: migrating =============================3238-- add_column(:job_configs, :com_id, :bigint)3239 -> 0.0006s3240-- add_column(:deleted_job_configs, :com_id, :bigint)3241 -> 0.0005s3242-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_job_configs_on_com_id ON job_configs (com_id)")3243 -> 0.0008s3244== 20190815172205 AddComIdToJobConfigs: migrated (0.0022s) ====================3246== 20190819082558 AddVcsIdToUser: migrating ===================================3247-- add_column(:users, :vcs_id, :string, {:default=>nil})3248 -> 0.0010s3249-- execute("CREATE INDEX CONCURRENTLY index_users_on_vcs_id_and_vcs_type ON users (vcs_id, vcs_type);")3250 -> 0.0010s3251== 20190819082558 AddVcsIdToUser: migrated (0.0021s) ==========================3253== 20190819082559 AddVcsIdToRepository: migrating =============================3254-- add_column(:repositories, :vcs_id, :string, {:default=>nil})3255 -> 0.0011s3256-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_vcs_id_and_vcs_type ON repositories (vcs_id, vcs_type);")3257 -> 0.0010s3258== 20190819082559 AddVcsIdToRepository: migrated (0.0023s) ====================3260== 20190820082431 AddVcsIdToOrganization: migrating ===========================3261-- add_column(:organizations, :vcs_id, :string, {:default=>nil})3262 -> 0.0010s3263-- execute("CREATE INDEX CONCURRENTLY index_organizations_on_vcs_id_and_vcs_type ON organizations (vcs_id, vcs_type);")3264 -> 0.0009s3265== 20190820082431 AddVcsIdToOrganization: migrated (0.0020s) ==================3267== 20190913092543 CopyVcsIdForRepository: migrating ===========================3268-- select_value("SELECT id FROM repositories ORDER BY id DESC LIMIT 1")3269 -> 0.0008s3270-- execute("UPDATE \"repositories\" SET vcs_id = github_id WHERE id BETWEEN 0 AND 5000")3271 -> 0.0009s3272== 20190913092543 CopyVcsIdForRepository: migrated (0.0023s) ==================3274== 20190913092554 CopyVcsIdForUser: migrating =================================3275-- select_value("SELECT id FROM users ORDER BY id DESC LIMIT 1")3276 -> 0.0007s3277-- execute("UPDATE \"users\" SET vcs_id = github_id WHERE id BETWEEN 0 AND 5000")3278 -> 0.0008s3279== 20190913092554 CopyVcsIdForUser: migrated (0.0019s) ========================3281== 20190913092565 CopyVcsIdForOrganization: migrating =========================3282-- select_value("SELECT id FROM organizations ORDER BY id DESC LIMIT 1")3283 -> 0.0007s3284-- execute("UPDATE \"organizations\" SET vcs_id = github_id WHERE id BETWEEN 0 AND 5000")3285 -> 0.0008s3286== 20190913092565 CopyVcsIdForOrganization: migrated (0.0019s) ================3288== 20190920160300 MessagesAddTypeSourceLine: migrating ========================3289-- add_column(:messages, :type, :string, {:default=>nil})3290 -> 0.0010s3291-- add_column(:messages, :src, :string, {:default=>nil})3292 -> 0.0010s3293-- add_column(:messages, :line, :integer, {:default=>nil})3294 -> 0.0009s3295== 20190920160300 MessagesAddTypeSourceLine: migrated (0.0032s) ===============3297== 20191112000000 ReposAddFork: migrating =====================================3298-- add_column(:repositories, :fork, :boolean, {:default=>nil})3299 -> 0.0010s3300== 20191112000000 ReposAddFork: migrated (0.0011s) ============================3302== 20191112172015 AddVcsIndexToRepositories: migrating ========================3303-- add_index(:repositories, [:vcs_type, :vcs_id], {:algorithm=>:concurrently})3304 -> 0.0013s3305== 20191112172015 AddVcsIndexToRepositories: migrated (0.0013s) ===============3307== 20191112172332 AddVcsIndexToUsers: migrating ===============================3308-- add_index(:users, [:vcs_type, :vcs_id], {:algorithm=>:concurrently})3309 -> 0.0011s3310== 20191112172332 AddVcsIndexToUsers: migrated (0.0012s) ======================3312== 20191219091445 AddHeadRepoVcsIdToPullRequest: migrating ====================3313-- add_column(:pull_requests, :head_repo_vcs_id, :string, {:default=>nil})3314 -> 0.0011s3315-- execute("CREATE INDEX CONCURRENTLY index_pull_requests_on_head_repo_vcs_id ON pull_requests (head_repo_vcs_id);")3316 -> 0.0009s3317== 20191219091445 AddHeadRepoVcsIdToPullRequest: migrated (0.0021s) ===========3319== 20191219091446 AddHeadRepoVcsIdToDeletedPullRequest: migrating =============3320-- add_column(:deleted_pull_requests, :head_repo_vcs_id, :string, {:default=>nil})3321 -> 0.0010s3322-- execute("CREATE INDEX CONCURRENTLY index_deleted_pull_requests_on_head_repo_vcs_id ON deleted_pull_requests (head_repo_vcs_id);")3323 -> 0.0008s3324== 20191219091446 AddHeadRepoVcsIdToDeletedPullRequest: migrated (0.0019s) ====3326== 20200122000000 AddConfigsJson: migrating ===================================3327-- add_column(:request_configs, :config_json, :json)3328 -> 0.0009s3329-- add_column(:build_configs, :config_json, :json)3330 -> 0.0006s3331-- add_column(:job_configs, :config_json, :json)3332 -> 0.0005s3333-- add_column(:deleted_request_configs, :config_json, :json)3334 -> 0.0005s3335-- add_column(:deleted_build_configs, :config_json, :json)3336 -> 0.0009s3337-- add_column(:deleted_job_configs, :config_json, :json)3338 -> 0.0005s3339== 20200122000000 AddConfigsJson: migrated (0.0043s) ==========================3341== 20200127000000 DropJobConfigsGpu: migrating ================================3342-- execute("DROP MATERIALIZED VIEW job_configs_gpu\n")3343 -> 0.0010s3344== 20200127000000 DropJobConfigsGpu: migrated (0.0011s) =======================3346== 20200127000001 RenameConfigsJson: migrating ================================3347-- remove_column(:request_configs, :config)3348 -> 0.0009s3349-- rename_column(:request_configs, :config_json, :config)3350 -> 0.0034s3351-- remove_column(:build_configs, :config)3352 -> 0.0006s3353-- rename_column(:build_configs, :config_json, :config)3354 -> 0.0036s3355-- remove_column(:job_configs, :config)3356 -> 0.0006s3357-- rename_column(:job_configs, :config_json, :config)3358 -> 0.0034s3359-- remove_column(:deleted_request_configs, :config)3360 -> 0.0005s3361-- rename_column(:deleted_request_configs, :config_json, :config)3362 -> 0.0013s3363-- remove_column(:deleted_build_configs, :config)3364 -> 0.0005s3365-- rename_column(:deleted_build_configs, :config_json, :config)3366 -> 0.0012s3367-- remove_column(:deleted_job_configs, :config)3368 -> 0.0005s3369-- rename_column(:deleted_job_configs, :config_json, :config)3370 -> 0.0013s3371== 20200127000001 RenameConfigsJson: migrated (0.0186s) =======================3373== 20200214144655 AddIndexToJobVersionsOnJobId: migrating =====================3374-- add_index(:job_versions, :job_id, {:algorithm=>:concurrently})3375 -> 0.0010s3376== 20200214144655 AddIndexToJobVersionsOnJobId: migrated (0.0011s) ============3378== 20200225085734 AddVcsSlugToRepository: migrating ===========================3379-- add_column(:repositories, :vcs_slug, :string, {:default=>nil})3380 -> 0.0011s3381== 20200225085734 AddVcsSlugToRepository: migrated (0.0012s) ==================3383== 20200227085734 AddVcsSourceHostToRepository: migrating =====================3384-- add_column(:repositories, :vcs_source_host, :string, {:default=>nil})3385 -> 0.0011s3386== 20200227085734 AddVcsSourceHostToRepository: migrated (0.0012s) ============3388== 20200227085736 AddVcsIndexes: migrating ====================================3389-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_lower_slug_or_on_lower_owner_name ON repositories (LOWER(vcs_slug), LOWER(owner_name), LOWER(name), LOWER(vcs_type)) WHERE invalidated_at IS NULL")3390 -> 0.0013s3391== 20200227085736 AddVcsIndexes: migrated (0.0014s) ===========================3393== 20200227085737 AddRepositoryNameAndSlugIndex: migrating ====================3394-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_slug_or_names ON repositories (vcs_slug, owner_name, name) WHERE invalidated_at IS NULL")3395 -> 0.0012s3396== 20200227085737 AddRepositoryNameAndSlugIndex: migrated (0.0013s) ===========3398== 20200227085742 AddPullRequestSourceData: migrating =========================3399-- add_column(:pull_requests, :base_repo_slug, :string, {:default=>nil})3400 -> 0.0011s3401-- add_column(:pull_requests, :base_repo_vcs_id, :string, {:default=>nil})3402 -> 0.0010s3403-- add_column(:pull_requests, :base_ref, :string, {:default=>nil})3404 -> 0.0010s3405-- add_column(:deleted_pull_requests, :base_repo_slug, :string, {:default=>nil})3406 -> 0.0009s3407-- add_column(:deleted_pull_requests, :base_repo_vcs_id, :string, {:default=>nil})3408 -> 0.0009s3409-- add_column(:deleted_pull_requests, :base_ref, :string, {:default=>nil})3410 -> 0.0009s3411== 20200227085742 AddPullRequestSourceData: migrated (0.0063s) ================3413== 20200312184018 AddUserUtmParamsTable: migrating ============================3414-- create_table(:user_utm_params)3415 -> 0.0039s3416== 20200312184018 AddUserUtmParamsTable: migrated (0.0040s) ===================3418== 20200316085738 AddRepositoryVcsSlugIndex: migrating ========================3419-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_lower_vcs_slug ON repositories (LOWER(vcs_slug))")3420 -> 0.0011s3421-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_lower_vcs_slug_valid ON repositories (LOWER(vcs_slug)) WHERE invalidated_at IS NULL")3422 -> 0.0011s3423== 20200316085738 AddRepositoryVcsSlugIndex: migrated (0.0023s) ===============3425== 20200325115329 AddMultipleJobStateIndexesOrderByNewest: migrating ==========3426-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_booting_jobs_on_repository_id_order_by_newest on jobs (repository_id, id desc) where state = 'booting'")3427 -> 0.0012s3428-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_canceled_jobs_on_repository_id_order_by_newest on jobs (repository_id, id desc) where state = 'canceled'")3429 -> 0.0011s3430-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_created_jobs_on_repository_id_order_by_newest on jobs (repository_id, id desc) where state = 'created'")3431 -> 0.0010s3432-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_errored_jobs_on_repository_id_order_by_newest on jobs (repository_id, id desc) where state = 'errored'")3433 -> 0.0011s3434-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_failed_jobs_on_repository_id_order_by_newest on jobs (repository_id, id desc) where state = 'failed'")3435 -> 0.0010s3436-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_passed_jobs_on_repository_id_order_by_newest on jobs (repository_id, id desc) where state = 'passed'")3437 -> 0.0011s3438-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_queued_jobs_on_repository_id_order_by_newest on jobs (repository_id, id desc) where state = 'queued'")3439 -> 0.0015s3440-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_received_jobs_on_repository_id_order_by_newest on jobs (repository_id, id desc) where state = 'received'")3441 -> 0.0016s3442-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_started_jobs_on_repository_id_order_by_newest on jobs (repository_id, id desc) where state = 'started'")3443 -> 0.0014s3444== 20200325115329 AddMultipleJobStateIndexesOrderByNewest: migrated (0.0114s) =3446== 20200325130013 AddFunctionMostRecentJobIdsForUserRepositoriesByStates: migrating3447-- execute("\n CREATE OR REPLACE FUNCTION\n most_recent_job_ids_for_user_repositories_by_states(uid int, states varchar default '') RETURNS table (id bigint) AS\n $BODY$\n DECLARE\n rid int;\n BEGIN\n SET LOCAL work_mem = '16MB';\n IF states <> '' THEN\n RETURN QUERY WITH matrix AS (\n SELECT repository_id, replace(replace(job_state::varchar, '(', ''), ')', '') as job_state\n FROM permissions p\n CROSS JOIN (\n SELECT unnest(regexp_split_to_array(states, ','))\n ) AS job_state\n WHERE p.user_id = uid\n )\n SELECT recent.id\n FROM matrix m\n CROSS JOIN LATERAL (\n SELECT job_id AS id, repository_id\n FROM most_recent_job_ids_for_repository_by_state(m.repository_id, m.job_state::varchar)\n ) AS recent\n ORDER BY id desc;\n ELSE\n for rid in\n SELECT repository_id\n FROM permissions\n WHERE user_id = uid\n LOOP\n RETURN QUERY select j.id from jobs j where repository_id = rid order by j.id desc limit 100;\n END LOOP;\n END IF;\n END\n $BODY$\n LANGUAGE plpgsql;\n ")3448 -> 0.0011s3449== 20200325130013 AddFunctionMostRecentJobIdsForUserRepositoriesByStates: migrated (0.0013s)3451== 20200330110527 AddFunctionMostRecentJobIdsForRepositoryByState: migrating ==3452-- execute("\n CREATE OR REPLACE FUNCTION\n most_recent_job_ids_for_repository_by_state(rid int, st varchar) RETURNS table (job_id bigint, repository_id int) AS\n $BODY$\n DECLARE\n BEGIN\n RETURN QUERY select j.id, j.repository_id from jobs j where j.repository_id = rid and j.state = st order by j.id desc limit 100;\n END\n $BODY$\n LANGUAGE plpgsql;\n ")3453 -> 0.0009s3454== 20200330110527 AddFunctionMostRecentJobIdsForRepositoryByState: migrated (0.0010s)3456== 20200406121218 AddIndexJobsOnRepositoryIdOrderByNewest: migrating ==========3457-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_jobs_on_repository_id_order_by_newest on jobs (repository_id, id desc)")3458 -> 0.0010s3459== 20200406121218 AddIndexJobsOnRepositoryIdOrderByNewest: migrated (0.0011s) =3461== 20200424000000 RequestRawConfigurationsAddMergeMode: migrating =============3462-- add_column(:request_raw_configurations, :merge_mode, :string, {:default=>nil})3463 -> 0.0010s3464-- add_column(:deleted_request_raw_configurations, :merge_mode, :string, {:default=>nil})3465 -> 0.0010s3466== 20200424000000 RequestRawConfigurationsAddMergeMode: migrated (0.0022s) ====3468== 20200527123653 AddColumnPriorityToTableJobsAndDeletedJobs: migrating =======3469-- add_column(:jobs, :priority, :integer, {:default=>nil})3470 -> 0.0010s3471-- add_column(:deleted_jobs, :priority, :integer, {:default=>nil})3472 -> 0.0013s3473== 20200527123653 AddColumnPriorityToTableJobsAndDeletedJobs: migrated (0.0024s)3475== 20200928143126 AddBuildTriggerPermissions: migrating =======================3476-- add_column(:memberships, :build_permission, :boolean, {:default=>nil})3477 -> 0.0010s3478-- add_column(:permissions, :build, :boolean, {:default=>nil})3479 -> 0.0010s3480== 20200928143126 AddBuildTriggerPermissions: migrated (0.0021s) ==============3482== 20202427123653 AddColumnHasLocalRegistrationToTableSubscriptions: migrating3483-- add_column(:subscriptions, :has_local_registration, :boolean, {:default=>nil})3484 -> 0.0010s3485== 20202427123653 AddColumnHasLocalRegistrationToTableSubscriptions: migrated (0.0011s)3487== 20210203130200 CreateBuildBackupsTable: migrating ==========================3488-- create_table(:build_backups, {:id=>:integer})3489 -> 0.0030s3490== 20210203130200 CreateBuildBackupsTable: migrated (0.0031s) =================3492== 20210203143155 AddConfirmationFieldsToUser: migrating ======================3493-- add_column(:users, :confirmed_at, :timestamp, {:precision=>nil})3494 -> 0.0006s3495-- add_column(:users, :token_expires_at, :timestamp, {:precision=>nil})3496 -> 0.0005s3497-- add_column(:users, :confirmation_token, :string)3498 -> 0.0006s3499-- add_index(:users, :confirmation_token)3500 -> 0.0008s3501== 20210203143155 AddConfirmationFieldsToUser: migrated (0.0026s) =============3503== 20210203143406 ConfirmCurrentUsers: migrating ==============================3504== 20210203143406 ConfirmCurrentUsers: migrated (0.0000s) =====================3506== 20210614140633 AddServerTypeToRepositories: migrating ======================3507-- add_column(:repositories, :server_type, :string, {:limit=>20})3508 -> 0.0007s3509== 20210614140633 AddServerTypeToRepositories: migrated (0.0008s) =============3511== 20220621151453 AddColumnRestartedByToTableJobs: migrating ==================3512-- add_column(:jobs, :restarted_by, :integer, {:default=>nil})3513 -> 0.0014s3514-- add_column(:deleted_jobs, :restarted_by, :integer, {:default=>nil})3515 -> 0.0010s3516== 20220621151453 AddColumnRestartedByToTableJobs: migrated (0.0025s) =========3518== 20220722162400 CreateAuditsTable: migrating ================================3519-- create_table(:audits)3520 -> 0.0038s3521== 20220722162400 CreateAuditsTable: migrated (0.0039s) =======================3523== 20220825140522 CreateCustomKeysTable: migrating ============================3524-- create_table(:custom_keys)3525 -> 0.0048s3526== 20220825140522 CreateCustomKeysTable: migrated (0.0048s) ===================3528== 20220905144600 AddScanFailedAtToRepositories: migrating ====================3529-- add_column(:repositories, :scan_failed_at, :timestamp)3530 -> 0.0025s3531== 20220905144600 AddScanFailedAtToRepositories: migrated (0.0025s) ===========3533== 20221214171030 AddPurposeColumnToTokens: migrating =========================3534-- add_column(:tokens, :purpose, :integer, {:limit=>4, :default=>0})3535 -> 0.0039s3536== 20221214171030 AddPurposeColumnToTokens: migrated (0.0041s) ================3538== 20230208161446 AddCloneUrlToRepositories: migrating ========================3539-- add_column(:repositories, :clone_url, :string)3540 -> 0.0011s3541== 20230208161446 AddCloneUrlToRepositories: migrated (0.0012s) ===============3543 sets unique_number on INSERT3544 does not set unique_number on INSERT if 0 is given as a value3545 sets unique_number on UPDATE3546 does not set unique_number on UPDATE if unique_number is 03548set_updated_at trigger3549 jobs3550 sets updated_at on INSERT3551 sets updated_at on UPDATE3552 works also for new columns3553 builds3554 sets updated_at on INSERT3555 sets updated_at on UPDATE3556 works also for new columns3558soft delete repo3559 ensure that soft delete tables have the same fields that the originals3560 soft deleting a repo moves all of the related data to deleted_* tables3562Rake tasks3563 rake db:create3564 migrates the main db3565 rake db:schema:load3566 loads the main schema3568Deprecation Warnings:3570Using `should` from rspec-expectations' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` with `config.expect_with(:rspec) { |c| c.syntax = :should }` instead. Called from /home/travis/build/travis-ci/travis-migrations/spec/soft_delete_repo_spec.rb:118:in `block (2 levels) in <top (required)>'.3573If you need more of the backtrace for any of these deprecations to3574identify where to make the necessary changes, you can configure3575`config.raise_errors_for_deprecations!`, and it will turn the3576deprecation warnings into errors, giving you the full backtrace.35781 deprecation warning total3580Finished in 21.65 seconds (files took 0.36916 seconds to load)358119 examples, 0 failures3583The command "bundle exec rspec spec" exited with 0.3585Structure dump was generated using a PostgreSQL 10 or later.3586It's incompatible with 9.6 which we use in production. Please revert the3587structure.sql file changes and regenerate the file using earlier PostgreSQL3588version.3589The command "script/validate_structure_file.rb db/main/structure-original.sql" exited with 1.cache.23590store build cache3592uploading PR.285/cache--linux-xenial-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855--rvm-3.2.2--gemfile-Gemfile.tgz3593cache uploaded3596Done. Your build exited with 1.