Pull request event #3632 passed

  • Ran for
  • New branch build
AMD64
Ruby: 3.2.2
Git
Raw log
Scroll to End of Log
0.00s0.22s0.12s0.06s
worker_info
1Worker information
2hostname: 5e645f1b-b371-4055-baa7-0309fe6c423b@1.worker-n2-com-696d86f5d9-8n8g2.gce-production-1
3version: v6.2.24-6-g098ca78 https://github.com/travis-ci/worker/tree/098ca78612c4c91c488169d6a2c94fbeee1fb89d
4instance: travis-job-5e2368e5-6dd6-4674-9714-800d4aede431 travis-ci-sardonyx-xenial-1718996396-f7597f3c (via amqp)
5startup: 6.203840416s
60.16s0.00s0.01s0.00s0.01s
system_info
7Build system information
8Build language: ruby
9Build dist: xenial
10Build id: 271591707
11Job id: 624438439
12Runtime kernel version: 4.15.0-1098-gcp
13travis-build version: a002bad0
14Build image provisioning date and time
15Fri Jun 21 19:33:06 UTC 2024
16Operating System Details
17Distributor ID: Ubuntu
18Description: Ubuntu 16.04.7 LTS
19Release: 16.04
20Codename: xenial
21Systemd Version
22systemd 229
23Cookbooks Version
2488b04db https://github.com/travis-ci/travis-cookbooks/tree/88b04db
25git version
26git version 2.43.0
27bash version
28GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)
29gcc version
30gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
31docker version
32Client: Docker Engine - Community
33 Version: 20.10.7
34 API version: 1.41
35 Go version: go1.13.15
36 Git commit: f0df350
37 Built: Wed Jun 2 11:56:47 2021
38 OS/Arch: linux/amd64
39 Context: default
40 Experimental: true
42Server: Docker Engine - Community
43 Engine:
44 Version: 20.10.7
45 API version: 1.41 (minimum version 1.12)
46 Go version: go1.13.15
47 Git commit: b0f5bc3
48 Built: Wed Jun 2 11:54:58 2021
49 OS/Arch: linux/amd64
50 Experimental: false
51 containerd:
52 Version: 1.4.6
53 GitCommit: d71fcd7d8303cbf684402823e425e9dd2e99285d
54 runc:
55 Version: 1.0.0-rc95
56 GitCommit: b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7
57 docker-init:
58 Version: 0.19.0
59 GitCommit: de40ad0
60clang version
61clang version 7.0.0 (tags/RELEASE_700/final)
62jq version
63jq-1.7.1
64bats version
65Bats 1.11.0
66shellcheck version
670.10.0
68shfmt version
69v3.8.0
70ccache version
713.2.4
72cmake version
73cmake version 3.26.3
74heroku version
75heroku/8.11.5 linux-x64 node-v16.20.2
76imagemagick version
77Version: ImageMagick 6.8.9-9 Q16 x86_64 2020-12-04 http://www.imagemagick.org
78md5deep version
794.4
80mercurial version
81version 5.9.3
82mysql version
83mysql Ver 14.14 Distrib 5.7.33, for Linux (x86_64) using EditLine wrapper
84openssl version
85OpenSSL 1.0.2g 1 Mar 2016
86packer version
871.7.5
88postgresql client version
89psql (PostgreSQL) 10.17 (Ubuntu 10.17-1.pgdg16.04+1)
90ragel version
91Ragel State Machine Compiler version 6.8 Feb 2013
92sudo version
931.8.16
94gzip version
95gzip 1.6
96zip version
97Zip 3.0
98vim version
99VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Oct 13 2020 16:04:38)
100iptables version
101iptables v1.6.0
102curl version
103curl 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.3
104wget version
105GNU Wget 1.17.1 built on linux-gnu.
106rsync version
107rsync version 3.1.1 protocol version 31
108gimme version
109v1.5.4
110nvm version
1110.39.7
112perlbrew version
113/home/travis/perl5/perlbrew/bin/perlbrew - App::perlbrew/0.95
114phpenv version
115rbenv 1.2.0
116rvm version
117rvm 1.29.12 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
118default ruby version
119ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux]
120default python version
121Python 3.7.17
122CouchDB version
123couchdb 1.6.1
124ElasticSearch version
1257.16.3
126Installed Firefox version
127firefox 63.0.1
128MongoDB version
129MongoDB 4.4.29
130PhantomJS version
1312.1.1
132Pre-installed PostgreSQL versions
1339.4.26
1349.5.25
1359.6.22
136Redis version
137redis-server 7.0.11
138Pre-installed Go versions
1391.18.4
140ant version
141Apache Ant(TM) version 1.9.6 compiled on July 20 2018
142mvn version
143Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9)
144gradle version
145Gradle 8.3!
146lein version
147Leiningen 2.11.2 on Java 11.0.21 OpenJDK 64-Bit Server VM
148Pre-installed Node.js versions
149v10.24.1
150v12.22.12
151v14.21.3
152v16.15
153v16.16.0
154v16.20.2
155v18.20.3
156v20.15.0
157v4.9.1
158v6.17.1
159v8.17.0
160phpenv versions
161 system
162 7.4
163* 7.4.30 (set by /home/travis/.phpenv/version)
164 hhvm-stable
165 hhvm
166composer --version
167Composer version 2.3.7 2022-06-06 16:43:28
168Pre-installed Ruby versions
169ruby-2.7.6
170ruby-3.3.0
1720.01s0.01s33.35sTimeout waiting for network availability.
1730.18s0.05s0.00s0.04s0.00s0.03s0.01s0.01s0.01s0.01s0.00s0.30sOK
1740.00s0.02s0.00s0.01s0.27s0.00s0.00s0.00s0.01s0.00s0.09s0.00s0.87s0.00s0.11s6.03s0.00s3.49s0.00s2.42s
docker_mtu_and_registry_mirrors
resolvconf
snap
175Installing 1 Snaps
1767.72s$ sudo snap install core
1772024-07-25T08:55:53Z INFO Waiting for automatic snapd restart...
178core 16-2.61.4-20240607 from Canonical* installed
17916.24s$ sudo snap install docker --channel=latest/beta
180docker (beta) 24.0.5 from Canonical** installed
1810.06s$ sudo snap list
182Name Version Rev Tracking Publisher Notes
183core 16-2.61.4-20240607 17200 latest/stable canonical** core
184core22 20240408 1380 latest/stable canonical** base
185docker 24.0.5 2932 latest/beta canonical** -
services
1886.07s$ travis_setup_postgresql
189Starting PostgreSQL v9.6
190sudo systemctl start postgresql@9.6-main
git.checkout
1910.01s0.64s$ git clone --depth=50 https://github.com/travis-ci/travis-migrations.git travis-ci/travis-migrations
192Cloning into 'travis-ci/travis-migrations'...
193$ cd travis-ci/travis-migrations
1940.36s$ git fetch origin +refs/pull/294/merge: --depth=50
195From https://github.com/travis-ci/travis-migrations
196 * branch refs/pull/294/merge -> FETCH_HEAD
197$ git checkout -qf FETCH_HEAD
1990.01s
200Setting environment variables from repository settings
201$ export QUAY_ROBOT_HANDLE=[secure]
202$ export QUAY_ROBOT_TOKEN=[secure]
203$ export ARTIFACTS_BUCKET=travis-migrations-structure-dumps
204$ export ARTIFACTS_SECRET=[secure]
205$ export ARTIFACTS_KEY=[secure]
rvm
2073.48s$ rvm get head
208Downloading https://get.rvm.io
209Downloading https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer.asc
210Verifying /home/travis/.rvm/archives/rvm-installer.asc
211gpg: Signature made Tue 21 Feb 2023 11:35:16 PM UTC using RSA key ID 39499BDB
212gpg: Good signature from "Piotr Kuczynski <piotr.kuczynski@gmail.com>" [unknown]
213gpg: WARNING: This key is not certified with a trusted signature!
214gpg: There is no indication that the signature belongs to the owner.
215Primary key fingerprint: 7D2B AF1C F37B 13E2 069D 6956 105B D0E7 3949 9BDB
216GPG verified '/home/travis/.rvm/archives/rvm-installer'
217Downloading https://github.com/rvm/rvm/archive/master.tar.gz
218Upgrading the RVM installation in /home/travis/.rvm/
219 RVM PATH line found in /home/travis/.mkshrc /home/travis/.profile /home/travis/.zshrc.
220 RVM PATH line not found for Bash, rerun this command with '--auto-dotfiles' flag to fix it.
221 RVM sourcing line found in /home/travis/.profile /home/travis/.bashrc /home/travis/.zlogin.
222Upgrade of RVM in /home/travis/.rvm/ is complete.
224<warn>Thanks for installing RVM 🙏</warn>
225Please consider donating to our open collective to help us maintain RVM.
227👉 Donate: <code>https://opencollective.com/rvm/donate</code>
230RVM reloaded!
23121.44s$ rvm use 3.2.2 --install --binary --fuzzy
232curl: (22) The requested URL returned error: 404 Not Found
233Required ruby-3.2.2 is not installed - installing.
234curl: (22) The requested URL returned error: 404 Not Found
235Searching for binary rubies, this might take some time.
236Found remote file https://rubies.travis-ci.org/ubuntu/16.04/x86_64/ruby-3.2.2.tar.bz2
237Checking requirements for ubuntu.
238requirements_ubuntu_define_libncurses: command not found
239Requirements installation successful.
240ruby-3.2.2 - #configure
241ruby-3.2.2 - #download
242 % Total % Received % Xferd Average Speed Time Time Time Current
243 Dload Upload Total Spent Left Speed
244 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
245100 27.6M 100 27.6M 0 0 29.2M 0 --:--:-- --:--:-- --:--:-- 67.5M
246No checksum for downloaded archive, recording checksum in user configuration.
247ruby-3.2.2 - #validate archive
248ruby-3.2.2 - #extract
249ruby-3.2.2 - #validate binary
250ruby-3.2.2 - #setup
251ruby-3.2.2 - #gemset created /home/travis/.rvm/gems/ruby-3.2.2@global
252ruby-3.2.2 - #importing gemset /home/travis/.rvm/gemsets/global.gems..................................
253ruby-3.2.2 - #generating global wrappers........
254ruby-3.2.2 - #uninstalling gem rubygems-bundler-1.4.5.
255ruby-3.2.2 - #gemset created /home/travis/.rvm/gems/ruby-3.2.2
256ruby-3.2.2 - #importing gemset /home/travis/.rvm/gemsets/default.gems..............
257ruby-3.2.2 - #generating default wrappers........
258Using /home/travis/.rvm/gems/ruby-3.2.2
260$ export BUNDLE_GEMFILE=$PWD/Gemfile
cache.1
261Setting up build cache
262$ export CASHER_DIR=${TRAVIS_HOME}/.casher
2630.34s$ Installing caching utilities
2640.00s1.99sattempting to download cache archive
265fetching PR.294/cache--linux-xenial-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855--rvm-3.2.2--gemfile-Gemfile.tgz
266fetching PR.294/cache-linux-xenial-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855--rvm-3.2.2--gemfile-Gemfile.tgz
267fetching PR.294/cache--rvm-3.2.2--gemfile-Gemfile.tgz
268fetching master/cache--linux-xenial-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855--rvm-3.2.2--gemfile-Gemfile.tgz
269found cache
2700.00s1.94sadding /home/travis/build/travis-ci/travis-migrations/vendor/bundle to cache
271creating directory /home/travis/build/travis-ci/travis-migrations/vendor/bundle
ruby.versions
274$ ruby --version
275ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
276$ rvm --version
277rvm 1.29.12-next (master) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
278$ bundle --version
279Bundler version 2.4.10
280$ gem --version
2813.4.10
before_install
2830.82s$ gem install rubygems-update -v 3.3.27
284Successfully installed rubygems-update-3.3.27
2851 gem installed
install.bundler
2861.67s$ bundle install --jobs=3 --retry=3 --deployment
287[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 flag
288Bundler 2.4.10 is running, but your lockfile was generated with 2.4.14. Installing Bundler 2.4.14 and restarting using that version.
289Fetching gem metadata from https://rubygems.org/.
290Fetching bundler 2.4.14
291Installing bundler 2.4.14
292[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 flag
293Using rake 13.0.6
294Using concurrent-ruby 1.2.2
295Using i18n 1.14.1
296Using minitest 5.18.1
297Using tzinfo 2.0.6
298Using activesupport 7.0.6
299Using builder 3.2.4
300Using erubi 1.12.0
301Using racc 1.7.1
302Using nokogiri 1.15.2 (x86_64-linux)
303Using rails-dom-testing 2.1.1
304Using crass 1.0.6
305Using loofah 2.21.3
306Using rails-html-sanitizer 1.6.0
307Using actionview 7.0.6
308Using rack 2.2.7
309Using rack-test 2.1.0
310Using actionpack 7.0.6
311Using nio4r 2.5.9
312Using websocket-extensions 0.1.5
313Using websocket-driver 0.7.5
314Using actioncable 7.0.6
315Using globalid 1.1.0
316Using activejob 7.0.6
317Using activemodel 7.0.6
318Using activerecord 7.0.6
319Using marcel 1.0.2
320Using mini_mime 1.1.2
321Using activestorage 7.0.6
322Using date 3.3.3
323Using timeout 0.4.0
324Using net-protocol 0.2.1
325Using net-imap 0.3.6
326Using net-pop 0.1.2
327Using net-smtp 0.3.3
328Using mail 2.8.1
329Using actionmailbox 7.0.6
330Using actionmailer 7.0.6
331Using actiontext 7.0.6
332Using ansi 1.5.0
333Using ast 2.4.2
334Using aws-eventstream 1.2.0
335Using aws-partitions 1.783.0
336Using aws-sigv4 1.6.0
337Using jmespath 1.6.2
338Using aws-sdk-core 3.176.1
339Using aws-sdk-kms 1.68.0
340Using aws-sdk-s3 1.127.0
341Using bundler 2.4.14
342Using colored 1.2
343Using diff-lcs 1.5.0
344Using docile 1.4.0
345Using json 2.6.3
346Using language_server-protocol 3.17.0.3
347Using method_source 1.0.0
348Using parallel 1.23.0
349Using parser 3.2.2.3
350Using pg 1.5.3
351Using thor 1.2.2
352Using zeitwerk 2.6.8
353Using railties 7.0.6
354Using rails 7.0.6
355Using rainbow 3.1.1
356Using rake-notes 0.2.2
357Using regexp_parser 2.8.1
358Using rexml 3.2.5
359Using routes 0.2.0
360Using rspec-support 3.12.1
361Using rspec-core 3.12.2
362Using rspec-expectations 3.12.3
363Using rspec-mocks 3.12.5
364Using rspec 3.12.0
365Using rubocop-ast 1.29.0
366Using ruby-progressbar 1.13.0
367Using unicode-display_width 2.4.2
368Using rubocop 1.54.1
369Using rubocop-capybara 2.18.0
370Using rubocop-factory_bot 2.23.1
371Using rubocop-performance 1.18.0
372Using rubocop-rspec 2.22.0
373Using simplecov-html 0.12.3
374Using simplecov_json_formatter 0.1.4
375Using simplecov 0.22.0
376Using terminal-table 3.0.2
377Using simplecov-console 0.9.1
378Bundle complete! 12 Gemfile dependencies, 85 gems now installed.
379Bundled gems are installed into `./vendor/bundle`
before_script.1
3810.00s$ cp db/main/structure.sql db/main/structure-original.sql
before_script.2
3820.01s$ cp config/database.yml.travis config/database.yml
38323.44s$ bundle exec rspec spec
385Repo counts
386 before aggregation
387 after aggregating per repo
388 after aggregating all counts
389 does not raise if repos are missing
390 does not raise if builds are deleted before stages
392set_updated_at trigger
393Dropped database 'travis_test'
394Created database 'travis_test'
395== 201207261749 CreatePlans: migrating ========================================
396-- create_table(:plans, {:id=>:integer})
397 -> 0.0024s
398== 201207261749 CreatePlans: migrated (0.0025s) ===============================
400== 20101126174706 CreateRepositories: migrating ===============================
401-- create_table(:repositories, {:id=>:integer})
402 -> 0.0020s
403== 20101126174706 CreateRepositories: migrated (0.0021s) ======================
405== 20101126174715 CreateBuilds: migrating =====================================
406-- create_table(:builds, {:id=>:integer})
407 -> 0.0030s
408== 20101126174715 CreateBuilds: migrated (0.0031s) ============================
410== 20110109130532 DeviseCreateUsers: migrating ================================
411-- create_table(:users, {:id=>:integer})
412 -> 0.0018s
413-- add_index(:users, :login, {:unique=>true})
414 -> 0.0007s
415== 20110109130532 DeviseCreateUsers: migrated (0.0027s) =======================
417== 20110116155100 RepositoriesAddUsername: migrating ==========================
418-- change_table(:repositories)
419 -> 0.0008s
420== 20110116155100 RepositoriesAddUsername: migrated (0.0008s) =================
422== 20110130102621 CreateTokens: migrating =====================================
423-- create_table(:tokens, {:id=>:integer})
424 -> 0.0019s
425== 20110130102621 CreateTokens: migrated (0.0022s) ============================
427== 20110301071656 AddBuildParentIdAndConfiguration: migrating =================
428-- change_table(:builds)
429 -> 0.0011s
430-- change_column(:builds, :number, :string)
431 -> 0.0018s
432-- add_index(:builds, :repository_id)
433 -> 0.0005s
434-- add_index(:builds, :parent_id)
435 -> 0.0004s
436== 20110301071656 AddBuildParentIdAndConfiguration: migrated (0.0040s) ========
438== 20110316174721 RepositoriesDenormalizeLastBuildAttributes: migrating =======
439-- change_table(:repositories)
440 -> 0.0020s
441== 20110316174721 RepositoriesDenormalizeLastBuildAttributes: migrated (0.0020s)
443== 20110321075539 RepositoriesAddOwnerNameAndOwnerEmail: migrating ============
444-- change_table(:repositories)
445 -> 0.0016s
446-- remove_column(:repositories, :username)
447 -> 0.0004s
448== 20110321075539 RepositoriesAddOwnerNameAndOwnerEmail: migrated (0.0020s) ===
450== 20110411171936 CreateHistoriesTable: migrating =============================
451-- create_table(:histories, {:id=>:integer})
452 -> 0.0020s
453-- add_index(:histories, [:item, :table, :month, :year])
454 -> 0.0007s
455== 20110411171936 CreateHistoriesTable: migrated (0.0027s) ====================
457== 20110411171937 RenameHistoriesToRailsAdminHistories: migrating =============
458-- remove_index(:histories, nil, {:name=>:index_histories_on_item_and_table_and_month_and_year})
459 -> 0.0004s
460-- rename_table(:histories, :rails_admin_histories)
461 -> 0.0033s
462-- add_index("rails_admin_histories", ["item", "table", "month", "year"], {:name=>"index_histories_on_item_and_table_and_month_and_year"})
463 -> 0.0006s
464== 20110411171937 RenameHistoriesToRailsAdminHistories: migrated (0.0055s) ====
466== 20110411172518 AddAdminFlagToUser: migrating ===============================
467-- change_table(:users)
468 -> 0.0022s
469== 20110411172518 AddAdminFlagToUser: migrated (0.0023s) ======================
471== 20110413101057 BuildsAddRef: migrating =====================================
472-- change_table(:builds)
473 -> 0.0010s
474== 20110413101057 BuildsAddRef: migrated (0.0011s) ============================
476== 20110414131100 BuildsAddGithubPayload: migrating ===========================
477-- change_table(:builds)
478 -> 0.0006s
479== 20110414131100 BuildsAddGithubPayload: migrated (0.0007s) ==================
481== 20110503150504 AddGithubIdToUsersTable: migrating ==========================
482-- add_column(:users, :github_id, :integer)
483 -> 0.0006s
484-- add_index(:users, :github_id)
485 -> 0.0005s
486== 20110503150504 AddGithubIdToUsersTable: migrated (0.0012s) =================
488== 20110523012243 RepositoriesChangeOwnerEmailType: migrating =================
489-- change_column(:repositories, :owner_email, :text)
490 -> 0.0006s
491== 20110523012243 RepositoriesChangeOwnerEmailType: migrated (0.0007s) ========
493== 20110611203537 AddGithubOauthTokenToUser: migrating ========================
494-- add_column(:users, :github_oauth_token, :string)
495 -> 0.0006s
496-- add_index(:users, :github_oauth_token)
497 -> 0.0005s
498== 20110611203537 AddGithubOauthTokenToUser: migrated (0.0012s) ===============
500== 20110613210252 AddCompareUrlToBuild: migrating =============================
501-- add_column(:builds, :compare_url, :string)
502 -> 0.0006s
503== 20110613210252 AddCompareUrlToBuild: migrated (0.0007s) ====================
505== 20110615152003 BuildsRemoveJobId: migrating ================================
506-- change_table(:builds)
507 -> 0.0006s
508== 20110615152003 BuildsRemoveJobId: migrated (0.0006s) =======================
510== 20110616211744 BuildRemoveLastBuiltAt: migrating ===========================
511-- change_table(:repositories)
512 -> 0.0006s
513== 20110616211744 BuildRemoveLastBuiltAt: migrated (0.0006s) ==================
515== 20110617114728 AddMissingIndexes: migrating ================================
516-- add_index(:repositories, :last_build_started_at)
517 -> 0.0008s
518-- add_index(:repositories, [:owner_name, :name])
519 -> 0.0005s
520-- add_index(:builds, [:repository_id, :parent_id, :started_at])
521 -> 0.0005s
522== 20110617114728 AddMissingIndexes: migrated (0.0019s) =======================
524== 20110619100906 AddActiveToRepositories: migrating ==========================
525-- add_column(:repositories, :is_active, :boolean)
526 -> 0.0007s
527== 20110619100906 AddActiveToRepositories: migrated (0.0007s) =================
529== 20110729094426 StoreTokenInBuild: migrating ================================
530-- add_column(:builds, :token, :string)
531 -> 0.0006s
532== 20110729094426 StoreTokenInBuild: migrated (0.0006s) =======================
534== 20110801161819 CreateRequestsCommitsAndTasks: migrating ====================
535-- change_table(:builds)
536 -> 0.0014s
537-- create_table(:commits, {:force=>true, :id=>:integer})
538 -> 0.0019s
539-- create_table(:requests, {:force=>true, :id=>:integer})
540 -> 0.0020s
541-- create_table(:tasks, {:force=>true, :id=>:integer})
542 -> 0.0024s
543-- add_index(:commits, :commit)
544 -> 0.0005s
545-- add_index(:builds, :commit)
546 -> 0.0005s
547-- add_index(:requests, :commit)
548 -> 0.0005s
549-- add_index(:tasks, :commit)
550 -> 0.0005s
551-- execute("UPDATE requests SET commit_id = (SELECT commits.id FROM commits WHERE commits.commit = requests.commit LIMIT 1)")
552 -> 0.0006s
553-- execute("UPDATE tasks SET commit_id = (SELECT commits.id FROM commits WHERE commits.commit = tasks.commit LIMIT 1)")
554 -> 0.0004s
555-- execute("DELETE FROM builds WHERE parent_id IS NOT NULL")
556 -> 0.0004s
557-- execute("UPDATE builds SET request_id = (SELECT requests.id FROM requests WHERE requests.commit = builds.commit LIMIT 1)")
558 -> 0.0003s
559-- execute("UPDATE builds SET commit_id = (SELECT commits.id FROM commits WHERE commits.commit = builds.commit LIMIT 1)")
560 -> 0.0003s
561-- execute("CREATE SEQUENCE shared_builds_tasks_seq CACHE 30")
562 -> 0.0005s
563-- execute("ALTER TABLE builds ALTER COLUMN id TYPE BIGINT")
564 -> 0.0024s
565-- execute("ALTER TABLE builds ALTER COLUMN id SET DEFAULT nextval('shared_builds_tasks_seq')")
566 -> 0.0004s
567-- execute("ALTER TABLE tasks ALTER COLUMN id TYPE BIGINT")
568 -> 0.0019s
569-- execute("ALTER TABLE tasks ALTER COLUMN id SET DEFAULT nextval('shared_builds_tasks_seq')")
570 -> 0.0004s
571-- select_value("SELECT max(id) FROM commits")
572 -> 0.0005s
573-- execute("SELECT setval('commits_id_seq', 1)")
574 -> 0.0003s
575-- select_value("SELECT max(id) FROM requests")
576 -> 0.0003s
577-- execute("SELECT setval('requests_id_seq', 1)")
578 -> 0.0002s
579-- select_value("SELECT max(id) FROM tasks")
580 -> 0.0004s
581-- execute("SELECT setval('tasks_id_seq', 1)")
582 -> 0.0002s
583-- remove_column(:builds, :parent_id)
584 -> 0.0005s
585-- remove_column(:builds, :commit)
586 -> 0.0003s
587-- remove_column(:requests, :commit)
588 -> 0.0004s
589-- remove_column(:tasks, :commit)
590 -> 0.0003s
591== 20110801161819 CreateRequestsCommitsAndTasks: migrated (0.0216s) ===========
593== 20110805030147 RepositoryRenameIsActiveToActive: migrating =================
594-- rename_column(:repositories, :is_active, :active)
595 -> 0.0183s
596== 20110805030147 RepositoryRenameIsActiveToActive: migrated (0.0184s) ========
598== 20110819232908 TasksAddTags: migrating =====================================
599-- add_column(:tasks, :tags, :text)
600 -> 0.0008s
601== 20110819232908 TasksAddTags: migrated (0.0009s) ============================
603== 20110911204538 CacheOneNumberForSharedBuildsTasksSequence: migrating =======
604-- execute("ALTER SEQUENCE shared_builds_tasks_seq CACHE 1 NO MAXVALUE NO CYCLE")
605 -> 0.0005s
606== 20110911204538 CacheOneNumberForSharedBuildsTasksSequence: migrated (0.0006s)
608== 20111107134436 RenameTasksToJobs: migrating ================================
609-- rename_table(:tasks, :jobs)
610 -> 0.0033s
611-- execute("UPDATE jobs SET type = 'Job::Test' WHERE type = 'Task::Test'")
612 -> 0.0005s
613-- execute("UPDATE jobs SET type = 'Job::Configure' WHERE type = 'Task::Configure'")
614 -> 0.0003s
615== 20111107134436 RenameTasksToJobs: migrated (0.0042s) =======================
617== 20111107134437 CreateArtifacts: migrating ==================================
618-- create_table(:artifacts, {:id=>:integer})
619 -> 0.0021s
620-- execute("UPDATE artifacts SET job_id = id")
621 -> 0.0004s
622-- execute("select setval('artifacts_id_seq', (select max(id) + 1 from artifacts));")
623 -> 0.0005s
624-- add_index(:artifacts, [:type, :job_id])
625 -> 0.0007s
626== 20111107134437 CreateArtifacts: migrated (0.0038s) =========================
628== 20111107134438 CreateWorkers: migrating ====================================
629-- create_table(:workers, {:id=>:integer})
630 -> 0.0043s
631-- add_index(:workers, [:name, :host])
632 -> 0.0008s
633== 20111107134438 CreateWorkers: migrated (0.0053s) ===========================
635== 20111107134439 JobsAddRetries: migrating ===================================
636-- change_table(:jobs)
637 -> 0.0034s
638== 20111107134439 JobsAddRetries: migrated (0.0034s) ==========================
640== 20111107134440 RemoveRailsAdmin: migrating =================================
641-- drop_table(:rails_admin_histories)
642 -> 0.0016s
643== 20111107134440 RemoveRailsAdmin: migrated (0.0016s) ========================
645== 20111128235043 AddIndexesToJobs: migrating =================================
646-- add_index(:jobs, [:queue, :state])
647 -> 0.0013s
648== 20111128235043 AddIndexesToJobs: migrated (0.0013s) ========================
650== 20111129014329 AddRepositoryIdIndexToJobs: migrating =======================
651-- add_index(:jobs, :repository_id)
652 -> 0.0026s
653== 20111129014329 AddRepositoryIdIndexToJobs: migrated (0.0027s) ==============
655== 20111129022625 AddOwnerAndTypeIndexToJobs: migrating =======================
656-- add_index(:jobs, [:type, :owner_id, :owner_type])
657 -> 0.0030s
658== 20111129022625 AddOwnerAndTypeIndexToJobs: migrated (0.0031s) ==============
660== 20111201113500 WorkersAddPayloadAndLastError: migrating ====================
661-- change_table(:workers)
662 -> 0.0026s
663== 20111201113500 WorkersAddPayloadAndLastError: migrated (0.0027s) ===========
665== 20111203002341 RepositoriesAddDescriptionAndLastLanguage: migrating ========
666-- change_table(:repositories)
667 -> 0.0036s
668-- change_table(:builds)
669 -> 0.0012s
670== 20111203002341 RepositoriesAddDescriptionAndLastLanguage: migrated (0.0049s)
672== 20111203221720 BuildsAddArchivedAt: migrating ==============================
673-- change_table(:builds)
674 -> 0.0018s
675== 20111203221720 BuildsAddArchivedAt: migrated (0.0018s) =====================
677== 20111207093700 MimicProductionDb: migrating ================================
678-- column_exists?(:users, :oauth2_uid, :integer)
679 -> 0.0035s
680-- column_exists?(:users, :oauth2_token, :string)
681 -> 0.0029s
682-- column_exists?(:repositories, :user_id, :integer)
683 -> 0.0035s
684== 20111207093700 MimicProductionDb: migrated (0.0100s) =======================
686== 20111212103859 BuildsAddDuration: migrating ================================
687-- change_table(:builds)
688 -> 0.0007s
689== 20111212103859 BuildsAddDuration: migrated (0.0008s) =======================
691== 20111212112411 RepositoriesAddLastBuildDuration: migrating =================
692-- change_table(:repositories)
693 -> 0.0006s
694== 20111212112411 RepositoriesAddLastBuildDuration: migrated (0.0007s) ========
696== 20111214173922 CreateSslKeys: migrating ====================================
697-- create_table(:ssl_keys, {:id=>:integer})
698 -> 0.0020s
699-- add_index("ssl_keys", ["repository_id"], {:name=>"index_ssl_key_on_repository_id"})
700 -> 0.0005s
701== 20111214173922 CreateSslKeys: migrated (0.0026s) ===========================
703== 20120114125404 AddAllowFailureToJobs: migrating ============================
704-- add_column(:jobs, :allow_failure, :boolean, {:default=>false})
705 -> 0.0025s
706== 20120114125404 AddAllowFailureToJobs: migrated (0.0025s) ===================
708== 20120216133223 AddPullRequestFieldsToRequest: migrating ====================
709-- add_column(:requests, :event_type, :string)
710 -> 0.0006s
711-- add_column(:requests, :comments_url, :string)
712 -> 0.0003s
713-- add_column(:requests, :base_commit, :string)
714 -> 0.0003s
715-- add_column(:requests, :head_commit, :string)
716 -> 0.0003s
717== 20120216133223 AddPullRequestFieldsToRequest: migrated (0.0018s) ===========
719== 20120222082522 AddGravatarIdToUsers: migrating =============================
720-- add_column(:users, :gravatar_id, :string)
721 -> 0.0006s
722== 20120222082522 AddGravatarIdToUsers: migrated (0.0006s) ====================
724== 20120301131209 OrganizationsCreate: migrating ==============================
725-- create_table(:organizations, {:id=>:integer})
726 -> 0.0018s
727== 20120301131209 OrganizationsCreate: migrated (0.0019s) =====================
729== 20120304000502 JobsRenameOwnerToSource: migrating ==========================
730-- change_table(:jobs)
731 -> 0.0054s
732== 20120304000502 JobsRenameOwnerToSource: migrated (0.0055s) =================
734== 20120304000503 RepositoriesAddOwner: migrating =============================
735-- change_table(:repositories)
736 -> 0.0010s
737== 20120304000503 RepositoriesAddOwner: migrated (0.0010s) ====================
739== 20120304000504 BuildsAddOwner: migrating ===================================
740-- change_table(:builds)
741 -> 0.0009s
742== 20120304000504 BuildsAddOwner: migrated (0.0010s) ==========================
744== 20120304000505 JobsAddOwner: migrating =====================================
745-- change_table(:jobs)
746 -> 0.0010s
747== 20120304000505 JobsAddOwner: migrated (0.0010s) ============================
749== 20120304000506 RequestsAddOwner: migrating =================================
750-- change_table(:requests)
751 -> 0.0010s
752== 20120304000506 RequestsAddOwner: migrated (0.0010s) ========================
754== 20120311234933 AddLocaleToUser: migrating ==================================
755-- add_column(:users, :locale, :string)
756 -> 0.0006s
757== 20120311234933 AddLocaleToUser: migrated (0.0006s) =========================
759== 20120316123726 CreateMemberships: migrating ================================
760-- create_table(:memberships, {:id=>:integer})
761 -> 0.0015s
762== 20120316123726 CreateMemberships: migrated (0.0015s) =======================
764== 20120319170001 RepositoriesAddPrivate: migrating ===========================
765-- change_table(:repositories)
766 -> 0.0025s
767== 20120319170001 RepositoriesAddPrivate: migrated (0.0026s) ==================
769== 20120324104051 CreateUrls: migrating =======================================
770-- create_table(:urls, {:id=>:integer})
771 -> 0.0018s
772== 20120324104051 CreateUrls: migrated (0.0019s) ==============================
774== 20120505165100 CopyStatusToResult: migrating ===============================
775-- add_column(:builds, :result, :integer)
776 -> 0.0006s
777-- add_column(:jobs, :result, :integer)
778 -> 0.0004s
779-- add_column(:repositories, :last_build_result, :integer)
780 -> 0.0004s
781Executing: UPDATE builds SET result = status;
782Executing: UPDATE jobs SET result = status;
783Executing: UPDATE repositories SET last_build_result = last_build_status;
784== 20120505165100 CopyStatusToResult: migrated (0.0026s) ======================
786== 20120511171900 RequestsAddIndexOnHeadCommit: migrating =====================
787-- add_index(:requests, :head_commit)
788 -> 0.0007s
789== 20120511171900 RequestsAddIndexOnHeadCommit: migrated (0.0008s) ============
791== 20120521174400 CreatePermissions: migrating ================================
792-- create_table(:permissions, {:id=>:integer})
793 -> 0.0104s
794-- add_index(:permissions, :user_id)
795 -> 0.0011s
796-- add_index(:permissions, :repository_id)
797 -> 0.0007s
798== 20120521174400 CreatePermissions: migrated (0.0124s) =======================
800== 20120527235800 BuildsAddPreviousResult: migrating ==========================
801-- change_table(:builds)
802 -> 0.0019s
803== 20120527235800 BuildsAddPreviousResult: migrated (0.0019s) =================
805== 20120702111126 CreateSubscriptions: migrating ==============================
806-- create_table(:subscriptions, {:id=>:integer})
807 -> 0.0053s
808== 20120702111126 CreateSubscriptions: migrated (0.0054s) =====================
810== 20120703114226 AddBillingEmailCreditCardDataToSubscriptions: migrating =====
811-- change_table(:subscriptions)
812 -> 0.0041s
813== 20120703114226 AddBillingEmailCreditCardDataToSubscriptions: migrated (0.0041s)
815== 20120713140816 AddSyncInfoToUser: migrating ================================
816-- add_column(:users, :in_sync, :boolean)
817 -> 0.0016s
818-- add_column(:users, :synced_at, :timestamp)
819 -> 0.0009s
820== 20120713140816 AddSyncInfoToUser: migrated (0.0026s) =======================
822== 20120713153215 RenameInSyncToIsSyncing: migrating ==========================
823-- rename_column(:users, :in_sync, :is_syncing)
824 -> 0.0049s
825== 20120713153215 RenameInSyncToIsSyncing: migrated (0.0049s) =================
827== 20120725005300 AddQueueToWorkers: migrating ================================
828-- add_column(:workers, :queue, :string)
829 -> 0.0017s
830== 20120725005300 AddQueueToWorkers: migrated (0.0018s) =======================
832== 20120727151900 AddJobsIndexOnStateOwnerTypeOwnerId: migrating ==============
833-- add_index(:jobs, ["state", "owner_id", "owner_type"], {:name=>"index_jobs_on_state_owner_type_owner_id"})
834 -> 0.0021s
835== 20120727151900 AddJobsIndexOnStateOwnerTypeOwnerId: migrated (0.0021s) =====
837== 20120731005301 AddQueuedAtToJobs: migrating ================================
838-- add_column(:jobs, :queued_at, :timestamp, {:precision=>nil})
839 -> 0.0018s
840== 20120731005301 AddQueuedAtToJobs: migrated (0.0018s) =======================
842== 20120731074000 AddAmountToPlans: migrating =================================
843-- change_table(:plans)
844 -> 0.0017s
845== 20120731074000 AddAmountToPlans: migrated (0.0018s) ========================
847== 20120802001001 AddPushAndPullToPermissions: migrating ======================
848-- add_column(:permissions, :push, :boolean, {:default=>false})
849 -> 0.0034s
850-- add_column(:permissions, :pull, :boolean, {:default=>false})
851 -> 0.0024s
852-- change_column_default(:permissions, :admin, false)
853 -> 0.0033s
854== 20120802001001 AddPushAndPullToPermissions: migrated (0.0092s) =============
856== 20120803164000 CreateInvoices: migrating ===================================
857-- create_table(:invoices, {:id=>:integer})
858 -> 0.0040s
859== 20120803164000 CreateInvoices: migrated (0.0041s) ==========================
861== 20120803182300 AddInvoiceIdToInvoices: migrating ===========================
862-- change_table(:invoices)
863 -> 0.0018s
864== 20120803182300 AddInvoiceIdToInvoices: migrated (0.0019s) ==================
866== 20120804122700 AddStripeInvoiceIdToInvoices: migrating =====================
867-- change_table(:invoices)
868 -> 0.0014s
869-- add_index(:invoices, :stripe_id)
870 -> 0.0005s
871== 20120804122700 AddStripeInvoiceIdToInvoices: migrated (0.0020s) ============
873== 20120806120400 AddPlanToSubscriptions: migrating ===========================
874-- change_table(:subscriptions)
875 -> 0.0006s
876== 20120806120400 AddPlanToSubscriptions: migrated (0.0006s) ==================
878== 20120820164000 RenamePlanOnSubscriptions: migrating ========================
879-- change_table(:subscriptions)
880 -> 0.0013s
881== 20120820164000 RenamePlanOnSubscriptions: migrated (0.0014s) ===============
883== 20120905093300 CreateStripeEvents: migrating ===============================
884-- create_table(:stripe_events, {:id=>:integer})
885 -> 0.0020s
886-- add_index(:stripe_events, :event_type)
887 -> 0.0005s
888-- add_index(:stripe_events, :date)
889 -> 0.0005s
890== 20120905093300 CreateStripeEvents: migrated (0.0030s) ======================
892== 20120905171300 AddEventIdToStripeEvents: migrating =========================
893-- change_table(:stripe_events)
894 -> 0.0006s
895-- add_index(:stripe_events, :event_id)
896 -> 0.0005s
897== 20120905171300 AddEventIdToStripeEvents: migrated (0.0012s) ================
899== 20120911160000 AddBuildsIndexOnRepositoryIdAndState: migrating =============
900-- remove_index("builds", nil, {:column=>"repository_id", :name=>"index_builds_on_repository_id"})
901 -> 0.0017s
902-- add_index("builds", ["repository_id", "state"])
903 -> 0.0006s
904== 20120911160000 AddBuildsIndexOnRepositoryIdAndState: migrated (0.0034s) ====
906== 20120911230000 ArtifactsAddAggregatedAt: migrating =========================
907-- add_column(:artifacts, :aggregated_at, :timestamp, {:precision=>nil})
908 -> 0.0006s
909== 20120911230000 ArtifactsAddAggregatedAt: migrated (0.0007s) ================
911== 20120911230001 AddArtifactParts: migrating =================================
912-- create_table(:artifact_parts, {:id=>:integer})
913 -> 0.0019s
914-- add_index(:artifact_parts, [:artifact_id, :number])
915 -> 0.0005s
916== 20120911230001 AddArtifactParts: migrated (0.0025s) ========================
918== 20120913143800 AddSubscriptionsCoupon: migrating ===========================
919-- change_table(:subscriptions)
920 -> 0.0007s
921== 20120913143800 AddSubscriptionsCoupon: migrated (0.0007s) ==================
923== 20120915012000 BuildsAddIndexOnFinishedAt: migrating =======================
924-- add_index("builds", "finished_at")
925 -> 0.0007s
926== 20120915012000 BuildsAddIndexOnFinishedAt: migrated (0.0007s) ==============
928== 20120915012001 CommitsAddIndexOnBranch: migrating ==========================
929-- add_index("commits", "branch")
930 -> 0.0007s
931== 20120915012001 CommitsAddIndexOnBranch: migrated (0.0007s) =================
933== 20120915150000 JobsAddIndexOnCreatedAt: migrating ==========================
934-- add_index("jobs", "created_at")
935 -> 0.0007s
936== 20120915150000 JobsAddIndexOnCreatedAt: migrated (0.0008s) =================
938== 20121015002500 CreateEvents: migrating =====================================
939-- create_table(:events, {:id=>:integer})
940 -> 0.0019s
941== 20121015002500 CreateEvents: migrated (0.0019s) ============================
943== 20121015002501 RequestsAddResultAndMessage: migrating ======================
944-- add_column(:requests, :result, :string)
945 -> 0.0006s
946-- add_column(:requests, :message, :string)
947 -> 0.0003s
948== 20121015002501 RequestsAddResultAndMessage: migrated (0.0010s) =============
950== 20121017040100 CreateBroadcasts: migrating =================================
951-- create_table(:broadcasts, {:id=>:integer})
952 -> 0.0019s
953== 20121017040100 CreateBroadcasts: migrated (0.0020s) ========================
955== 20121017040200 EventsChangeDataToText: migrating ===========================
956-- change_column(:events, :data, :text)
957 -> 0.0006s
958== 20121017040200 EventsChangeDataToText: migrated (0.0006s) ==================
960== 20121018201301 AddEventTypeToBuilds: migrating =============================
961-- add_column(:builds, :event_type, :string)
962 -> 0.0006s
963== 20121018201301 AddEventTypeToBuilds: migrated (0.0006s) ====================
965== 20121018203728 UpdateEventTypeOnBuilds: migrating ==========================
966-- execute(" UPDATE builds\n SET event_type = requests.event_type\n FROM requests\n WHERE builds.request_id = requests.id\n")
967 -> 0.0008s
968== 20121018203728 UpdateEventTypeOnBuilds: migrated (0.0009s) =================
970== 20121018210156 AddIndexOnRepositoryIdAndEventTypeToBuilds: migrating =======
971-- add_index(:builds, [:repository_id, :event_type])
972 -> 0.0008s
973== 20121018210156 AddIndexOnRepositoryIdAndEventTypeToBuilds: migrated (0.0008s)
975== 20121125122700 RepositoriesAddLastBuildState: migrating ====================
976-- add_column(:repositories, :last_build_state, :string)
977 -> 0.0006s
978== 20121125122700 RepositoriesAddLastBuildState: migrated (0.0006s) ===========
980== 20121125122701 BuildsAddPreviousState: migrating ===========================
981-- add_column(:builds, :previous_state, :string)
982 -> 0.0006s
983== 20121125122701 BuildsAddPreviousState: migrated (0.0007s) ==================
985== 20121222125200 ArtifactPartsAddFinal: migrating ============================
986-- add_column(:artifact_parts, :final, :boolean)
987 -> 0.0032s
988-- add_column(:artifact_parts, :created_at, :timestamp)
989 -> 0.0038s
990== 20121222125200 ArtifactPartsAddFinal: migrated (0.0072s) ===================
992== 20121222125300 ArtifactPartsChangeContentToText: migrating =================
993-- change_column(:artifact_parts, :content, :text)
994 -> 0.0008s
995== 20121222125300 ArtifactPartsChangeContentToText: migrated (0.0009s) ========
997== 20121222140200 ArtifactPartsAddIndexOnArtifactId: migrating ================
998-- add_index(:artifact_parts, :artifact_id)
999 -> 0.0013s
1000== 20121222140200 ArtifactPartsAddIndexOnArtifactId: migrated (0.0013s) =======
1002== 20121223162300 ArtifactPartsRemoveIndexOnArtifactId: migrating =============
1003-- remove_index(:artifact_parts, :artifact_id, {:name=>"index_artifact_parts_on_artifact_id"})
1004 -> 0.0040s
1005== 20121223162300 ArtifactPartsRemoveIndexOnArtifactId: migrated (0.0067s) ====
1007== 20130107165057 AddGithubScopesToUser: migrating ============================
1008-- add_column(:users, :github_scopes, :text)
1009 -> 0.0009s
1010== 20130107165057 AddGithubScopesToUser: migrated (0.0009s) ===================
1012== 20130115125836 AddIndexOnLastSeenAtToWorkers: migrating ====================
1013-- add_index(:workers, :last_seen_at)
1014 -> 0.0025s
1015== 20130115125836 AddIndexOnLastSeenAtToWorkers: migrated (0.0025s) ===========
1017== 20130115145728 CacheFullNameInWorkers: migrating ===========================
1018-- add_column(:workers, :full_name, :string)
1019 -> 0.0027s
1020-- add_index(:workers, :full_name)
1021 -> 0.0007s
1022== 20130115145728 CacheFullNameInWorkers: migrated (0.0035s) ==================
1024== 20130125002600 ArtifactsAddArchivedAt: migrating ===========================
1025-- add_column(:artifacts, :archived_at, :timestamp, {:precision=>nil})
1026 -> 0.0012s
1027-- add_index(:artifacts, :archived_at)
1028 -> 0.0017s
1029== 20130125002600 ArtifactsAddArchivedAt: migrated (0.0030s) ==================
1031== 20130125171100 ArtifactsAddArchivingAndVerified: migrating =================
1032-- add_column(:artifacts, :archiving, :boolean)
1033 -> 0.0025s
1034-- add_column(:artifacts, :archive_verified, :boolean)
1035 -> 0.0005s
1036-- add_index(:artifacts, :archiving)
1037 -> 0.0007s
1038-- add_index(:artifacts, :archive_verified)
1039 -> 0.0012s
1040== 20130125171100 ArtifactsAddArchivingAndVerified: migrated (0.0056s) ========
1042== 20130129142703 CreateEmails: migrating =====================================
1043-- create_table(:emails, {:id=>:integer})
1044 -> 0.0048s
1045-- add_index(:emails, :user_id)
1046 -> 0.0015s
1047-- add_index(:emails, :email)
1048 -> 0.0020s
1049== 20130129142703 CreateEmails: migrated (0.0085s) ============================
1051== 20130208135800 RenameArtifacts: migrating ==================================
1052-- rename_table(:artifacts, :artifacts_backup)
1053 -> 0.0156s
1054-- rename_table(:artifact_parts, :artifact_parts_backup)
1055 -> 0.0035s
1056== 20130208135800 RenameArtifacts: migrated (0.0192s) =========================
1058== 20130208135801 DropArtifacts: migrating ====================================
1059-- drop_table(:artifacts_backup)
1060 -> 0.0012s
1061-- drop_table(:artifact_parts_backup)
1062 -> 0.0007s
1063== 20130208135801 DropArtifacts: migrated (0.0020s) ===========================
1065== 20130306154311 CreatePgcryptoExtension: migrating ==========================
1066-- execute("create extension if not exists pgcrypto")
1067 -> 0.0038s
1068== 20130306154311 CreatePgcryptoExtension: migrated (0.0038s) =================
1070== 20130311211101 AddPullRequestTitleToBuilds: migrating ======================
1071-- add_column(:builds, :pull_request_title, :text)
1072 -> 0.0007s
1073== 20130311211101 AddPullRequestTitleToBuilds: migrated (0.0007s) =============
1075== 20130327100801 AddPullRequestNumberToBuilds: migrating =====================
1076-- add_column(:builds, :pull_request_number, :integer)
1077 -> 0.0007s
1078== 20130327100801 AddPullRequestNumberToBuilds: migrated (0.0007s) ============
1080== 20130418101437 AddIndexToBuildsRequestId: migrating ========================
1081-- execute("CREATE INDEX CONCURRENTLY index_builds_on_request_id ON builds(request_id)")
1082 -> 0.0007s
1083== 20130418101437 AddIndexToBuildsRequestId: migrated (0.0007s) ===============
1085== 20130418103306 AddIndexToJobsOnOwnerIdOwnerTypeAndState: migrating =========
1086-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_owner_id_and_owner_type_and_state ON jobs(owner_id, owner_type, state)")
1087 -> 0.0007s
1088== 20130418103306 AddIndexToJobsOnOwnerIdOwnerTypeAndState: migrated (0.0007s)
1090== 20130505023259 AddMoreIndexesToBuilds: migrating ===========================
1091-- 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")
1092 -> 0.0007s
1093== 20130505023259 AddMoreIndexesToBuilds: migrated (0.0007s) ==================
1095== 20130521115725 AddIndexOnBuildState: migrating =============================
1096-- execute(" CREATE INDEX CONCURRENTLY index_builds_on_state\n ON builds(state);\n")
1097 -> 0.0006s
1098== 20130521115725 AddIndexOnBuildState: migrated (0.0006s) ====================
1100== 20130521133050 UpdateFinishedJobs: migrating ===============================
1101-- execute("UPDATE jobs SET state = 'passed' WHERE state = 'finished' AND result = 0 AND type = 'Job::Test'")
1102 -> 0.0007s
1103-- execute("UPDATE jobs SET state = 'failed' WHERE state = 'finished' AND result = 1 AND type = 'Job::Test'")
1104 -> 0.0003s
1105-- execute("UPDATE jobs SET state = 'errored' WHERE state = 'finished' AND result IS NULL AND type = 'Job::Test'")
1106 -> 0.0003s
1107-- execute("SELECT COUNT(*) FROM jobs WHERE state = 'finished' AND type = 'Job::Test'")
1108 -> 0.0003s
1109== 20130521133050 UpdateFinishedJobs: migrated (0.0018s) ======================
1111== 20130521134224 UpdateFinishedBuilds: migrating =============================
1112-- execute("UPDATE builds SET state = 'passed' WHERE state = 'finished' AND result = 0")
1113 -> 0.0007s
1114-- execute("UPDATE builds SET state = 'failed' WHERE state = 'finished' AND result = 1")
1115 -> 0.0003s
1116-- execute("UPDATE builds SET state = 'errored' WHERE state = 'finished' AND result IS NULL")
1117 -> 0.0003s
1118-- execute("SELECT COUNT(*) FROM builds WHERE state = 'finished'")
1119 -> 0.0003s
1120== 20130521134224 UpdateFinishedBuilds: migrated (0.0017s) ====================
1122== 20130521134800 RemoveUnusedBuildColumns: migrating =========================
1123-- remove_column(:builds, :result)
1124 -> 0.0005s
1125-- remove_column(:builds, :status)
1126 -> 0.0003s
1127-- remove_column(:builds, :previous_result)
1128 -> 0.0003s
1129-- remove_column(:builds, :agent)
1130 -> 0.0004s
1131-- remove_column(:builds, :language)
1132 -> 0.0007s
1133-- remove_column(:builds, :archived_at)
1134 -> 0.0003s
1135== 20130521134800 RemoveUnusedBuildColumns: migrated (0.0027s) ================
1137== 20130521141357 RemoveUnusedJobColumns: migrating ===========================
1138-- remove_column(:jobs, :status)
1139 -> 0.0005s
1140-- remove_column(:jobs, :job_id)
1141 -> 0.0003s
1142-- remove_column(:jobs, :retries)
1143 -> 0.0004s
1144== 20130521141357 RemoveUnusedJobColumns: migrated (0.0012s) ==================
1146== 20130618084205 AddCoupons: migrating =======================================
1147-- create_table(:coupons, {:id=>:integer})
1148 -> 0.0019s
1149== 20130618084205 AddCoupons: migrated (0.0020s) ==============================
1151== 20130629122945 AddGithubIdToUsers: migrating ===============================
1152-- add_column(:repositories, :github_id, :integer)
1153 -> 0.0007s
1154-- add_index(:repositories, :github_id)
1155 -> 0.0005s
1156== 20130629122945 AddGithubIdToUsers: migrated (0.0012s) ======================
1158== 20130629133531 AddDefaultBranchToRepositories: migrating ===================
1159-- add_column(:repositories, :default_branch, :string)
1160 -> 0.0006s
1161== 20130629133531 AddDefaultBranchToRepositories: migrated (0.0006s) ==========
1163== 20130629174449 AddGithubLanguageToRepositories: migrating ==================
1164-- add_column(:repositories, :github_language, :string)
1165 -> 0.0006s
1166== 20130629174449 AddGithubLanguageToRepositories: migrated (0.0006s) =========
1168== 20130701175200 AddContactIdToSubscriptions: migrating ======================
1169-- change_table(:subscriptions)
1170 -> 0.0006s
1171== 20130701175200 AddContactIdToSubscriptions: migrated (0.0007s) =============
1173== 20130702123456 RemoveUnusedRepositoryColumns: migrating ====================
1174-- remove_column(:repositories, :last_duration)
1175 -> 0.0032s
1176-- remove_column(:repositories, :last_build_status)
1177 -> 0.0005s
1178-- remove_column(:repositories, :last_build_result)
1179 -> 0.0004s
1180-- remove_column(:repositories, :last_build_language)
1181 -> 0.0012s
1182== 20130702123456 RemoveUnusedRepositoryColumns: migrated (0.0055s) ===========
1184== 20130702144325 AddUniqueIndexOnUsersGithubIdAndRemoveUniqueIndexOnUsersLogin: migrating
1185-- execute("DROP INDEX index_users_on_login")
1186 -> 0.0007s
1187-- execute("CREATE INDEX CONCURRENTLY index_users_on_login ON users(login)")
1188 -> 0.0016s
1189-- execute("DROP INDEX index_users_on_github_id")
1190 -> 0.0005s
1191-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_users_on_github_id ON users(github_id)")
1192 -> 0.0008s
1193== 20130702144325 AddUniqueIndexOnUsersGithubIdAndRemoveUniqueIndexOnUsersLogin: migrated (0.0038s)
1195== 20130705123456 AddExtraColumnsToOrganizations: migrating ===================
1196-- add_column(:organizations, :avatar_url, :string)
1197 -> 0.0013s
1198-- add_column(:organizations, :location, :string)
1199 -> 0.0027s
1200-- add_column(:organizations, :email, :string)
1201 -> 0.0005s
1202-- add_column(:organizations, :company, :string)
1203 -> 0.0004s
1204-- add_column(:organizations, :homepage, :string)
1205 -> 0.0005s
1206== 20130705123456 AddExtraColumnsToOrganizations: migrated (0.0055s) ==========
1208== 20130707164854 AddIndexOnGithubIdToOrganizations: migrating ================
1209-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_organizations_on_github_id ON organizations(github_id)")
1210 -> 0.0027s
1211== 20130707164854 AddIndexOnGithubIdToOrganizations: migrated (0.0027s) =======
1213== 20130709185200 CreateAnnotations: migrating ================================
1214-- create_table(:annotations, {:id=>:integer})
1215 -> 0.0042s
1216== 20130709185200 CreateAnnotations: migrated (0.0043s) =======================
1218== 20130709233500 CreateAnnotationProviders: migrating ========================
1219-- create_table(:annotation_providers, {:id=>:integer})
1220 -> 0.0033s
1221== 20130709233500 CreateAnnotationProviders: migrated (0.0036s) ===============
1223== 20130710000745 AddAnnotationProviderIdToAnnotations: migrating =============
1224-- add_column(:annotations, :annotation_provider_id, :integer, {:null=>false})
1225 -> 0.0010s
1226== 20130710000745 AddAnnotationProviderIdToAnnotations: migrated (0.0011s) ====
1228== 20130726101124 AddCanceledAtToJobsAndBuilds: migrating =====================
1229-- add_column(:builds, :canceled_at, :timestamp, {:precision=>nil})
1230 -> 0.0008s
1231-- add_column(:jobs, :canceled_at, :timestamp, {:precision=>nil})
1232 -> 0.0005s
1233== 20130726101124 AddCanceledAtToJobsAndBuilds: migrated (0.0015s) ============
1235== 20130901183019 AddIndexOnRepositoryGithubId: migrating =====================
1236-- execute("DROP INDEX index_repositories_on_github_id")
1237 -> 0.0011s
1238-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_github_id ON repositories(github_id)")
1239 -> 0.0009s
1240== 20130901183019 AddIndexOnRepositoryGithubId: migrated (0.0020s) ============
1242== 20130909203321 AddCachedMatrixIdsToBuilds: migrating =======================
1243-- execute("ALTER TABLE builds ADD COLUMN cached_matrix_ids integer[]")
1244 -> 0.0007s
1245== 20130909203321 AddCachedMatrixIdsToBuilds: migrated (0.0007s) ==============
1247== 20130910184823 CreateIndexOnBuildsIdDescAndRepositoryIdAndEventType: migrating
1248-- execute("CREATE INDEX CONCURRENTLY index_builds_on_id_repository_id_and_event_type_desc ON builds (id DESC, repository_id, event_type);")
1249 -> 0.0011s
1250== 20130910184823 CreateIndexOnBuildsIdDescAndRepositoryIdAndEventType: migrated (0.0012s)
1252== 20130916101056 AddUniqueIndexOnRepositoryGithubId: migrating ===============
1253-- execute("DROP INDEX index_repositories_on_github_id")
1254 -> 0.0007s
1255-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_repositories_on_github_id ON repositories(github_id)")
1256 -> 0.0008s
1257== 20130916101056 AddUniqueIndexOnRepositoryGithubId: migrated (0.0015s) ======
1259== 20130920135744 AddSettingsToRepositories: migrating ========================
1260-- add_column(:repositories, :settings, :json)
1261 -> 0.0008s
1262== 20130920135744 AddSettingsToRepositories: migrated (0.0008s) ===============
1264== 20131104101056 RemoveWorkersTableAndIndexes: migrating =====================
1265-- drop_table(:workers)
1266 -> 0.0017s
1267== 20131104101056 RemoveWorkersTableAndIndexes: migrated (0.0017s) ============
1269== 20131109101056 RemoveEventsTable: migrating ================================
1270-- drop_table(:events)
1271 -> 0.0013s
1272== 20131109101056 RemoveEventsTable: migrated (0.0013s) =======================
1274== 20140120225125 RemoveAnnotationImageInfo: migrating ========================
1275-- remove_column(:annotations, :image_url)
1276 -> 0.0007s
1277-- remove_column(:annotations, :image_alt)
1278 -> 0.0004s
1279== 20140120225125 RemoveAnnotationImageInfo: migrated (0.0011s) ===============
1281== 20140121003026 AddStatusToAnnotations: migrating ===========================
1282-- add_column(:annotations, :status, :string)
1283 -> 0.0008s
1284== 20140121003026 AddStatusToAnnotations: migrated (0.0009s) ==================
1286== 20140204220926 AddIndicesToRequests: migrating =============================
1287-- execute("CREATE INDEX CONCURRENTLY index_requests_on_repository_id ON requests(repository_id)")
1288 -> 0.0008s
1289-- execute("CREATE INDEX CONCURRENTLY index_requests_on_commit_id ON requests(commit_id)")
1290 -> 0.0008s
1291== 20140204220926 AddIndicesToRequests: migrated (0.0017s) ====================
1293== 20140210003014 AddIndicesToMemberships: migrating ==========================
1294-- execute("CREATE INDEX CONCURRENTLY index_memberships_on_user_id ON memberships(user_id)")
1295 -> 0.0008s
1296== 20140210003014 AddIndicesToMemberships: migrated (0.0008s) =================
1298== 20140210012509 RemoveUnusedIndices: migrating ==============================
1299-- execute("DROP INDEX CONCURRENTLY index_commits_on_commit")
1300 -> 0.0008s
1301-- execute("DROP INDEX CONCURRENTLY index_builds_on_state")
1302 -> 0.0008s
1303-- execute("DROP INDEX CONCURRENTLY index_commits_on_branch")
1304 -> 0.0007s
1305-- execute("DROP INDEX CONCURRENTLY index_users_on_github_oauth_token")
1306 -> 0.0006s
1307-- execute("DROP INDEX CONCURRENTLY index_builds_on_finished_at")
1308 -> 0.0007s
1309-- execute("DROP INDEX CONCURRENTLY index_jobs_on_queue_and_state")
1310 -> 0.0007s
1311-- execute("DROP INDEX CONCURRENTLY index_jobs_on_created_at")
1312 -> 0.0009s
1313== 20140210012509 RemoveUnusedIndices: migrated (0.0053s) =====================
1315== 20140612131826 AddRemovedInfoToLogs: migrating =============================
1316== 20140612131826 AddRemovedInfoToLogs: migrated (0.0008s) ====================
1318== 20140827121945 AddEducationFieldToUser: migrating ==========================
1319-- add_column(:users, :education, :boolean)
1320 -> 0.0008s
1321== 20140827121945 AddEducationFieldToUser: migrated (0.0008s) =================
1323== 20150121135400 JobsAddReceivedAt: migrating ================================
1324-- add_column(:jobs, :received_at, :timestamp, {:precision=>nil})
1325 -> 0.0009s
1326== 20150121135400 JobsAddReceivedAt: migrated (0.0009s) =======================
1328== 20150121135401 BuildsAddReceivedAt: migrating ==============================
1329-- add_column(:builds, :received_at, :timestamp, {:precision=>nil})
1330 -> 0.0007s
1331== 20150121135401 BuildsAddReceivedAt: migrated (0.0008s) =====================
1333== 20150204144312 AddIndexOnRepositoryIdToCommits: migrating ==================
1334-- execute("DROP INDEX IF EXISTS index_commits_on_repository_id")
1335 -> 0.0003s
1336-- execute("CREATE INDEX CONCURRENTLY index_commits_on_repository_id ON commits(repository_id)")
1337 -> 0.0008s
1338== 20150204144312 AddIndexOnRepositoryIdToCommits: migrated (0.0012s) =========
1340== 20150210170900 IndexRequestsOnCreatedAt: migrating =========================
1341-- execute("DROP INDEX IF EXISTS index_requests_on_created_at")
1342 -> 0.0003s
1343-- execute("CREATE INDEX CONCURRENTLY index_requests_on_created_at ON requests(created_at)")
1344 -> 0.0008s
1345== 20150210170900 IndexRequestsOnCreatedAt: migrated (0.0011s) ================
1347== 20150223125700 CreateBranches: migrating ===================================
1348-- create_table(:branches, {:id=>:integer})
1349 -> 0.0034s
1350-- add_index(:branches, [:repository_id, :name], {:unique=>true})
1351 -> 0.0007s
1352== 20150223125700 CreateBranches: migrated (0.0043s) ==========================
1354== 20150311020321 AddNextBuildNumberToRepository: migrating ===================
1355-- add_column(:repositories, :next_build_number, :integer)
1356 -> 0.0008s
1357== 20150311020321 AddNextBuildNumberToRepository: migrated (0.0009s) ==========
1359== 20150316020321 AddActiveIndexToRepository: migrating =======================
1360-- execute("DROP INDEX IF EXISTS index_repositories_on_active")
1361 -> 0.0003s
1362-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_active ON repositories(active)")
1363 -> 0.0008s
1364== 20150316020321 AddActiveIndexToRepository: migrated (0.0012s) ==============
1366== 20150316080321 AddOwnerTypeAndOwnerIdIndexesToBuilds: migrating ============
1367-- execute("DROP INDEX IF EXISTS index_builds_on_owner_type")
1368 -> 0.0003s
1369-- execute("DROP INDEX IF EXISTS index_builds_on_owner_id")
1370 -> 0.0002s
1371-- execute("CREATE INDEX CONCURRENTLY index_builds_on_owner_type ON builds(owner_type)")
1372 -> 0.0008s
1373-- execute("CREATE INDEX CONCURRENTLY index_builds_on_owner_id ON builds(owner_id)")
1374 -> 0.0008s
1375== 20150316080321 AddOwnerTypeAndOwnerIdIndexesToBuilds: migrated (0.0022s) ===
1377== 20150316100321 AddOwnerTypeAndOwnerIdIndexesToRepositories: migrating ======
1378-- execute("DROP INDEX IF EXISTS index_repositories_on_owner_type")
1379 -> 0.0003s
1380-- execute("DROP INDEX IF EXISTS index_repositories_on_owner_id")
1381 -> 0.0002s
1382-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_owner_type ON repositories(owner_type)")
1383 -> 0.0008s
1384-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_owner_id ON repositories(owner_id)")
1385 -> 0.0008s
1386== 20150316100321 AddOwnerTypeAndOwnerIdIndexesToRepositories: migrated (0.0022s)
1388== 20150317004600 AddSlugIndexToRepositories: migrating =======================
1389-- execute("CREATE EXTENSION IF NOT EXISTS pg_trgm")
1390 -> 0.0085s
1391-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_slug ON repositories USING gin((owner_name || '/' || name) gin_trgm_ops)")
1392 -> 0.0014s
1393== 20150317004600 AddSlugIndexToRepositories: migrated (0.0100s) ==============
1395== 20150317020321 AddTokenIndexToTokens: migrating ============================
1396-- execute("DROP INDEX IF EXISTS index_tokens_on_token")
1397 -> 0.0003s
1398-- execute("CREATE INDEX CONCURRENTLY index_tokens_on_token ON tokens(token)")
1399 -> 0.0008s
1400== 20150317020321 AddTokenIndexToTokens: migrated (0.0012s) ===================
1402== 20150317080321 AddLoginIndexToOrganizations: migrating =====================
1403-- execute("DROP INDEX IF EXISTS index_organizations_on_login")
1404 -> 0.0003s
1405-- execute("CREATE INDEX CONCURRENTLY index_organizations_on_login ON organizations(login)")
1406 -> 0.0007s
1407== 20150317080321 AddLoginIndexToOrganizations: migrated (0.0011s) ============
1409== 20150414001337 AddLowerCaseIndices: migrating ==============================
1410-- execute("DROP INDEX IF EXISTS index_organizations_on_lower_login")
1411 -> 0.0003s
1412-- execute("CREATE INDEX CONCURRENTLY index_organizations_on_lower_login ON organizations USING btree(lower(login))")
1413 -> 0.0009s
1414-- execute("DROP INDEX IF EXISTS index_users_on_lower_login")
1415 -> 0.0003s
1416-- execute("CREATE INDEX CONCURRENTLY index_users_on_lower_login ON users USING btree(lower(login))")
1417 -> 0.0009s
1418-- execute("DROP INDEX IF EXISTS index_repositories_on_lower_name")
1419 -> 0.0002s
1420-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_lower_name ON repositories USING btree(lower(name))")
1421 -> 0.0009s
1422-- execute("DROP INDEX IF EXISTS index_repositories_on_lower_owner_name")
1423 -> 0.0002s
1424-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_lower_owner_name ON repositories USING btree(lower(owner_name))")
1425 -> 0.0008s
1426== 20150414001337 AddLowerCaseIndices: migrated (0.0049s) =====================
1428== 20150528101600 RepositoriesAddIndexOwnerName: migrating ====================
1429-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_owner_name ON repositories(owner_name)")
1430 -> 0.0008s
1431== 20150528101600 RepositoriesAddIndexOwnerName: migrated (0.0008s) ===========
1433== 20150528101601 RepositoriesAddIndexName: migrating =========================
1434-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_name ON repositories(name)")
1435 -> 0.0008s
1436== 20150528101601 RepositoriesAddIndexName: migrated (0.0008s) ================
1438== 20150528101602 RepositoriesDropIndexOwnerNameName: migrating ===============
1439-- execute("DROP INDEX CONCURRENTLY index_repositories_on_owner_name_and_name")
1440 -> 0.0008s
1441== 20150528101602 RepositoriesDropIndexOwnerNameName: migrated (0.0008s) ======
1443== 20150528101603 BuildsAddIndexEventType: migrating ==========================
1444-- execute("CREATE INDEX CONCURRENTLY index_builds_on_event_type ON builds (event_type)")
1445 -> 0.0008s
1446== 20150528101603 BuildsAddIndexEventType: migrated (0.0009s) =================
1448== 20150528101604 BuildsAddIndexRepositoryId: migrating =======================
1449-- execute("CREATE INDEX CONCURRENTLY index_builds_on_repository_id ON builds (repository_id)")
1450 -> 0.0008s
1451== 20150528101604 BuildsAddIndexRepositoryId: migrated (0.0009s) ==============
1453== 20150528101605 BuildsAddIndexState: migrating ==============================
1454-- execute("CREATE INDEX CONCURRENTLY index_builds_on_state ON builds (state)")
1455 -> 0.0008s
1456== 20150528101605 BuildsAddIndexState: migrated (0.0009s) =====================
1458== 20150528101607 BuildsAddIndexBranch: migrating =============================
1459-- execute("CREATE INDEX CONCURRENTLY index_builds_on_branch ON builds (branch)")
1460 -> 0.0008s
1461== 20150528101607 BuildsAddIndexBranch: migrated (0.0008s) ====================
1463== 20150528101608 BuildsDropIndexRepositoryIdAndState: migrating ==============
1464-- execute("DROP INDEX CONCURRENTLY index_builds_on_repository_id_and_state")
1465 -> 0.0008s
1466== 20150528101608 BuildsDropIndexRepositoryIdAndState: migrated (0.0008s) =====
1468== 20150528101609 BuildsDropIndexRepositoryIdAndEventType: migrating ==========
1469-- execute("DROP INDEX CONCURRENTLY index_builds_on_repository_id_and_event_type")
1470 -> 0.0007s
1471== 20150528101609 BuildsDropIndexRepositoryIdAndEventType: migrated (0.0008s) =
1473== 20150528101610 BuildsDropIndexIdRepositoryIdAndEventTypeDesc: migrating ====
1474-- execute("DROP INDEX CONCURRENTLY index_builds_on_id_repository_id_and_event_type_desc")
1475 -> 0.0008s
1476== 20150528101610 BuildsDropIndexIdRepositoryIdAndEventTypeDesc: migrated (0.0009s)
1478== 20150528101611 BuildsDropIndexRepositoryIdAndEventTypeAndStateAndBranch: migrating
1479-- execute("DROP INDEX CONCURRENTLY index_builds_on_repository_id_and_event_type_and_state_and_bran")
1480 -> 0.0007s
1481== 20150528101611 BuildsDropIndexRepositoryIdAndEventTypeAndStateAndBranch: migrated (0.0008s)
1483== 20150609175200 AddCancelationColumnsToSubscriptions: migrating =============
1484-- change_table(:subscriptions)
1485 -> 0.0013s
1486== 20150609175200 AddCancelationColumnsToSubscriptions: migrated (0.0013s) ====
1488== 20150610143500 JobsAddIndexOwnerId: migrating ==============================
1489-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_owner_id ON jobs (owner_id)")
1490 -> 0.0009s
1491== 20150610143500 JobsAddIndexOwnerId: migrated (0.0009s) =====================
1493== 20150610143501 JobsAddIndexOwnerType: migrating ============================
1494-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_owner_type ON jobs (owner_type)")
1495 -> 0.0009s
1496== 20150610143501 JobsAddIndexOwnerType: migrated (0.0009s) ===================
1498== 20150610143502 JobsAddIndexSourceId: migrating =============================
1499-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_source_id ON jobs (source_id)")
1500 -> 0.0008s
1501== 20150610143502 JobsAddIndexSourceId: migrated (0.0008s) ====================
1503== 20150610143503 JobsAddIndexSourceType: migrating ===========================
1504-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_source_type ON jobs (source_type)")
1505 -> 0.0008s
1506== 20150610143503 JobsAddIndexSourceType: migrated (0.0008s) ==================
1508== 20150610143504 JobsAddIndexType: migrating =================================
1509-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_type ON jobs (type)")
1510 -> 0.0008s
1511== 20150610143504 JobsAddIndexType: migrated (0.0008s) ========================
1513== 20150610143505 JobsDropIndexOwnerIdAndOwnerTypeAndState: migrating =========
1514-- execute("DROP INDEX CONCURRENTLY index_jobs_on_owner_id_and_owner_type_and_state")
1515 -> 0.0008s
1516== 20150610143505 JobsDropIndexOwnerIdAndOwnerTypeAndState: migrated (0.0008s)
1518== 20150610143506 JobsDropIndexStateOwnerTypeOwnerId: migrating ===============
1519-- execute("DROP INDEX CONCURRENTLY index_jobs_on_state_owner_type_owner_id")
1520 -> 0.0007s
1521== 20150610143506 JobsDropIndexStateOwnerTypeOwnerId: migrated (0.0007s) ======
1523== 20150610143507 JobsDropIndexTypeAndSourceIdAndSourceType: migrating ========
1524-- 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"})
1525 -> 0.0050s
1526== 20150610143507 JobsDropIndexTypeAndSourceIdAndSourceType: migrated (0.0051s)
1528== 20150610143508 JobsAddIndexState: migrating ================================
1529-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_state ON jobs (state)")
1530 -> 0.0009s
1531== 20150610143508 JobsAddIndexState: migrated (0.0009s) =======================
1533== 20150610143509 JobsAddIndexQueue: migrating ================================
1534-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_queue ON jobs (queue)")
1535 -> 0.0009s
1536== 20150610143509 JobsAddIndexQueue: migrated (0.0009s) =======================
1538== 20150610143510 TokensAddIndexUserId: migrating =============================
1539-- execute("CREATE INDEX CONCURRENTLY index_tokens_on_user_id ON tokens (user_id)")
1540 -> 0.0007s
1541== 20150610143510 TokensAddIndexUserId: migrated (0.0008s) ====================
1543== 20150615103059 AddStatusToSubscriptions: migrating =========================
1544-- add_column(:subscriptions, :status, :string)
1545 -> 0.0007s
1546== 20150615103059 AddStatusToSubscriptions: migrated (0.0008s) ================
1548== 20150629231300 ReposAddInvalidatedAt: migrating ============================
1549-- add_column(:repositories, :invalidated_at, :timestamp, {:precision=>nil})
1550 -> 0.0010s
1551== 20150629231300 ReposAddInvalidatedAt: migrated (0.0011s) ===================
1553== 20150923131400 BroadcastsAddCategory: migrating ============================
1554-- add_column(:broadcasts, :category, :string)
1555 -> 0.0008s
1556== 20150923131400 BroadcastsAddCategory: migrated (0.0008s) ===================
1558== 20151112153500 CreateStars: migrating ======================================
1559-- create_table(:stars, {:id=>:integer})
1560 -> 0.0024s
1561-- add_index(:stars, :user_id)
1562 -> 0.0006s
1563== 20151112153500 CreateStars: migrated (0.0032s) =============================
1565== 20151113111400 StarsAddIndexUserIdAndRepositoryId: migrating ===============
1566-- execute("CREATE UNIQUE INDEX index_stars_on_user_id_and_repository_id ON stars (user_id, repository_id)")
1567 -> 0.0007s
1568== 20151113111400 StarsAddIndexUserIdAndRepositoryId: migrated (0.0007s) ======
1570== 20151127153500 UsersAddIndexGithubOauthToken: migrating ====================
1571-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_users_on_github_oauth_token ON users (github_oauth_token)")
1572 -> 0.0009s
1573== 20151127153500 UsersAddIndexGithubOauthToken: migrated (0.0009s) ===========
1575== 20151127154200 AnnotationsAddIndexJobId: migrating =========================
1576-- execute("CREATE INDEX CONCURRENTLY index_annotations_on_job_id ON annotations (job_id)")
1577 -> 0.0007s
1578== 20151127154200 AnnotationsAddIndexJobId: migrated (0.0008s) ================
1580== 20151127154600 BroadcastsAddIndexRecipientIdAndRecipientType: migrating ====
1581-- execute("CREATE INDEX CONCURRENTLY index_broadcasts_on_recipient_id_and_recipient_type ON broadcasts (recipient_id, recipient_type)")
1582 -> 0.0010s
1583== 20151127154600 BroadcastsAddIndexRecipientIdAndRecipientType: migrated (0.0011s)
1585== 20151202122200 UsersAddFirstLoggedInAt: migrating ==========================
1586-- add_column(:users, :first_logged_in_at, :timestamp, {:precision=>nil})
1587 -> 0.0008s
1588== 20151202122200 UsersAddFirstLoggedInAt: migrated (0.0008s) =================
1590== 20160107120927 AddCronTable: migrating =====================================
1591-- create_table(:crons, {:id=>:integer})
1592 -> 0.0042s
1593== 20160107120927 AddCronTable: migrated (0.0042s) ============================
1595== 20160303165750 AddDebugOptionsToJobs: migrating ============================
1596-- add_column(:jobs, :debug_options, :text)
1597 -> 0.0011s
1598== 20160303165750 AddDebugOptionsToJobs: migrated (0.0012s) ===================
1600== 20160412113020 BuildsDropIndexOwnerType: migrating =========================
1601-- execute("DROP INDEX CONCURRENTLY index_builds_on_owner_type")
1602 -> 0.0019s
1603== 20160412113020 BuildsDropIndexOwnerType: migrated (0.0020s) ================
1605== 20160412113070 RepositoriesDropIndexLastBuildStartedAt: migrating ==========
1606-- execute("DROP INDEX CONCURRENTLY index_repositories_on_last_build_started_at")
1607 -> 0.0021s
1608== 20160412113070 RepositoriesDropIndexLastBuildStartedAt: migrated (0.0021s) =
1610== 20160412121405 JobsDropIndexType: migrating ================================
1611-- execute("DROP INDEX CONCURRENTLY index_jobs_on_type")
1612 -> 0.0008s
1613== 20160412121405 JobsDropIndexType: migrated (0.0008s) =======================
1615== 20160412123900 JobsDropIndexSourceType: migrating ==========================
1616-- execute("DROP INDEX CONCURRENTLY index_jobs_on_source_type")
1617 -> 0.0007s
1618== 20160412123900 JobsDropIndexSourceType: migrated (0.0008s) =================
1620== 20160414214442 JobsAddIndexQueuedAt: migrating =============================
1621-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_queued_at ON jobs (queued_at)")
1622 -> 0.0008s
1623== 20160414214442 JobsAddIndexQueuedAt: migrated (0.0009s) ====================
1625== 20160422104300 BuildsAddIndexNumber: migrating =============================
1626-- execute("CREATE INDEX CONCURRENTLY index_builds_on_number ON builds (number)")
1627 -> 0.0008s
1628== 20160422104300 BuildsAddIndexNumber: migrated (0.0009s) ====================
1630== 20160422121400 BuildsAddIndexRepositoryIdAndNumberAndEventType: migrating ==
1631-- execute("CREATE INDEX CONCURRENTLY index_builds_on_repository_id_and_number_and_event_type ON builds (repository_id, number, event_type)")
1632 -> 0.0010s
1633== 20160422121400 BuildsAddIndexRepositoryIdAndNumberAndEventType: migrated (0.0010s)
1635== 20160510142700 JobsAddIndexCreatedAt: migrating ============================
1636-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_created_at ON jobs (created_at)")
1637 -> 0.0008s
1638== 20160510142700 JobsAddIndexCreatedAt: migrated (0.0011s) ===================
1640== 20160510144200 BuildsAddPrivate: migrating =================================
1641-- change_table(:builds)
1642 -> 0.0017s
1643== 20160510144200 BuildsAddPrivate: migrated (0.0018s) ========================
1645== 20160510150300 JobsAddPrivate: migrating ===================================
1646-- change_table(:jobs)
1647 -> 0.0009s
1648== 20160510150300 JobsAddPrivate: migrated (0.0009s) ==========================
1650== 20160510150400 RequestsAddPrivate: migrating ===============================
1651-- change_table(:requests)
1652 -> 0.0054s
1653== 20160510150400 RequestsAddPrivate: migrated (0.0055s) ======================
1655== 20160513074300 AddCurrentBuildIdToRepositories: migrating ==================
1656-- add_column(:repositories, :current_build_id, :bigint)
1657 -> 0.0026s
1658-- execute("ALTER TABLE repositories ADD CONSTRAINT fk_repositories_current_build_id FOREIGN KEY (current_build_id) REFERENCES builds (id);")
1659 -> 0.0029s
1660== 20160513074300 AddCurrentBuildIdToRepositories: migrated (0.0058s) =========
1662== 20160609163600 PermissionsAddIndexUserIdAndRepositoryId: migrating =========
1663-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_permissions_on_user_id_and_repository_id ON permissions (user_id, repository_id)")
1664 -> 0.0011s
1665== 20160609163600 PermissionsAddIndexUserIdAndRepositoryId: migrated (0.0012s)
1667== 20160623133900 CreatePreviousJobStates: migrating ==========================
1668-- create_table(:previous_job_states, {:id=>:integer})
1669 -> 0.0038s
1670-- add_column(:jobs, :previous_job_state_id, :bigint)
1671 -> 0.0037s
1672== 20160623133900 CreatePreviousJobStates: migrated (0.0076s) =================
1674== 20160623133901 AddPreviousStatesTriggers: migrating ========================
1675-- 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")
1676 -> 0.0022s
1677== 20160623133901 AddPreviousStatesTriggers: migrated (0.0026s) ===============
1679== 20160712125400 RevertPreviousJobStates: migrating ==========================
1680-- 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")
1681 -> 0.0022s
1682-- remove_column(:jobs, :previous_job_state_id)
1683 -> 0.0008s
1684-- drop_table(:previous_job_states)
1685 -> 0.0016s
1686== 20160712125400 RevertPreviousJobStates: migrated (0.0050s) =================
1688== 20160819103700 AddAvatarUrlToUsers: migrating ==============================
1689-- add_column(:users, :avatar_url, :string)
1690 -> 0.0028s
1691== 20160819103700 AddAvatarUrlToUsers: migrated (0.0029s) =====================
1693== 20160920220400 AddRoleToMemberships: migrating =============================
1694-- add_column(:memberships, :role, :string)
1695 -> 0.0014s
1696== 20160920220400 AddRoleToMemberships: migrated (0.0015s) ====================
1698== 20161028154600 RemoveTypeIndices: migrating ================================
1699-- execute("DROP INDEX CONCURRENTLY IF EXISTS index_requests_on_event_type")
1700 -> 0.0010s
1701-- execute("DROP INDEX CONCURRENTLY IF EXISTS index_jobs_on_owner_type")
1702 -> 0.0010s
1703== 20161028154600 RemoveTypeIndices: migrated (0.0021s) =======================
1705== 20161101000000 AddNextRunLastRunToCrons: migrating =========================
1706-- column_exists?(:crons, :next_run)
1707 -> 0.0025s
1708-- add_column(:crons, :next_run, :timestamp, {:precision=>nil})
1709 -> 0.0010s
1710-- column_exists?(:crons, :last_run)
1711 -> 0.0034s
1712-- add_column(:crons, :last_run, :timestamp, {:precision=>nil})
1713 -> 0.0008s
1714== 20161101000000 AddNextRunLastRunToCrons: migrated (0.0079s) ================
1716== 20161101000001 AddDontRunIfRecentBuildExists: migrating ====================
1717-- column_exists?(:crons, :dont_run_if_recent_build_exists)
1718 -> 0.0050s
1719-- add_column(:crons, :dont_run_if_recent_build_exists, :boolean, {:default=>false})
1720 -> 0.0032s
1721== 20161101000001 AddDontRunIfRecentBuildExists: migrated (0.0085s) ===========
1723== 20161201112200 CreateBetaFeatures: migrating ===============================
1724-- create_table(:beta_features, {:id=>:integer})
1725 -> 0.0037s
1726== 20161201112200 CreateBetaFeatures: migrated (0.0037s) ======================
1728== 20161201112600 CreateUserBetaFeatures: migrating ===========================
1729-- create_table(:user_beta_features, {:id=>:integer})
1730 -> 0.0025s
1731-- add_index(:user_beta_features, [:user_id, :beta_feature_id])
1732 -> 0.0007s
1733== 20161201112600 CreateUserBetaFeatures: migrated (0.0033s) ==================
1735== 20161202000000 RemoveDisableByBuildFromCrons: migrating ====================
1736-- remove_column(:crons, :disable_by_build)
1737 -> 0.0008s
1738== 20161202000000 RemoveDisableByBuildFromCrons: migrated (0.0008s) ===========
1740== 20161206155800 AddBillingAdminOnlyToOrganizations: migrating ===============
1741-- add_column(:organizations, :billing_admin_only, :boolean)
1742 -> 0.0007s
1743== 20161206155800 AddBillingAdminOnlyToOrganizations: migrated (0.0007s) ======
1745== 20161221171300 BuildsAddIndexRepositoryIdAndNumber: migrating ==============
1746-- execute("CREATE INDEX CONCURRENTLY index_builds_on_repository_id_and_number ON builds(repository_id, (number::integer))")
1747 -> 0.0010s
1748== 20161221171300 BuildsAddIndexRepositoryIdAndNumber: migrated (0.0011s) =====
1750== 20170211000000 JobsAddStageNumber: migrating ===============================
1751-- add_column(:jobs, :stage_number, :string)
1752 -> 0.0007s
1753== 20170211000000 JobsAddStageNumber: migrated (0.0007s) ======================
1755== 20170211000001 JobsAddStageId: migrating ===================================
1756-- change_table(:jobs)
1757 -> 0.0008s
1758== 20170211000001 JobsAddStageId: migrated (0.0009s) ==========================
1760== 20170211000002 StagesCreate: migrating =====================================
1761-- create_table(:stages, {:id=>:integer})
1762 -> 0.0026s
1763== 20170211000002 StagesCreate: migrated (0.0026s) ============================
1765== 20170211000003 StagesAddStateAndTimestamps: migrating ======================
1766-- change_table(:stages)
1767 -> 0.0017s
1768== 20170211000003 StagesAddStateAndTimestamps: migrated (0.0018s) =============
1770== 20170213124000 AddConstraintForOwnerIdToSubscriptions: migrating ===========
1771-- execute("CREATE UNIQUE INDEX subscriptions_owner ON subscriptions (owner_id, owner_type) WHERE (status = 'subscribed');")
1772 -> 0.0015s
1773== 20170213124000 AddConstraintForOwnerIdToSubscriptions: migrated (0.0016s) ==
1775== 20170316000000 QueueableJobsCreate: migrating ==============================
1776-- create_table(:queueable_jobs, {:id=>:integer})
1777 -> 0.0027s
1778== 20170316000000 QueueableJobsCreate: migrated (0.0027s) =====================
1780== 20170316000001 QueueableJobsIndexJobId: migrating ==========================
1781-- add_index(:queueable_jobs, :job_id, {:algorithm=>:concurrently})
1782 -> 0.0012s
1783== 20170316000001 QueueableJobsIndexJobId: migrated (0.0013s) =================
1785== 20170318000000 PullRequestsCreate: migrating ===============================
1786-- create_table(:pull_requests, {:id=>:integer})
1787 -> 0.0049s
1788== 20170318000000 PullRequestsCreate: migrated (0.0049s) ======================
1790== 20170318000001 RequestsAddPullRequestId: migrating =========================
1791-- change_table(:requests)
1792 -> 0.0011s
1793== 20170318000001 RequestsAddPullRequestId: migrated (0.0012s) ================
1795== 20170318000002 BuildsAddPullRequestId: migrating ===========================
1796-- change_table(:builds)
1797 -> 0.0010s
1798== 20170318000002 BuildsAddPullRequestId: migrated (0.0010s) ==================
1800== 20170322000000 AddIndexOnRequestsRepositoryIdAndIdDesc: migrating ==========
1801-- execute("CREATE INDEX CONCURRENTLY index_requests_on_repository_id_and_id_desc ON requests (repository_id, id DESC);")
1802 -> 0.0018s
1803== 20170322000000 AddIndexOnRequestsRepositoryIdAndIdDesc: migrated (0.0018s) =
1805== 20170331000000 AddIndexRepositoryIdOnPullRequests: migrating ===============
1806-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_pull_requests_on_repository_id_and_number ON pull_requests (repository_id, (number::integer));")
1807 -> 0.0015s
1808== 20170331000000 AddIndexRepositoryIdOnPullRequests: migrated (0.0015s) ======
1810== 20170401000000 OwnerGroupsCreate: migrating ================================
1811-- create_table(:owner_groups, {:id=>:integer})
1812 -> 0.0053s
1813== 20170401000000 OwnerGroupsCreate: migrated (0.0054s) =======================
1815== 20170401000001 OwnerGroupsIndexOwnerIdOwnerType: migrating =================
1816-- execute("CREATE INDEX CONCURRENTLY index_owner_groups_on_owner_type_and_owner_id ON owner_groups (owner_type, owner_id);")
1817 -> 0.0024s
1818== 20170401000001 OwnerGroupsIndexOwnerIdOwnerType: migrated (0.0025s) ========
1820== 20170401000002 OwnerGroupsIndexUuid: migrating =============================
1821-- execute("CREATE INDEX CONCURRENTLY index_owner_groups_on_uuid ON owner_groups (uuid);")
1822 -> 0.0011s
1823== 20170401000002 OwnerGroupsIndexUuid: migrated (0.0012s) ====================
1825== 20170405000000 TagsCreate: migrating =======================================
1826-- create_table(:tags, {:id=>:integer})
1827 -> 0.0023s
1828== 20170405000000 TagsCreate: migrated (0.0024s) ==============================
1830== 20170405000001 RequestsAddBranchIdAndTagId: migrating ======================
1831-- change_table(:requests)
1832 -> 0.0014s
1833== 20170405000001 RequestsAddBranchIdAndTagId: migrated (0.0015s) =============
1835== 20170405000002 CommitsAddBranchIdAndTagId: migrating =======================
1836-- change_table(:commits)
1837 -> 0.0013s
1838== 20170405000002 CommitsAddBranchIdAndTagId: migrated (0.0014s) ==============
1840== 20170405000003 BuildsAddBranchIdAndTagId: migrating ========================
1841-- change_table(:builds)
1842 -> 0.0014s
1843== 20170405000003 BuildsAddBranchIdAndTagId: migrated (0.0014s) ===============
1845== 20170408000000 RequestsAddSenderId: migrating ==============================
1846-- change_table(:requests)
1847 -> 0.0011s
1848== 20170408000000 RequestsAddSenderId: migrated (0.0011s) =====================
1850== 20170408000001 BuildsAddSenderId: migrating ================================
1851-- change_table(:builds)
1852 -> 0.0013s
1853== 20170408000001 BuildsAddSenderId: migrated (0.0013s) =======================
1855== 20170410000000 JobsIndexStageId: migrating =================================
1856-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_stage_id ON jobs (stage_id);")
1857 -> 0.0009s
1858== 20170410000000 JobsIndexStageId: migrated (0.0009s) ========================
1860== 20170411000000 TagsIndexRepoIdAndName: migrating ===========================
1861-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_tags_on_repository_id_and_name ON tags (repository_id, name);")
1862 -> 0.0008s
1863== 20170411000000 TagsIndexRepoIdAndName: migrated (0.0009s) ==================
1865== 20170419093249 AddSourceToSubscriptions: migrating =========================
1866-- execute(" CREATE TYPE source_type AS ENUM ('manual', 'stripe', 'github', 'unknown');\n")
1867 -> 0.0010s
1868-- add_column(:subscriptions, :source, :source_type, {:default=>"unknown", :null=>false})
1869 -> 0.0034s
1870== 20170419093249 AddSourceToSubscriptions: migrated (0.0045s) ================
1872== 20170531125700 AddIndexOnBuildsSenderTypeAndSenderId: migrating ============
1873-- execute("CREATE INDEX CONCURRENTLY index_builds_on_sender_type_and_sender_id ON builds (sender_type, sender_id);")
1874 -> 0.0009s
1875== 20170531125700 AddIndexOnBuildsSenderTypeAndSenderId: migrated (0.0009s) ===
1877== 20170601163700 DropIndexOnRepositoriesBuildsAndCommits: migrating ==========
1878-- execute("DROP INDEX CONCURRENTLY index_repositories_on_lower_owner_name")
1879 -> 0.0007s
1880-- execute("DROP INDEX CONCURRENTLY index_repositories_on_owner_type")
1881 -> 0.0006s
1882-- execute("DROP INDEX CONCURRENTLY index_commits_on_repository_id")
1883 -> 0.0006s
1884-- execute("DROP INDEX CONCURRENTLY index_builds_on_number")
1885 -> 0.0007s
1886== 20170601163700 DropIndexOnRepositoriesBuildsAndCommits: migrated (0.0027s) =
1888== 20170601164400 AddIndexOnBuildsAndStages: migrating ========================
1889-- execute("CREATE INDEX CONCURRENTLY index_builds_on_repository_id_and_branch_and_event_type_and_id ON builds (repository_id, branch, event_type, id)")
1890 -> 0.0008s
1891-- execute("CREATE INDEX CONCURRENTLY index_stages_on_build_id ON stages (build_id)")
1892 -> 0.0006s
1893== 20170601164400 AddIndexOnBuildsAndStages: migrated (0.0016s) ===============
1895== 20170609174400 DropUnusedIndexesOnJobsAndBuilds: migrating =================
1896-- execute("DROP INDEX CONCURRENTLY index_jobs_on_repository_id")
1897 -> 0.0006s
1898-- execute("DROP INDEX CONCURRENTLY index_jobs_on_queued_at")
1899 -> 0.0006s
1900-- execute("DROP INDEX CONCURRENTLY index_jobs_on_queue")
1901 -> 0.0006s
1902-- execute("DROP INDEX CONCURRENTLY index_jobs_on_owner_id")
1903 -> 0.0006s
1904-- execute("DROP INDEX CONCURRENTLY index_builds_on_branch")
1905 -> 0.0006s
1906-- execute("DROP INDEX CONCURRENTLY index_builds_on_event_type")
1907 -> 0.0006s
1908-- execute("DROP INDEX CONCURRENTLY index_builds_on_owner_id")
1909 -> 0.0006s
1910== 20170609174400 DropUnusedIndexesOnJobsAndBuilds: migrated (0.0046s) ========
1912== 20170613000000 CreateTrials: migrating =====================================
1913-- create_table(:trials, {:id=>:integer})
1914 -> 0.0032s
1915-- execute("CREATE INDEX CONCURRENTLY index_trials_on_owner ON trials(owner_id, owner_type)")
1916 -> 0.0024s
1917== 20170613000000 CreateTrials: migrated (0.0057s) ============================
1919== 20170620144500 AddIndexesOnBuildsAndJobsAndBranches: migrating =============
1920-- execute("CREATE INDEX CONCURRENTLY index_builds_on_repository_id_and_branch_and_id_desc ON builds (repository_id, branch, id DESC)")
1921 -> 0.0010s
1922-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_owner_id_and_owner_type_and_state ON jobs (owner_id, owner_type, state)")
1923 -> 0.0009s
1924-- execute("CREATE INDEX CONCURRENTLY index_branches_on_repository_id ON branches (repository_id)")
1925 -> 0.0007s
1926== 20170620144500 AddIndexesOnBuildsAndJobsAndBranches: migrated (0.0026s) ====
1928== 20170621142300 RemovePlansTable: migrating =================================
1929-- drop_table(:plans)
1930 -> 0.0013s
1931== 20170621142300 RemovePlansTable: migrated (0.0014s) ========================
1933== 20170713162000 AddCcLastDigitsToInvoices: migrating ========================
1934-- change_table(:invoices)
1935 -> 0.0018s
1936== 20170713162000 AddCcLastDigitsToInvoices: migrated (0.0018s) ===============
1938== 20170822171600 CreateMessages: migrating ===================================
1939-- create_table("messages", {:force=>:cascade, :id=>:integer})
1940 -> 0.0032s
1941-- execute("CREATE INDEX CONCURRENTLY index_messages_on_subject_type_and_subject_id ON messages(subject_type, subject_id)")
1942 -> 0.0008s
1943== 20170822171600 CreateMessages: migrated (0.0041s) ==========================
1945== 20170831000000 CreateTrialAllowances: migrating ============================
1946-- create_table(:trial_allowances, {:id=>:integer})
1947 -> 0.0039s
1948-- add_index(:trial_allowances, :trial_id)
1949 -> 0.0006s
1950-- add_index(:trial_allowances, [:creator_id, :creator_type])
1951 -> 0.0014s
1952== 20170831000000 CreateTrialAllowances: migrated (0.0060s) ===================
1954== 20170911172800 AddIndexOnJobsUpdatedAt: migrating ==========================
1955-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_updated_at ON jobs (updated_at)")
1956 -> 0.0014s
1957== 20170911172800 AddIndexOnJobsUpdatedAt: migrated (0.0016s) =================
1959== 20171017104500 AddConcurrencyToSubscriptions: migrating ====================
1960-- change_table(:subscriptions)
1961 -> 0.0017s
1962== 20171017104500 AddConcurrencyToSubscriptions: migrated (0.0018s) ===========
1964== 20171024000000 AddAbuseTable: migrating ====================================
1965-- create_table(:abuses, {:id=>:integer})
1966 -> 0.0045s
1967-- execute("CREATE INDEX CONCURRENTLY index_abuses_on_owner ON abuses(owner_id)")
1968 -> 0.0011s
1969== 20171024000000 AddAbuseTable: migrated (0.0057s) ===========================
1971== 20171025000000 AddUpdatedAtTriggerToBuildsAndJobs: migrating ===============
1972-- 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")
1973 -> 0.0018s
1974== 20171025000000 AddUpdatedAtTriggerToBuildsAndJobs: migrated (0.0019s) ======
1976== 20171103000000 UpdateIndexOnAbuses: migrating ==============================
1977-- index_exists?(:abuses, :owner, {:name=>"index_abuses_on_owner"})
1978 -> 0.0028s
1979-- index_exists?(:abuses, [:owner_id, :owner_type, :level], {:name=>"index_abuses_on_owner_id_and_owner_type_and_level"})
1980 -> 0.0020s
1981-- add_index(:abuses, [:owner_id, :owner_type, :level], {:unique=>true, :algorithm=>:concurrently})
1982 -> 0.0015s
1983== 20171103000000 UpdateIndexOnAbuses: migrated (0.0067s) =====================
1985== 20171211000000 AddRepositoryIdBranchEventTypeIndexOnBuilds: migrating ======
1986-- 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')")
1987 -> 0.0019s
1988== 20171211000000 AddRepositoryIdBranchEventTypeIndexOnBuilds: migrated (0.0020s)
1990== 20180212000000 UsersAddSuspended: migrating ================================
1991-- add_column(:users, :suspended, :boolean, {:default=>false})
1992 -> 0.0052s
1993== 20180212000000 UsersAddSuspended: migrated (0.0053s) =======================
1995== 20180213000000 UsersAddSuspendedAt: migrating ==============================
1996-- add_column(:users, :suspended_at, :timestamp, {:precision=>nil})
1997 -> 0.0018s
1998== 20180213000000 UsersAddSuspendedAt: migrated (0.0018s) =====================
2000== 20180222000000 AddComIdAndOrgId: migrating =================================
2001-- add_column(:branches, :org_id, :integer)
2002 -> 0.0018s
2003-- add_column(:builds, :org_id, :integer)
2004 -> 0.0007s
2005-- add_column(:commits, :org_id, :integer)
2006 -> 0.0008s
2007-- add_column(:crons, :org_id, :integer)
2008 -> 0.0008s
2009-- add_column(:jobs, :org_id, :integer)
2010 -> 0.0008s
2011-- add_column(:organizations, :org_id, :integer)
2012 -> 0.0007s
2013-- add_column(:permissions, :org_id, :integer)
2014 -> 0.0006s
2015-- add_column(:pull_requests, :org_id, :integer)
2016 -> 0.0007s
2017-- add_column(:repositories, :org_id, :integer)
2018 -> 0.0014s
2019-- add_column(:requests, :org_id, :integer)
2020 -> 0.0014s
2021-- add_column(:ssl_keys, :org_id, :integer)
2022 -> 0.0007s
2023-- add_column(:stages, :org_id, :integer)
2024 -> 0.0007s
2025-- add_column(:tags, :org_id, :integer)
2026 -> 0.0006s
2027-- add_column(:users, :org_id, :integer)
2028 -> 0.0007s
2029-- add_column(:branches, :com_id, :integer)
2030 -> 0.0007s
2031-- add_column(:builds, :com_id, :integer)
2032 -> 0.0007s
2033-- add_column(:commits, :com_id, :integer)
2034 -> 0.0007s
2035-- add_column(:crons, :com_id, :integer)
2036 -> 0.0007s
2037-- add_column(:jobs, :com_id, :integer)
2038 -> 0.0006s
2039-- add_column(:organizations, :com_id, :integer)
2040 -> 0.0007s
2041-- add_column(:permissions, :com_id, :integer)
2042 -> 0.0008s
2043-- add_column(:pull_requests, :com_id, :integer)
2044 -> 0.0006s
2045-- add_column(:repositories, :com_id, :integer)
2046 -> 0.0007s
2047-- add_column(:requests, :com_id, :integer)
2048 -> 0.0007s
2049-- add_column(:ssl_keys, :com_id, :integer)
2050 -> 0.0007s
2051-- add_column(:stages, :com_id, :integer)
2052 -> 0.0006s
2053-- add_column(:tags, :com_id, :integer)
2054 -> 0.0004s
2055-- add_column(:users, :com_id, :integer)
2056 -> 0.0010s
2057== 20180222000000 AddComIdAndOrgId: migrated (0.0230s) ========================
2059== 20180222000001 AddComIdAndOrgIdIndices: migrating ==========================
2060-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_branches_on_org_id ON branches USING btree (org_id)")
2061 -> 0.0010s
2062-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_builds_on_org_id ON builds USING btree (org_id)")
2063 -> 0.0011s
2064-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_jobs_on_org_id ON jobs USING btree (org_id)")
2065 -> 0.0011s
2066-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_commits_on_org_id ON commits USING btree (org_id)")
2067 -> 0.0009s
2068-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_crons_on_org_id ON crons USING btree (org_id)")
2069 -> 0.0009s
2070-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_organizations_on_org_id ON organizations USING btree (org_id)")
2071 -> 0.0009s
2072-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_permissions_on_org_id ON permissions USING btree (org_id)")
2073 -> 0.0010s
2074-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_pull_requests_on_org_id ON pull_requests USING btree (org_id)")
2075 -> 0.0009s
2076-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_repositories_on_org_id ON repositories USING btree (org_id)")
2077 -> 0.0010s
2078-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_requests_on_org_id ON requests USING btree (org_id)")
2079 -> 0.0009s
2080-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_ssl_keys_on_org_id ON ssl_keys USING btree (org_id)")
2081 -> 0.0009s
2082-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_stages_on_org_id ON stages USING btree (org_id)")
2083 -> 0.0009s
2084-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_tags_on_org_id ON tags USING btree (org_id)")
2085 -> 0.0010s
2086-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_users_on_org_id ON users USING btree (org_id)")
2087 -> 0.0012s
2088-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_branches_on_com_id ON branches USING btree (com_id)")
2089 -> 0.0009s
2090-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_builds_on_com_id ON builds USING btree (com_id)")
2091 -> 0.0011s
2092-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_jobs_on_com_id ON jobs USING btree (com_id)")
2093 -> 0.0010s
2094-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_commits_on_com_id ON commits USING btree (com_id)")
2095 -> 0.0009s
2096-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_crons_on_com_id ON crons USING btree (com_id)")
2097 -> 0.0009s
2098-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_organizations_on_com_id ON organizations USING btree (com_id)")
2099 -> 0.0009s
2100-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_permissions_on_com_id ON permissions USING btree (com_id)")
2101 -> 0.0009s
2102-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_pull_requests_on_com_id ON pull_requests USING btree (com_id)")
2103 -> 0.0009s
2104-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_repositories_on_com_id ON repositories USING btree (com_id)")
2105 -> 0.0010s
2106-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_requests_on_com_id ON requests USING btree (com_id)")
2107 -> 0.0009s
2108-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_ssl_keys_on_com_id ON ssl_keys USING btree (com_id)")
2109 -> 0.0009s
2110-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_stages_on_com_id ON stages USING btree (com_id)")
2111 -> 0.0009s
2112-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_tags_on_com_id ON tags USING btree (com_id)")
2113 -> 0.0007s
2114-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_users_on_com_id ON users USING btree (com_id)")
2115 -> 0.0010s
2116== 20180222000001 AddComIdAndOrgIdIndices: migrated (0.0276s) =================
2118== 20180222000002 AddMigrating: migrating =====================================
2119-- add_column(:repositories, :migrating, :boolean)
2120 -> 0.0018s
2121-- add_column(:repositories, :migrated_at, :timestamp, {:precision=>nil})
2122 -> 0.0008s
2123-- add_column(:organizations, :migrating, :boolean)
2124 -> 0.0007s
2125-- add_column(:organizations, :migrated_at, :timestamp, {:precision=>nil})
2126 -> 0.0007s
2127-- add_column(:users, :migrating, :boolean)
2128 -> 0.0007s
2129-- add_column(:users, :migrated_at, :timestamp, {:precision=>nil})
2130 -> 0.0008s
2131== 20180222000002 AddMigrating: migrated (0.0058s) ============================
2133== 20180222000003 DropFkRepositoriesCurrentBuildId: migrating =================
2134-- execute("ALTER TABLE repositories DROP CONSTRAINT fk_repositories_current_build_id")
2135 -> 0.0012s
2136== 20180222000003 DropFkRepositoriesCurrentBuildId: migrated (0.0013s) ========
2138== 20180222000009 CreateRepoCounts: migrating =================================
2139-- create_table(:repo_counts, {:id=>false})
2140 -> 0.0034s
2141-- add_index(:repo_counts, :repository_id)
2142 -> 0.0010s
2143== 20180222000009 CreateRepoCounts: migrated (0.0046s) ========================
2145== 20180222000012 CreateRepoCountsTriggers: migrating =========================
2146-- 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")
2147 -> 0.0111s
2148== 20180222000012 CreateRepoCountsTriggers: migrated (0.0129s) ================
2150== 20180222164100 DropAnnotations: migrating ==================================
2151-- drop_table(:annotations)
2152 -> 0.0022s
2153-- drop_table(:annotation_providers)
2154 -> 0.0017s
2155== 20180222164100 DropAnnotations: migrated (0.0040s) =========================
2157== 20180305143800 IndexBuildsOnRepositoryIdWhereStateNotFinished: migrating ===
2158-- execute("CREATE INDEX CONCURRENTLY index_builds_on_repository_id_where_state_not_finished ON builds (repository_id) WHERE state IN ('created', 'queued', 'received', 'started');")
2159 -> 0.0012s
2160== 20180305143800 IndexBuildsOnRepositoryIdWhereStateNotFinished: migrated (0.0012s)
2162== 20180321102400 IndexJobsOnRepositoryIdWhereStateRunning: migrating =========
2163-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_repository_id_where_state_running ON jobs (repository_id) WHERE state IN ('queued', 'received', 'started')")
2164 -> 0.0020s
2165== 20180321102400 IndexJobsOnRepositoryIdWhereStateRunning: migrated (0.0021s)
2167== 20180330000000 CreateRequestPayloads: migrating ============================
2168-- create_table(:request_payloads, {:id=>:integer})
2169 -> 0.0043s
2170-- add_index(:request_payloads, :request_id)
2171 -> 0.0009s
2172-- add_index(:request_payloads, [:created_at, :archived])
2173 -> 0.0009s
2174== 20180330000000 CreateRequestPayloads: migrated (0.0063s) ===================
2176== 20180331000000 CreateConfigs: migrating ====================================
2177-- create_table(:request_configs, {:id=>:integer})
2178 -> 0.0043s
2179-- create_table(:build_configs, {:id=>:integer})
2180 -> 0.0030s
2181-- create_table(:job_configs, {:id=>:integer})
2182 -> 0.0029s
2183-- add_index(:request_configs, [:repository_id, :key])
2184 -> 0.0010s
2185-- add_index(:build_configs, [:repository_id, :key])
2186 -> 0.0010s
2187-- add_index(:job_configs, [:repository_id, :key])
2188 -> 0.0009s
2189-- add_column(:requests, :config_id, :integer)
2190 -> 0.0012s
2191-- add_column(:builds, :config_id, :integer)
2192 -> 0.0007s
2193-- add_column(:jobs, :config_id, :integer)
2194 -> 0.0008s
2195== 20180331000000 CreateConfigs: migrated (0.0166s) ===========================
2197== 20180404000001 CreateInstallations: migrating ==============================
2198-- create_table(:installations, {:id=>:integer})
2199 -> 0.0072s
2200-- change_table(:repositories)
2201 -> 0.0018s
2202== 20180404000001 CreateInstallations: migrated (0.0091s) =====================
2204== 20180410000000 RequestsDropPayload: migrating ==============================
2205-- remove_column(:requests, :payload, :text)
2206 -> 0.0016s
2207== 20180410000000 RequestsDropPayload: migrated (0.0017s) =====================
2209== 20180413000000 IndexBranchesOnRepositoryIdAndNameAndId: migrating ==========
2210-- execute("CREATE INDEX CONCURRENTLY index_branches_on_repository_id_and_name_and_id ON branches (repository_id, name, id)")
2211 -> 0.0017s
2212-- execute("DROP INDEX CONCURRENTLY index_branches_on_repository_id_and_name")
2213 -> 0.0009s
2214== 20180413000000 IndexBranchesOnRepositoryIdAndNameAndId: migrated (0.0026s) =
2216== 20180417000000 IndexBuildsOrganizationsUsersOnUpdatedAt: migrating =========
2217-- execute("CREATE INDEX CONCURRENTLY index_builds_on_updated_at ON builds (updated_at)")
2218 -> 0.0014s
2219-- execute("CREATE INDEX CONCURRENTLY index_users_on_updated_at ON users (updated_at)")
2220 -> 0.0012s
2221-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_updated_at ON repositories (updated_at)")
2222 -> 0.0011s
2223-- execute("CREATE INDEX CONCURRENTLY index_organizations_on_updated_at ON organizations (updated_at)")
2224 -> 0.0009s
2225== 20180417000000 IndexBuildsOrganizationsUsersOnUpdatedAt: migrated (0.0047s)
2227== 20180420000000 ConstraintsAndIndexesForGhApps: migrating ===================
2228-- execute("CREATE UNIQUE INDEX CONCURRENTLY github_id_installations_idx ON installations (github_id)")
2229 -> 0.0008s
2230-- execute("CREATE INDEX CONCURRENTLY managed_repositories_idx ON repositories (managed_by_installation_at)")
2231 -> 0.0010s
2232-- execute("CREATE UNIQUE INDEX CONCURRENTLY owner_installations_idx ON installations (owner_id, owner_type) WHERE removed_by_id IS NULL")
2233 -> 0.0011s
2234== 20180420000000 ConstraintsAndIndexesForGhApps: migrated (0.0030s) ==========
2236== 20180425000000 IndexActiveOnOrg: migrating =================================
2237-- execute("CREATE INDEX CONCURRENTLY index_active_on_org ON repositories (active_on_org)")
2238 -> 0.0018s
2239== 20180425000000 IndexActiveOnOrg: migrated (0.0018s) ========================
2241== 20180425100000 AddRemovedAtOnInstallations: migrating ======================
2242-- add_column(:installations, :removed_at, :timestamp, {:precision=>nil})
2243 -> 0.0016s
2244== 20180425100000 AddRemovedAtOnInstallations: migrated (0.0017s) =============
2246== 20180429000000 IndexRepositoriesOnOwnerNameAndName: migrating ==============
2247-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_owner_name_and_name ON repositories (owner_name, name) WHERE invalidated_at IS NULL")
2248 -> 0.0016s
2249== 20180429000000 IndexRepositoriesOnOwnerNameAndName: migrated (0.0016s) =====
2251== 20180501000000 IndexJobsOnOwnerWhereStateRunning: migrating ================
2252-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_owner_where_state_running ON jobs (owner_id, owner_type) WHERE state IN ('queued', 'received', 'started')")
2253 -> 0.0016s
2254== 20180501000000 IndexJobsOnOwnerWhereStateRunning: migrated (0.0017s) =======
2256== 20180517000000 IndexRequestsConfigId: migrating ============================
2257-- execute("CREATE INDEX CONCURRENTLY index_requests_on_config_id ON requests (config_id)")
2258 -> 0.0014s
2259== 20180517000000 IndexRequestsConfigId: migrated (0.0015s) ===================
2261== 20180517000001 IndexBuildsConfigId: migrating ==============================
2262-- execute("CREATE INDEX CONCURRENTLY index_builds_on_config_id ON requests (config_id)")
2263 -> 0.0011s
2264== 20180517000001 IndexBuildsConfigId: migrated (0.0012s) =====================
2266== 20180517000002 IndexJobsConfigId: migrating ================================
2267-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_config_id ON requests (config_id)")
2268 -> 0.0010s
2269== 20180517000002 IndexJobsConfigId: migrated (0.0011s) =======================
2271== 20180518000000 IndexBuildsOnMultiple: migrating ============================
2272-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_builds_on_repo_branch_event_type_and_private ON builds (repository_id, branch, event_type, private)")
2273 -> 0.0016s
2274== 20180518000000 IndexBuildsOnMultiple: migrated (0.0016s) ===================
2276== 20180522000000 AddActiveFlagToCrons: migrating =============================
2277-- change_table(:crons)
2278 -> 0.0051s
2279-- add_index(:crons, :next_run, {:where=>"(active IS TRUE)", :algorithm=>:concurrently})
2280 -> 0.0014s
2281== 20180522000000 AddActiveFlagToCrons: migrated (0.0066s) ====================
2283== 20180531000000 CreateRequestYamlConfigs: migrating =========================
2284-- create_table(:request_yaml_configs, {:id=>:integer})
2285 -> 0.0027s
2286-- add_index(:request_yaml_configs, [:repository_id, :key])
2287 -> 0.0008s
2288-- add_column(:requests, :yaml_config_id, :integer)
2289 -> 0.0006s
2290== 20180531000000 CreateRequestYamlConfigs: migrated (0.0042s) ================
2292== 20180606000000 IndexCommitsOnRepositoryId: migrating =======================
2293-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_commits_on_repository_id ON commits (repository_id)")
2294 -> 0.0009s
2295== 20180606000000 IndexCommitsOnRepositoryId: migrated (0.0009s) ==============
2297== 20180606000001 IndexJobsOnRepositoryId: migrating ==========================
2298-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_jobs_on_repository_id ON jobs (repository_id)")
2299 -> 0.0010s
2300== 20180606000001 IndexJobsOnRepositoryId: migrated (0.0011s) =================
2302== 20180614000000 DropRequestsConfig: migrating ===============================
2303-- remove_column(:requests, :config)
2304 -> 0.0007s
2305== 20180614000000 DropRequestsConfig: migrated (0.0008s) ======================
2307== 20180614000001 DropBuildsConfig: migrating =================================
2308-- remove_column(:builds, :config)
2309 -> 0.0007s
2310== 20180614000001 DropBuildsConfig: migrated (0.0008s) ========================
2312== 20180614000002 DropJobsConfig: migrating ===================================
2313-- remove_column(:jobs, :config)
2314 -> 0.0007s
2315== 20180614000002 DropJobsConfig: migrated (0.0008s) ==========================
2317== 20180620000000 IndexBuildsOnRepositoryIdEventTypeId: migrating =============
2318-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_builds_on_repository_id_event_type_id ON builds (repository_id, event_type, id DESC)")
2319 -> 0.0012s
2320== 20180620000000 IndexBuildsOnRepositoryIdEventTypeId: migrated (0.0013s) ====
2322== 20180725000000 CreateCancellations: migrating ==============================
2323-- create_table(:cancellations, {:id=>:integer})
2324 -> 0.0044s
2325== 20180725000000 CreateCancellations: migrated (0.0045s) =====================
2327== 20180726000000 CommitsIndexAuthorEmail: migrating ==========================
2328-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_commits_on_author_email ON commits (author_email)")
2329 -> 0.0009s
2330== 20180726000000 CommitsIndexAuthorEmail: migrated (0.0009s) =================
2332== 20180726000001 CommitsIndexCommitterEmail: migrating =======================
2333-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_commits_on_committer_email ON commits (committer_email)")
2334 -> 0.0008s
2335== 20180726000001 CommitsIndexCommitterEmail: migrated (0.0009s) ==============
2337== 20180801000001 UsersAddRedactedAt: migrating ===============================
2338-- change_table(:users)
2339 -> 0.0008s
2340== 20180801000001 UsersAddRedactedAt: migrated (0.0009s) ======================
2342== 20180822000000 CreateEmailUnsubscribes: migrating ==========================
2343-- create_table(:email_unsubscribes, {:id=>:integer})
2344 -> 0.0044s
2345== 20180822000000 CreateEmailUnsubscribes: migrated (0.0045s) =================
2347== 20180823000000 AddPreferences: migrating ===================================
2348-- change_table(:users)
2349 -> 0.0012s
2350== 20180823000000 AddPreferences: migrated (0.0013s) ==========================
2352== 20180828000000 ChangePreferencesDefault: migrating =========================
2353-- change_column_default(:users, :preferences, {})
2354 -> 0.0040s
2355== 20180828000000 ChangePreferencesDefault: migrated (0.0041s) ================
2357== 20180829000000 MakeEmailUnsubscribesIdBigint: migrating ====================
2358-- change_column(:email_unsubscribes, :id, :bigint)
2359 -> 0.0033s
2360== 20180829000000 MakeEmailUnsubscribesIdBigint: migrated (0.0034s) ===========
2362== 20180830000001 JobsAddRestartedAt: migrating ===============================
2363-- change_table(:jobs)
2364 -> 0.0009s
2365== 20180830000001 JobsAddRestartedAt: migrated (0.0009s) ======================
2367== 20180830000002 BuildsAddRestartedAt: migrating =============================
2368-- change_table(:builds)
2369 -> 0.0008s
2370== 20180830000002 BuildsAddRestartedAt: migrated (0.0009s) ====================
2372== 20180830000003 JobVersionsCreate: migrating ================================
2373-- create_table(:job_versions, {:id=>:integer})
2374 -> 0.0031s
2375== 20180830000003 JobVersionsCreate: migrated (0.0032s) =======================
2377== 20180903000000 JobConfigsIndexConfigResourcesGpu: migrating ================
2378-- 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")
2379 -> 0.0006s
2380-- 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")
2381 -> 0.0013s
2382== 20180903000000 JobConfigsIndexConfigResourcesGpu: migrated (0.0019s) =======
2384== 20180903000001 FixIndexesOnBuildsAndJobsConfigId: migrating ================
2385-- execute("DROP INDEX index_builds_on_config_id")
2386 -> 0.0007s
2387-- execute("CREATE INDEX CONCURRENTLY index_builds_on_config_id ON builds (config_id)")
2388 -> 0.0010s
2389-- execute("DROP INDEX index_jobs_on_config_id")
2390 -> 0.0006s
2391-- execute("CREATE INDEX CONCURRENTLY index_jobs_on_config_id ON jobs (config_id)")
2392 -> 0.0009s
2393== 20180903000001 FixIndexesOnBuildsAndJobsConfigId: migrated (0.0034s) =======
2395== 20180904000001 CreateJobConfigsGpu: migrating ==============================
2396-- 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")
2397 -> 0.0018s
2398== 20180904000001 CreateJobConfigsGpu: migrated (0.0018s) =====================
2400== 20180906000000 AddIndexUsersPreferencesBuildEmails: migrating ==============
2401-- execute("CREATE INDEX CONCURRENTLY user_preferences_build_emails_false ON users (id) WHERE preferences->>'build_emails' = 'false';\n")
2402 -> 0.0011s
2403== 20180906000000 AddIndexUsersPreferencesBuildEmails: migrated (0.0011s) =====
2405== 20181002115306 DeleteDuplicateRecordsFromMemberships: migrating ============
2406-- 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")
2407 -> 0.0015s
2408== 20181002115306 DeleteDuplicateRecordsFromMemberships: migrated (0.0016s) ===
2410== 20181002115307 AddConstraintOnOrganizationAndUserToMemberships: migrating ==
2411-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_organization_id_and_user_id_on_memberships ON memberships USING btree (organization_id, user_id);\n")
2412 -> 0.0009s
2413== 20181002115307 AddConstraintOnOrganizationAndUserToMemberships: migrated (0.0010s)
2415== 20181018000000 IndexBuildsOnCreatedAt: migrating ===========================
2416-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_builds_on_created_at ON builds (created_at)")
2417 -> 0.0010s
2418== 20181018000000 IndexBuildsOnCreatedAt: migrated (0.0011s) ==================
2420== 20181029120000 AddMigrationStatusColumnToRepositories: migrating ===========
2421-- add_column(:repositories, :migration_status, :string)
2422 -> 0.0008s
2423== 20181029120000 AddMigrationStatusColumnToRepositories: migrated (0.0009s) ==
2425== 20181113120000 AddGithubGuidColumnToRequests: migrating ====================
2426-- add_column(:requests, :github_guid, :text)
2427 -> 0.0007s
2428-- add_index(:requests, :github_guid, {:algorithm=>:concurrently, :unique=>true})
2429 -> 0.0010s
2430== 20181113120000 AddGithubGuidColumnToRequests: migrated (0.0018s) ===========
2432== 20181116800000 AddConstraintsToMultipleTables: migrating ===================
2433-- 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")
2434 -> 0.0014s
2435-- 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")
2436 -> 0.0008s
2437-- execute("ALTER TABLE builds ADD CONSTRAINT fk_builds_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) NOT VALID")
2438 -> 0.0008s
2439-- execute("ALTER TABLE builds ADD CONSTRAINT fk_builds_on_commit_id FOREIGN KEY (commit_id) REFERENCES commits(id) NOT VALID")
2440 -> 0.0009s
2441-- execute("ALTER TABLE builds ADD CONSTRAINT fk_builds_on_request_id FOREIGN KEY (request_id) REFERENCES requests(id) NOT VALID")
2442 -> 0.0009s
2443-- execute("ALTER TABLE builds ADD CONSTRAINT fk_builds_on_pull_request_id FOREIGN KEY (pull_request_id) REFERENCES pull_requests(id) NOT VALID")
2444 -> 0.0009s
2445-- execute("ALTER TABLE builds ADD CONSTRAINT fk_builds_on_branch_id FOREIGN KEY (branch_id) REFERENCES branches(id) NOT VALID")
2446 -> 0.0008s
2447-- execute("ALTER TABLE builds ADD CONSTRAINT fk_builds_on_tag_id FOREIGN KEY (tag_id) REFERENCES tags(id) NOT VALID")
2448 -> 0.0009s
2449-- execute("ALTER TABLE builds ADD CONSTRAINT fk_builds_on_config_id FOREIGN KEY (config_id) REFERENCES build_configs(id) NOT VALID")
2450 -> 0.0008s
2451-- execute("ALTER TABLE jobs ADD CONSTRAINT fk_jobs_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) NOT VALID")
2452 -> 0.0008s
2453-- execute("ALTER TABLE jobs ADD CONSTRAINT fk_jobs_on_commit_id FOREIGN KEY (commit_id) REFERENCES commits(id) NOT VALID")
2454 -> 0.0012s
2455-- execute("ALTER TABLE jobs ADD CONSTRAINT fk_jobs_on_stage_id FOREIGN KEY (stage_id) REFERENCES stages(id) NOT VALID")
2456 -> 0.0008s
2457-- execute("ALTER TABLE jobs ADD CONSTRAINT fk_jobs_on_config_id FOREIGN KEY (config_id) REFERENCES job_configs(id) NOT VALID")
2458 -> 0.0008s
2459-- execute("ALTER TABLE branches ADD CONSTRAINT fk_branches_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) NOT VALID")
2460 -> 0.0007s
2461-- 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")
2462 -> 0.0008s
2463-- execute("ALTER TABLE tags ADD CONSTRAINT fk_tags_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) NOT VALID")
2464 -> 0.0008s
2465-- 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")
2466 -> 0.0008s
2467-- execute("ALTER TABLE commits ADD CONSTRAINT fk_commits_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) NOT VALID")
2468 -> 0.0008s
2469-- execute("ALTER TABLE commits ADD CONSTRAINT fk_commits_on_branch_id FOREIGN KEY (branch_id) REFERENCES branches(id) NOT VALID")
2470 -> 0.0008s
2471-- execute("ALTER TABLE commits ADD CONSTRAINT fk_commits_on_tag_id FOREIGN KEY (tag_id) REFERENCES tags(id) NOT VALID")
2472 -> 0.0007s
2473-- execute("ALTER TABLE crons ADD CONSTRAINT fk_crons_on_branch_id FOREIGN KEY (branch_id) REFERENCES branches(id) NOT VALID")
2474 -> 0.0007s
2475-- execute("ALTER TABLE job_configs ADD CONSTRAINT fk_job_configs_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) NOT VALID")
2476 -> 0.0007s
2477-- execute("ALTER TABLE build_configs ADD CONSTRAINT fk_build_configs_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) NOT VALID")
2478 -> 0.0009s
2479-- execute("ALTER TABLE pull_requests ADD CONSTRAINT fk_pull_requests_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) NOT VALID")
2480 -> 0.0008s
2481-- execute("ALTER TABLE ssl_keys ADD CONSTRAINT fk_ssl_keys_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) NOT VALID")
2482 -> 0.0008s
2483-- execute("ALTER TABLE requests ADD CONSTRAINT fk_requests_on_commit_id FOREIGN KEY (commit_id) REFERENCES commits(id) NOT VALID")
2484 -> 0.0008s
2485-- execute("ALTER TABLE requests ADD CONSTRAINT fk_requests_on_pull_request_id FOREIGN KEY (pull_request_id) REFERENCES pull_requests(id) NOT VALID")
2486 -> 0.0008s
2487-- execute("ALTER TABLE requests ADD CONSTRAINT fk_requests_on_branch_id FOREIGN KEY (branch_id) REFERENCES branches(id) NOT VALID")
2488 -> 0.0008s
2489-- execute("ALTER TABLE requests ADD CONSTRAINT fk_requests_on_tag_id FOREIGN KEY (tag_id) REFERENCES tags(id) NOT VALID")
2490 -> 0.0008s
2491-- execute("ALTER TABLE requests ADD CONSTRAINT fk_requests_on_config_id FOREIGN KEY (config_id) REFERENCES request_configs(id) NOT VALID")
2492 -> 0.0008s
2493-- execute("ALTER TABLE stages ADD CONSTRAINT fk_stages_on_build_id FOREIGN KEY (build_id) REFERENCES builds(id) NOT VALID")
2494 -> 0.0008s
2495== 20181116800000 AddConstraintsToMultipleTables: migrated (0.0271s) ==========
2497== 20181116800001 ValidateConstraints: migrating ==============================
2498-- execute("ALTER TABLE repositories VALIDATE CONSTRAINT fk_repositories_on_current_build_id")
2499 -> 0.0025s
2500-- execute("ALTER TABLE repositories VALIDATE CONSTRAINT fk_repositories_on_last_build_id")
2501 -> 0.0010s
2502-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_builds_on_repository_id")
2503 -> 0.0009s
2504-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_builds_on_commit_id")
2505 -> 0.0011s
2506-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_builds_on_request_id")
2507 -> 0.0013s
2508-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_builds_on_pull_request_id")
2509 -> 0.0010s
2510-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_builds_on_branch_id")
2511 -> 0.0011s
2512-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_builds_on_tag_id")
2513 -> 0.0010s
2514-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_builds_on_config_id")
2515 -> 0.0009s
2516-- execute("ALTER TABLE jobs VALIDATE CONSTRAINT fk_jobs_on_repository_id")
2517 -> 0.0013s
2518-- execute("ALTER TABLE jobs VALIDATE CONSTRAINT fk_jobs_on_commit_id")
2519 -> 0.0008s
2520-- execute("ALTER TABLE jobs VALIDATE CONSTRAINT fk_jobs_on_stage_id")
2521 -> 0.0010s
2522-- execute("ALTER TABLE jobs VALIDATE CONSTRAINT fk_jobs_on_config_id")
2523 -> 0.0008s
2524-- execute("ALTER TABLE branches VALIDATE CONSTRAINT fk_branches_on_repository_id")
2525 -> 0.0007s
2526-- execute("ALTER TABLE branches VALIDATE CONSTRAINT fk_branches_on_last_build_id")
2527 -> 0.0007s
2528-- execute("ALTER TABLE tags VALIDATE CONSTRAINT fk_tags_on_repository_id")
2529 -> 0.0007s
2530-- execute("ALTER TABLE tags VALIDATE CONSTRAINT fk_tags_on_last_build_id")
2531 -> 0.0007s
2532-- execute("ALTER TABLE commits VALIDATE CONSTRAINT fk_commits_on_repository_id")
2533 -> 0.0008s
2534-- execute("ALTER TABLE commits VALIDATE CONSTRAINT fk_commits_on_branch_id")
2535 -> 0.0007s
2536-- execute("ALTER TABLE commits VALIDATE CONSTRAINT fk_commits_on_tag_id")
2537 -> 0.0006s
2538-- execute("ALTER TABLE crons VALIDATE CONSTRAINT fk_crons_on_branch_id")
2539 -> 0.0009s
2540-- execute("ALTER TABLE job_configs VALIDATE CONSTRAINT fk_job_configs_on_repository_id")
2541 -> 0.0007s
2542-- execute("ALTER TABLE build_configs VALIDATE CONSTRAINT fk_build_configs_on_repository_id")
2543 -> 0.0007s
2544-- execute("ALTER TABLE pull_requests VALIDATE CONSTRAINT fk_pull_requests_on_repository_id")
2545 -> 0.0007s
2546-- execute("ALTER TABLE ssl_keys VALIDATE CONSTRAINT fk_ssl_keys_on_repository_id")
2547 -> 0.0009s
2548-- execute("ALTER TABLE requests VALIDATE CONSTRAINT fk_requests_on_commit_id")
2549 -> 0.0007s
2550-- execute("ALTER TABLE requests VALIDATE CONSTRAINT fk_requests_on_pull_request_id")
2551 -> 0.0007s
2552-- execute("ALTER TABLE requests VALIDATE CONSTRAINT fk_requests_on_branch_id")
2553 -> 0.0007s
2554-- execute("ALTER TABLE requests VALIDATE CONSTRAINT fk_requests_on_tag_id")
2555 -> 0.0007s
2556-- execute("ALTER TABLE requests VALIDATE CONSTRAINT fk_requests_on_config_id")
2557 -> 0.0008s
2558-- execute("ALTER TABLE stages VALIDATE CONSTRAINT fk_stages_on_build_id")
2559 -> 0.0008s
2560== 20181116800001 ValidateConstraints: migrated (0.0288s) =====================
2562== 20181126080000 AddIndexesForForeignKeys: migrating =========================
2563-- index_exists?(:builds, :branch_id)
2564 -> 0.0096s
2565-- add_index(:builds, :branch_id, {:algorithm=>:concurrently})
2566 -> 0.0013s
2567-- index_exists?(:builds, :commit_id)
2568 -> 0.0099s
2569-- add_index(:builds, :commit_id, {:algorithm=>:concurrently})
2570 -> 0.0013s
2571-- index_exists?(:builds, :pull_request_id)
2572 -> 0.0098s
2573-- add_index(:builds, :pull_request_id, {:algorithm=>:concurrently})
2574 -> 0.0013s
2575-- index_exists?(:builds, :tag_id)
2576 -> 0.0102s
2577-- add_index(:builds, :tag_id, {:algorithm=>:concurrently})
2578 -> 0.0012s
2579-- index_exists?(:jobs, :commit_id)
2580 -> 0.0068s
2581-- add_index(:jobs, :commit_id, {:algorithm=>:concurrently})
2582 -> 0.0011s
2583-- index_exists?(:branches, :last_build_id)
2584 -> 0.0030s
2585-- add_index(:branches, :last_build_id, {:algorithm=>:concurrently})
2586 -> 0.0010s
2587-- index_exists?(:tags, :repository_id)
2588 -> 0.0024s
2589-- add_index(:tags, :repository_id, {:algorithm=>:concurrently})
2590 -> 0.0009s
2591-- index_exists?(:tags, :last_build_id)
2592 -> 0.0028s
2593-- add_index(:tags, :last_build_id, {:algorithm=>:concurrently})
2594 -> 0.0010s
2595-- index_exists?(:commits, :tag_id)
2596 -> 0.0036s
2597-- add_index(:commits, :tag_id, {:algorithm=>:concurrently})
2598 -> 0.0010s
2599-- index_exists?(:commits, :branch_id)
2600 -> 0.0036s
2601-- add_index(:commits, :branch_id, {:algorithm=>:concurrently})
2602 -> 0.0010s
2603-- index_exists?(:job_configs, :repository_id)
2604 -> 0.0019s
2605-- add_index(:job_configs, :repository_id, {:algorithm=>:concurrently})
2606 -> 0.0009s
2607-- index_exists?(:build_configs, :repository_id)
2608 -> 0.0016s
2609-- add_index(:build_configs, :repository_id, {:algorithm=>:concurrently})
2610 -> 0.0009s
2611-- index_exists?(:pull_requests, :repository_id)
2612 -> 0.0025s
2613-- add_index(:pull_requests, :repository_id, {:algorithm=>:concurrently})
2614 -> 0.0009s
2615-- index_exists?(:requests, :pull_request_id)
2616 -> 0.0049s
2617-- add_index(:requests, :pull_request_id, {:algorithm=>:concurrently})
2618 -> 0.0010s
2619-- index_exists?(:requests, :tag_id)
2620 -> 0.0052s
2621-- add_index(:requests, :tag_id, {:algorithm=>:concurrently})
2622 -> 0.0010s
2623-- index_exists?(:requests, :branch_id)
2624 -> 0.0056s
2625-- add_index(:requests, :branch_id, {:algorithm=>:concurrently})
2626 -> 0.0010s
2627-- index_exists?(:repositories, :current_build_id)
2628 -> 0.0061s
2629-- add_index(:repositories, :current_build_id, {:algorithm=>:concurrently})
2630 -> 0.0010s
2631-- index_exists?(:repositories, :last_build_id)
2632 -> 0.0061s
2633-- add_index(:repositories, :last_build_id, {:algorithm=>:concurrently})
2634 -> 0.0011s
2635-- index_exists?(:crons, :branch_id)
2636 -> 0.0025s
2637-- add_index(:crons, :branch_id, {:algorithm=>:concurrently})
2638 -> 0.0010s
2639== 20181126080000 AddIndexesForForeignKeys: migrated (0.1198s) ================
2641== 20181128120000 AddUniqueIndexToBranchesOnRepositoryIdAndName: migrating ====
2642-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_branches_on_repository_id_and_name ON branches(repository_id, name)")
2643 -> 0.0010s
2644== 20181128120000 AddUniqueIndexToBranchesOnRepositoryIdAndName: migrated (0.0010s)
2646== 20181203075818 AddUniqueNameColumnToBranches: migrating ====================
2647-- add_column(:branches, :unique_name, :text)
2648 -> 0.0008s
2649== 20181203075818 AddUniqueNameColumnToBranches: migrated (0.0009s) ===========
2651== 20181203075819 AddSetUniqueNameTriggerToBranches: migrating ================
2652-- 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")
2653 -> 0.0011s
2654== 20181203075819 AddSetUniqueNameTriggerToBranches: migrated (0.0013s) =======
2656== 20181203080356 CreateIndexOnBranchesUniqueNameAndRepositoryId: migrating ===
2657-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_branches_repository_id_unique_name ON branches(repository_id, unique_name) WHERE unique_name IS NOT NULL")
2658 -> 0.0013s
2659== 20181203080356 CreateIndexOnBranchesUniqueNameAndRepositoryId: migrated (0.0013s)
2661== 20181205152712 AddUniqueIndexToCronsOnBranchId: migrating ==================
2662-- execute("DROP INDEX CONCURRENTLY index_crons_on_branch_id")
2663 -> 0.0009s
2664-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_crons_on_branch_id ON crons(branch_id)")
2665 -> 0.0009s
2666== 20181205152712 AddUniqueIndexToCronsOnBranchId: migrated (0.0019s) =========
2668== 20190102000000 AddOrganizationPreferences: migrating =======================
2669-- change_table(:organizations)
2670 -> 0.0013s
2671== 20190102000000 AddOrganizationPreferences: migrated (0.0014s) ==============
2673== 20190102000001 ChangeOrganizationPreferencesDefault: migrating =============
2674-- change_column_default(:organizations, :preferences, {})
2675 -> 0.0042s
2676== 20190102000001 ChangeOrganizationPreferencesDefault: migrated (0.0042s) ====
2678== 20190109000000 CreateBetaMigrationRequestTable: migrating ==================
2679-- create_table(:beta_migration_requests, {:id=>:integer})
2680 -> 0.0034s
2681-- add_index(:beta_migration_requests, [:owner_type, :owner_id])
2682 -> 0.0008s
2683== 20190109000000 CreateBetaMigrationRequestTable: migrated (0.0043s) =========
2685== 20190118000000 AddBetaMigrationRequestColumnToOrganizations: migrating =====
2686-- add_column(:organizations, :beta_migration_request_id, :integer)
2687 -> 0.0009s
2688== 20190118000000 AddBetaMigrationRequestColumnToOrganizations: migrated (0.0009s)
2690== 20190204000000 MakeSubscriptionOwnerNotNullable: migrating =================
2691-- change_column_null(:subscriptions, :owner_type, false)
2692 -> 0.0007s
2693-- change_column_null(:subscriptions, :owner_id, false)
2694 -> 0.0004s
2695== 20190204000000 MakeSubscriptionOwnerNotNullable: migrated (0.0012s) ========
2697== 20190313000000 RequestRawConfigsCreate: migrating ==========================
2698-- create_table(:request_raw_configs, {:id=>:integer})
2699 -> 0.0030s
2700-- add_index(:request_raw_configs, [:repository_id, :key])
2701 -> 0.0008s
2702-- create_table(:request_raw_configurations, {:id=>:integer})
2703 -> 0.0027s
2704-- add_index(:request_raw_configurations, :request_id)
2705 -> 0.0007s
2706-- add_index(:request_raw_configurations, :request_raw_config_id)
2707 -> 0.0006s
2708== 20190313000000 RequestRawConfigsCreate: migrated (0.0080s) =================
2710== 20190329093854 CreateGatekeeperWorkers: migrating ==========================
2711-- create_table(:gatekeeper_workers)
2712 -> 0.0021s
2713-- execute("INSERT INTO gatekeeper_workers(id) SELECT generate_series(1,200) as id;")
2714 -> 0.0010s
2715== 20190329093854 CreateGatekeeperWorkers: migrated (0.0032s) =================
2717== 20190409133118 AddUniqueNumberColumnToBuilds: migrating ====================
2718-- add_column(:builds, :unique_number, :int)
2719 -> 0.0009s
2720== 20190409133118 AddUniqueNumberColumnToBuilds: migrated (0.0009s) ===========
2722== 20190409133320 AddSetUniqueNumberTriggerToBuilds: migrating ================
2723-- 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")
2724 -> 0.0012s
2725== 20190409133320 AddSetUniqueNumberTriggerToBuilds: migrated (0.0014s) =======
2727== 20190409133444 CreateUniqueIndexOnRepositoryIdAndNumberOnBuilds: migrating =
2728-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_builds_repository_id_unique_number ON builds(repository_id, unique_number) WHERE unique_number IS NOT NULL")
2729 -> 0.0012s
2730== 20190409133444 CreateUniqueIndexOnRepositoryIdAndNumberOnBuilds: migrated (0.0012s)
2732== 20190410121039 MakeSetUniqueNumberTriggerRunOnlyOnInsert: migrating ========
2733-- 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")
2734 -> 0.0009s
2735== 20190410121039 MakeSetUniqueNumberTriggerRunOnlyOnInsert: migrated (0.0009s)
2737== 20190416071629 RemoveUniqueNameFromBranches: migrating =====================
2738-- execute("drop index concurrently index_branches_repository_id_unique_name;")
2739 -> 0.0009s
2740-- execute("DROP TRIGGER IF EXISTS set_unique_name_on_branches ON branches;\nDROP FUNCTION IF EXISTS set_unique_name();\n\n")
2741 -> 0.0005s
2742-- remove_column(:branches, :unique_name)
2743 -> 0.0005s
2744== 20190416071629 RemoveUniqueNameFromBranches: migrated (0.0020s) ============
2746== 20190417072423 AlterBuildsUniqueNumberIndex: migrating =====================
2747-- 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")
2748 -> 0.0013s
2749-- execute("DROP INDEX CONCURRENTLY index_builds_repository_id_unique_number")
2750 -> 0.0008s
2751-- execute("ALTER INDEX index_builds_repository_id_unique_number_new RENAME TO index_builds_repository_id_unique_number")
2752 -> 0.0004s
2753== 20190417072423 AlterBuildsUniqueNumberIndex: migrated (0.0026s) ============
2755== 20190417072838 ReinstallSetUniqueNumberTrigger: migrating ==================
2756-- execute("DROP TRIGGER IF EXISTS set_unique_number_on_builds ON builds;\nDROP FUNCTION IF EXISTS set_unique_number();\n")
2757 -> 0.0007s
2758-- 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")
2759 -> 0.0008s
2760== 20190417072838 ReinstallSetUniqueNumberTrigger: migrated (0.0018s) =========
2762== 20190502175059 AddMergeableStateToPullRequests: migrating ==================
2763-- add_column(:pull_requests, :mergeable_state, :string)
2764 -> 0.0008s
2765== 20190502175059 AddMergeableStateToPullRequests: migrated (0.0008s) =========
2767== 20190510121000 AddReposIndexOnLowerOwnerNameAndName: migrating =============
2768-- 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")
2769 -> 0.0010s
2770== 20190510121000 AddReposIndexOnLowerOwnerNameAndName: migrated (0.0011s) ====
2772== 20190605121000 AddHistoryMigrationStatusToRepositories: migrating ==========
2773-- add_column(:repositories, :history_migration_status, :string)
2774 -> 0.0006s
2775== 20190605121000 AddHistoryMigrationStatusToRepositories: migrated (0.0007s) =
2777== 20190605155459 AddPullRequestMergeableToRequests: migrating ================
2778-- add_column(:requests, :pull_request_mergeable, :string)
2779 -> 0.0014s
2780== 20190605155459 AddPullRequestMergeableToRequests: migrated (0.0015s) =======
2782== 20190613120000 SoftDeleteRepositoryAlongWithItsData: migrating =============
2783-- execute("create table if not exists deleted_builds (like builds)")
2784 -> 0.0040s
2785-- execute("create table if not exists deleted_stages (like stages)")
2786 -> 0.0012s
2787-- execute("create table if not exists deleted_jobs (like jobs)")
2788 -> 0.0016s
2789-- execute("create table if not exists deleted_requests (like requests)")
2790 -> 0.0085s
2791-- execute("create table if not exists deleted_commits (like commits)")
2792 -> 0.0015s
2793-- execute("create table if not exists deleted_pull_requests (like pull_requests)")
2794 -> 0.0037s
2795-- execute("create table if not exists deleted_job_configs (like job_configs)")
2796 -> 0.0012s
2797-- execute("create table if not exists deleted_build_configs (like build_configs)")
2798 -> 0.0034s
2799-- execute("create table if not exists deleted_request_configs (like request_configs)")
2800 -> 0.0012s
2801-- execute("create table if not exists deleted_request_payloads (like request_payloads)")
2802 -> 0.0043s
2803-- execute("create table if not exists deleted_ssl_keys (like ssl_keys)")
2804 -> 0.0014s
2805-- execute("create table if not exists deleted_tags (like tags)")
2806 -> 0.0013s
2807-- 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")
2808 -> 0.0024s
2809== 20190613120000 SoftDeleteRepositoryAlongWithItsData: migrated (0.0363s) ====
2811== 20190618082559 AddVcsTypeToUser: migrating =================================
2812-- add_column(:users, :vcs_type, :string, {:default=>nil})
2813 -> 0.0014s
2814-- execute("ALTER TABLE users ALTER COLUMN vcs_type SET DEFAULT 'GithubUser'")
2815 -> 0.0005s
2816-- select_value("SELECT id FROM users ORDER BY id DESC LIMIT 1")
2817 -> 0.0011s
2818-- execute("UPDATE users SET vcs_type = 'GithubUser' WHERE id BETWEEN 0 AND 5000")
2819 -> 0.0007s
2820== 20190618082559 AddVcsTypeToUser: migrated (0.0045s) ========================
2822== 20190701082559 AddVcsTypeToRepository: migrating ===========================
2823-- add_column(:repositories, :vcs_type, :string, {:default=>nil})
2824 -> 0.0012s
2825-- execute("ALTER TABLE repositories ALTER COLUMN vcs_type SET DEFAULT 'GithubRepository'")
2826 -> 0.0005s
2827-- select_value("SELECT id FROM repositories ORDER BY id DESC LIMIT 1")
2828 -> 0.0009s
2829-- execute("UPDATE repositories SET vcs_type = 'GithubRepository' WHERE id BETWEEN 0 AND 5000")
2830 -> 0.0007s
2831== 20190701082559 AddVcsTypeToRepository: migrated (0.0041s) ==================
2833== 20190704082559 AddVcsTypeToOrganization: migrating =========================
2834-- add_column(:organizations, :vcs_type, :string, {:default=>nil})
2835 -> 0.0011s
2836-- execute("ALTER TABLE organizations ALTER COLUMN vcs_type SET DEFAULT 'GithubOrganization'")
2837 -> 0.0004s
2838-- select_value("SELECT id FROM organizations ORDER BY id DESC LIMIT 1")
2839 -> 0.0009s
2840-- execute("UPDATE organizations SET vcs_type = 'GithubOrganization' WHERE id BETWEEN 0 AND 5000")
2841 -> 0.0007s
2842== 20190704082559 AddVcsTypeToOrganization: migrated (0.0036s) ================
2844== 20190718092750 AddDeleteCascadeToForeignKeys: migrating ====================
2845-- execute("ALTER TABLE builds ADD CONSTRAINT fk_new_builds_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) ON DELETE CASCADE NOT VALID")
2846 -> 0.0014s
2847-- execute("ALTER TABLE builds ADD CONSTRAINT fk_new_builds_on_commit_id FOREIGN KEY (commit_id) REFERENCES commits(id) ON DELETE CASCADE NOT VALID")
2848 -> 0.0009s
2849-- execute("ALTER TABLE builds ADD CONSTRAINT fk_new_builds_on_request_id FOREIGN KEY (request_id) REFERENCES requests(id) ON DELETE CASCADE NOT VALID")
2850 -> 0.0010s
2851-- 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")
2852 -> 0.0009s
2853-- execute("ALTER TABLE builds ADD CONSTRAINT fk_new_builds_on_branch_id FOREIGN KEY (branch_id) REFERENCES branches(id) ON DELETE CASCADE NOT VALID")
2854 -> 0.0009s
2855-- execute("ALTER TABLE builds ADD CONSTRAINT fk_new_builds_on_tag_id FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE CASCADE NOT VALID")
2856 -> 0.0009s
2857-- 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")
2858 -> 0.0008s
2859-- execute("ALTER TABLE jobs ADD CONSTRAINT fk_new_jobs_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) ON DELETE CASCADE NOT VALID")
2860 -> 0.0009s
2861-- execute("ALTER TABLE jobs ADD CONSTRAINT fk_new_jobs_on_commit_id FOREIGN KEY (commit_id) REFERENCES commits(id) ON DELETE CASCADE NOT VALID")
2862 -> 0.0008s
2863-- execute("ALTER TABLE jobs ADD CONSTRAINT fk_new_jobs_on_stage_id FOREIGN KEY (stage_id) REFERENCES stages(id) ON DELETE CASCADE NOT VALID")
2864 -> 0.0008s
2865-- 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")
2866 -> 0.0008s
2867-- execute("ALTER TABLE branches ADD CONSTRAINT fk_new_branches_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) ON DELETE CASCADE NOT VALID")
2868 -> 0.0008s
2869-- execute("ALTER TABLE tags ADD CONSTRAINT fk_new_tags_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) ON DELETE CASCADE NOT VALID")
2870 -> 0.0050s
2871-- execute("ALTER TABLE commits ADD CONSTRAINT fk_new_commits_on_repository_id FOREIGN KEY (repository_id) REFERENCES repositories(id) ON DELETE CASCADE NOT VALID")
2872 -> 0.0008s
2873-- execute("ALTER TABLE commits ADD CONSTRAINT fk_new_commits_on_branch_id FOREIGN KEY (branch_id) REFERENCES branches(id) ON DELETE CASCADE NOT VALID")
2874 -> 0.0008s
2875-- execute("ALTER TABLE commits ADD CONSTRAINT fk_new_commits_on_tag_id FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE CASCADE NOT VALID")
2876 -> 0.0008s
2877-- execute("ALTER TABLE crons ADD CONSTRAINT fk_new_crons_on_branch_id FOREIGN KEY (branch_id) REFERENCES branches(id) ON DELETE CASCADE NOT VALID")
2878 -> 0.0008s
2879-- 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")
2880 -> 0.0009s
2881-- 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")
2882 -> 0.0009s
2883-- 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")
2884 -> 0.0008s
2885-- 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")
2886 -> 0.0008s
2887-- execute("ALTER TABLE requests ADD CONSTRAINT fk_new_requests_on_commit_id FOREIGN KEY (commit_id) REFERENCES commits(id) ON DELETE CASCADE NOT VALID")
2888 -> 0.0008s
2889-- 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")
2890 -> 0.0008s
2891-- execute("ALTER TABLE requests ADD CONSTRAINT fk_new_requests_on_branch_id FOREIGN KEY (branch_id) REFERENCES branches(id) ON DELETE CASCADE NOT VALID")
2892 -> 0.0009s
2893-- execute("ALTER TABLE requests ADD CONSTRAINT fk_new_requests_on_tag_id FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE CASCADE NOT VALID")
2894 -> 0.0008s
2895-- 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")
2896 -> 0.0008s
2897-- execute("ALTER TABLE stages ADD CONSTRAINT fk_new_stages_on_build_id FOREIGN KEY (build_id) REFERENCES builds(id) ON DELETE CASCADE NOT VALID")
2898 -> 0.0008s
2899-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_new_builds_on_repository_id")
2900 -> 0.0015s
2901-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_new_builds_on_commit_id")
2902 -> 0.0011s
2903-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_new_builds_on_request_id")
2904 -> 0.0011s
2905-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_new_builds_on_pull_request_id")
2906 -> 0.0009s
2907-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_new_builds_on_branch_id")
2908 -> 0.0010s
2909-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_new_builds_on_tag_id")
2910 -> 0.0009s
2911-- execute("ALTER TABLE builds VALIDATE CONSTRAINT fk_new_builds_on_config_id")
2912 -> 0.0009s
2913-- execute("ALTER TABLE jobs VALIDATE CONSTRAINT fk_new_jobs_on_repository_id")
2914 -> 0.0010s
2915-- execute("ALTER TABLE jobs VALIDATE CONSTRAINT fk_new_jobs_on_commit_id")
2916 -> 0.0008s
2917-- execute("ALTER TABLE jobs VALIDATE CONSTRAINT fk_new_jobs_on_stage_id")
2918 -> 0.0008s
2919-- execute("ALTER TABLE jobs VALIDATE CONSTRAINT fk_new_jobs_on_config_id")
2920 -> 0.0008s
2921-- execute("ALTER TABLE branches VALIDATE CONSTRAINT fk_new_branches_on_repository_id")
2922 -> 0.0008s
2923-- execute("ALTER TABLE tags VALIDATE CONSTRAINT fk_new_tags_on_repository_id")
2924 -> 0.0007s
2925-- execute("ALTER TABLE commits VALIDATE CONSTRAINT fk_new_commits_on_repository_id")
2926 -> 0.0008s
2927-- execute("ALTER TABLE commits VALIDATE CONSTRAINT fk_new_commits_on_branch_id")
2928 -> 0.0007s
2929-- execute("ALTER TABLE commits VALIDATE CONSTRAINT fk_new_commits_on_tag_id")
2930 -> 0.0007s
2931-- execute("ALTER TABLE crons VALIDATE CONSTRAINT fk_new_crons_on_branch_id")
2932 -> 0.0007s
2933-- execute("ALTER TABLE job_configs VALIDATE CONSTRAINT fk_new_job_configs_on_repository_id")
2934 -> 0.0007s
2935-- execute("ALTER TABLE build_configs VALIDATE CONSTRAINT fk_new_build_configs_on_repository_id")
2936 -> 0.0007s
2937-- execute("ALTER TABLE pull_requests VALIDATE CONSTRAINT fk_new_pull_requests_on_repository_id")
2938 -> 0.0007s
2939-- execute("ALTER TABLE ssl_keys VALIDATE CONSTRAINT fk_new_ssl_keys_on_repository_id")
2940 -> 0.0007s
2941-- execute("ALTER TABLE requests VALIDATE CONSTRAINT fk_new_requests_on_commit_id")
2942 -> 0.0008s
2943-- execute("ALTER TABLE requests VALIDATE CONSTRAINT fk_new_requests_on_pull_request_id")
2944 -> 0.0008s
2945-- execute("ALTER TABLE requests VALIDATE CONSTRAINT fk_new_requests_on_branch_id")
2946 -> 0.0008s
2947-- execute("ALTER TABLE requests VALIDATE CONSTRAINT fk_new_requests_on_tag_id")
2948 -> 0.0007s
2949-- execute("ALTER TABLE requests VALIDATE CONSTRAINT fk_new_requests_on_config_id")
2950 -> 0.0007s
2951-- execute("ALTER TABLE stages VALIDATE CONSTRAINT fk_new_stages_on_build_id")
2952 -> 0.0008s
2953-- execute("ALTER TABLE builds DROP CONSTRAINT fk_builds_on_repository_id")
2954 -> 0.0009s
2955-- execute("ALTER TABLE builds DROP CONSTRAINT fk_builds_on_commit_id")
2956 -> 0.0008s
2957-- execute("ALTER TABLE builds DROP CONSTRAINT fk_builds_on_request_id")
2958 -> 0.0008s
2959-- execute("ALTER TABLE builds DROP CONSTRAINT fk_builds_on_pull_request_id")
2960 -> 0.0008s
2961-- execute("ALTER TABLE builds DROP CONSTRAINT fk_builds_on_branch_id")
2962 -> 0.0008s
2963-- execute("ALTER TABLE builds DROP CONSTRAINT fk_builds_on_tag_id")
2964 -> 0.0008s
2965-- execute("ALTER TABLE builds DROP CONSTRAINT fk_builds_on_config_id")
2966 -> 0.0008s
2967-- execute("ALTER TABLE jobs DROP CONSTRAINT fk_jobs_on_repository_id")
2968 -> 0.0008s
2969-- execute("ALTER TABLE jobs DROP CONSTRAINT fk_jobs_on_commit_id")
2970 -> 0.0007s
2971-- execute("ALTER TABLE jobs DROP CONSTRAINT fk_jobs_on_stage_id")
2972 -> 0.0007s
2973-- execute("ALTER TABLE jobs DROP CONSTRAINT fk_jobs_on_config_id")
2974 -> 0.0007s
2975-- execute("ALTER TABLE branches DROP CONSTRAINT fk_branches_on_repository_id")
2976 -> 0.0008s
2977-- execute("ALTER TABLE tags DROP CONSTRAINT fk_tags_on_repository_id")
2978 -> 0.0007s
2979-- execute("ALTER TABLE commits DROP CONSTRAINT fk_commits_on_repository_id")
2980 -> 0.0008s
2981-- execute("ALTER TABLE commits DROP CONSTRAINT fk_commits_on_branch_id")
2982 -> 0.0007s
2983-- execute("ALTER TABLE commits DROP CONSTRAINT fk_commits_on_tag_id")
2984 -> 0.0006s
2985-- execute("ALTER TABLE crons DROP CONSTRAINT fk_crons_on_branch_id")
2986 -> 0.0007s
2987-- execute("ALTER TABLE job_configs DROP CONSTRAINT fk_job_configs_on_repository_id")
2988 -> 0.0007s
2989-- execute("ALTER TABLE build_configs DROP CONSTRAINT fk_build_configs_on_repository_id")
2990 -> 0.0007s
2991-- execute("ALTER TABLE pull_requests DROP CONSTRAINT fk_pull_requests_on_repository_id")
2992 -> 0.0008s
2993-- execute("ALTER TABLE ssl_keys DROP CONSTRAINT fk_ssl_keys_on_repository_id")
2994 -> 0.0007s
2995-- execute("ALTER TABLE requests DROP CONSTRAINT fk_requests_on_commit_id")
2996 -> 0.0008s
2997-- execute("ALTER TABLE requests DROP CONSTRAINT fk_requests_on_pull_request_id")
2998 -> 0.0007s
2999-- execute("ALTER TABLE requests DROP CONSTRAINT fk_requests_on_branch_id")
3000 -> 0.0007s
3001-- execute("ALTER TABLE requests DROP CONSTRAINT fk_requests_on_tag_id")
3002 -> 0.0007s
3003-- execute("ALTER TABLE requests DROP CONSTRAINT fk_requests_on_config_id")
3004 -> 0.0007s
3005-- execute("ALTER TABLE stages DROP CONSTRAINT fk_stages_on_build_id")
3006 -> 0.0007s
3007-- execute("ALTER TABLE builds RENAME CONSTRAINT fk_new_builds_on_repository_id TO fk_builds_on_repository_id")
3008 -> 0.0004s
3009-- execute("ALTER TABLE builds RENAME CONSTRAINT fk_new_builds_on_commit_id TO fk_builds_on_commit_id")
3010 -> 0.0004s
3011-- execute("ALTER TABLE builds RENAME CONSTRAINT fk_new_builds_on_request_id TO fk_builds_on_request_id")
3012 -> 0.0009s
3013-- execute("ALTER TABLE builds RENAME CONSTRAINT fk_new_builds_on_pull_request_id TO fk_builds_on_pull_request_id")
3014 -> 0.0004s
3015-- execute("ALTER TABLE builds RENAME CONSTRAINT fk_new_builds_on_branch_id TO fk_builds_on_branch_id")
3016 -> 0.0004s
3017-- execute("ALTER TABLE builds RENAME CONSTRAINT fk_new_builds_on_tag_id TO fk_builds_on_tag_id")
3018 -> 0.0004s
3019-- execute("ALTER TABLE builds RENAME CONSTRAINT fk_new_builds_on_config_id TO fk_builds_on_config_id")
3020 -> 0.0004s
3021-- execute("ALTER TABLE jobs RENAME CONSTRAINT fk_new_jobs_on_repository_id TO fk_jobs_on_repository_id")
3022 -> 0.0003s
3023-- execute("ALTER TABLE jobs RENAME CONSTRAINT fk_new_jobs_on_commit_id TO fk_jobs_on_commit_id")
3024 -> 0.0004s
3025-- execute("ALTER TABLE jobs RENAME CONSTRAINT fk_new_jobs_on_stage_id TO fk_jobs_on_stage_id")
3026 -> 0.0003s
3027-- execute("ALTER TABLE jobs RENAME CONSTRAINT fk_new_jobs_on_config_id TO fk_jobs_on_config_id")
3028 -> 0.0004s
3029-- execute("ALTER TABLE branches RENAME CONSTRAINT fk_new_branches_on_repository_id TO fk_branches_on_repository_id")
3030 -> 0.0003s
3031-- execute("ALTER TABLE tags RENAME CONSTRAINT fk_new_tags_on_repository_id TO fk_tags_on_repository_id")
3032 -> 0.0003s
3033-- execute("ALTER TABLE commits RENAME CONSTRAINT fk_new_commits_on_repository_id TO fk_commits_on_repository_id")
3034 -> 0.0003s
3035-- execute("ALTER TABLE commits RENAME CONSTRAINT fk_new_commits_on_branch_id TO fk_commits_on_branch_id")
3036 -> 0.0003s
3037-- execute("ALTER TABLE commits RENAME CONSTRAINT fk_new_commits_on_tag_id TO fk_commits_on_tag_id")
3038 -> 0.0003s
3039-- execute("ALTER TABLE crons RENAME CONSTRAINT fk_new_crons_on_branch_id TO fk_crons_on_branch_id")
3040 -> 0.0003s
3041-- execute("ALTER TABLE job_configs RENAME CONSTRAINT fk_new_job_configs_on_repository_id TO fk_job_configs_on_repository_id")
3042 -> 0.0003s
3043-- execute("ALTER TABLE build_configs RENAME CONSTRAINT fk_new_build_configs_on_repository_id TO fk_build_configs_on_repository_id")
3044 -> 0.0003s
3045-- execute("ALTER TABLE pull_requests RENAME CONSTRAINT fk_new_pull_requests_on_repository_id TO fk_pull_requests_on_repository_id")
3046 -> 0.0003s
3047-- execute("ALTER TABLE ssl_keys RENAME CONSTRAINT fk_new_ssl_keys_on_repository_id TO fk_ssl_keys_on_repository_id")
3048 -> 0.0003s
3049-- execute("ALTER TABLE requests RENAME CONSTRAINT fk_new_requests_on_commit_id TO fk_requests_on_commit_id")
3050 -> 0.0003s
3051-- execute("ALTER TABLE requests RENAME CONSTRAINT fk_new_requests_on_pull_request_id TO fk_requests_on_pull_request_id")
3052 -> 0.0004s
3053-- execute("ALTER TABLE requests RENAME CONSTRAINT fk_new_requests_on_branch_id TO fk_requests_on_branch_id")
3054 -> 0.0003s
3055-- execute("ALTER TABLE requests RENAME CONSTRAINT fk_new_requests_on_tag_id TO fk_requests_on_tag_id")
3056 -> 0.0004s
3057-- execute("ALTER TABLE requests RENAME CONSTRAINT fk_new_requests_on_config_id TO fk_requests_on_config_id")
3058 -> 0.0004s
3059-- execute("ALTER TABLE stages RENAME CONSTRAINT fk_new_stages_on_build_id TO fk_stages_on_build_id")
3060 -> 0.0003s
3061== 20190718092750 AddDeleteCascadeToForeignKeys: migrated (0.0829s) ===========
3063== 20190718100426 UpdateSoftDeleteProcedure: migrating ========================
3064-- 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")
3065 -> 0.0027s
3066== 20190718100426 UpdateSoftDeleteProcedure: migrated (0.0030s) ===============
3068== 20190725103113 UpdateSoftDelete: migrating =================================
3069-- execute("create table deleted_request_yaml_configs (like request_yaml_configs)")
3070 -> 0.0016s
3071-- 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")
3072 -> 0.0017s
3073== 20190725103113 UpdateSoftDelete: migrated (0.0036s) ========================
3075== 20190725105934 AddOrgIdToConfigs: migrating ================================
3076-- add_column(:job_configs, :org_id, :bigint)
3077 -> 0.0006s
3078-- add_column(:deleted_job_configs, :org_id, :bigint)
3079 -> 0.0006s
3080-- add_column(:build_configs, :org_id, :bigint)
3081 -> 0.0005s
3082-- add_column(:deleted_build_configs, :org_id, :bigint)
3083 -> 0.0005s
3084-- add_column(:request_configs, :org_id, :bigint)
3085 -> 0.0012s
3086-- add_column(:deleted_request_configs, :org_id, :bigint)
3087 -> 0.0005s
3088-- add_column(:request_yaml_configs, :org_id, :bigint)
3089 -> 0.0004s
3090-- add_column(:deleted_request_yaml_configs, :org_id, :bigint)
3091 -> 0.0005s
3092-- add_column(:request_payloads, :org_id, :bigint)
3093 -> 0.0004s
3094-- add_column(:deleted_request_payloads, :org_id, :bigint)
3095 -> 0.0005s
3096-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_job_configs_on_org_id ON job_configs (org_id)")
3097 -> 0.0009s
3098-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_build_configs_on_org_id ON build_configs (org_id)")
3099 -> 0.0008s
3100-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_request_configs_on_org_id ON request_configs (org_id)")
3101 -> 0.0008s
3102-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_request_yaml_configs_on_org_id ON request_yaml_configs (org_id)")
3103 -> 0.0008s
3104-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_request_payloads_on_org_id ON request_payloads (org_id)")
3105 -> 0.0008s
3106== 20190725105934 AddOrgIdToConfigs: migrated (0.0103s) =======================
3108== 20190729105934 AddOrgAndComIdsToRawConfigs: migrating ======================
3109-- add_column(:request_raw_configs, :org_id, :bigint)
3110 -> 0.0005s
3111-- add_column(:request_raw_configurations, :org_id, :bigint)
3112 -> 0.0005s
3113-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_request_raw_configs_on_org_id ON request_raw_configs (org_id)")
3114 -> 0.0008s
3115-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_request_raw_configurations_on_org_id ON request_raw_configurations (org_id)")
3116 -> 0.0007s
3117== 20190729105934 AddOrgAndComIdsToRawConfigs: migrated (0.0026s) =============
3119== 20190801120510 AddMoreDeletedTables: migrating =============================
3120-- execute("create table if not exists deleted_request_raw_configs (like request_raw_configs)")
3121 -> 0.0015s
3122-- execute("create table if not exists deleted_request_raw_configurations (like request_raw_configurations)")
3123 -> 0.0012s
3124-- 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")
3125 -> 0.0024s
3126== 20190801120510 AddMoreDeletedTables: migrated (0.1376s) ====================
3128== 20190815152336 AddComIdToMoreTables: migrating =============================
3129-- add_column(:request_configs, :com_id, :bigint)
3130 -> 0.0010s
3131-- add_column(:request_yaml_configs, :com_id, :bigint)
3132 -> 0.0019s
3133-- add_column(:deleted_request_configs, :com_id, :bigint)
3134 -> 0.0010s
3135-- add_column(:deleted_request_yaml_configs, :com_id, :bigint)
3136 -> 0.0009s
3137-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_request_configs_on_com_id ON request_configs (com_id)")
3138 -> 0.0012s
3139-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_request_yaml_configs_on_com_id ON request_yaml_configs (com_id)")
3140 -> 0.0010s
3141== 20190815152336 AddComIdToMoreTables: migrated (0.0075s) ====================
3143== 20190815164320 AddComIdToBuildConfigs: migrating ===========================
3144-- add_column(:build_configs, :com_id, :bigint)
3145 -> 0.0013s
3146-- add_column(:deleted_build_configs, :com_id, :bigint)
3147 -> 0.0010s
3148-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_build_configs_on_com_id ON build_configs (com_id)")
3149 -> 0.0014s
3150== 20190815164320 AddComIdToBuildConfigs: migrated (0.0040s) ==================
3152== 20190815172205 AddComIdToJobConfigs: migrating =============================
3153-- add_column(:job_configs, :com_id, :bigint)
3154 -> 0.0014s
3155-- add_column(:deleted_job_configs, :com_id, :bigint)
3156 -> 0.0012s
3157-- execute("CREATE UNIQUE INDEX CONCURRENTLY index_job_configs_on_com_id ON job_configs (com_id)")
3158 -> 0.0014s
3159== 20190815172205 AddComIdToJobConfigs: migrated (0.0043s) ====================
3161== 20190819082558 AddVcsIdToUser: migrating ===================================
3162-- add_column(:users, :vcs_id, :string, {:default=>nil})
3163 -> 0.0024s
3164-- execute("CREATE INDEX CONCURRENTLY index_users_on_vcs_id_and_vcs_type ON users (vcs_id, vcs_type);")
3165 -> 0.0012s
3166== 20190819082558 AddVcsIdToUser: migrated (0.0040s) ==========================
3168== 20190819082559 AddVcsIdToRepository: migrating =============================
3169-- add_column(:repositories, :vcs_id, :string, {:default=>nil})
3170 -> 0.0018s
3171-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_vcs_id_and_vcs_type ON repositories (vcs_id, vcs_type);")
3172 -> 0.0020s
3173== 20190819082559 AddVcsIdToRepository: migrated (0.0040s) ====================
3175== 20190820082431 AddVcsIdToOrganization: migrating ===========================
3176-- add_column(:organizations, :vcs_id, :string, {:default=>nil})
3177 -> 0.0023s
3178-- execute("CREATE INDEX CONCURRENTLY index_organizations_on_vcs_id_and_vcs_type ON organizations (vcs_id, vcs_type);")
3179 -> 0.0014s
3180== 20190820082431 AddVcsIdToOrganization: migrated (0.0041s) ==================
3182== 20190913092543 CopyVcsIdForRepository: migrating ===========================
3183-- select_value("SELECT id FROM repositories ORDER BY id DESC LIMIT 1")
3184 -> 0.0015s
3185-- execute("UPDATE \"repositories\" SET vcs_id = github_id WHERE id BETWEEN 0 AND 5000")
3186 -> 0.0018s
3187== 20190913092543 CopyVcsIdForRepository: migrated (0.0046s) ==================
3189== 20190913092554 CopyVcsIdForUser: migrating =================================
3190-- select_value("SELECT id FROM users ORDER BY id DESC LIMIT 1")
3191 -> 0.0015s
3192-- execute("UPDATE \"users\" SET vcs_id = github_id WHERE id BETWEEN 0 AND 5000")
3193 -> 0.0017s
3194== 20190913092554 CopyVcsIdForUser: migrated (0.0045s) ========================
3196== 20190913092565 CopyVcsIdForOrganization: migrating =========================
3197-- select_value("SELECT id FROM organizations ORDER BY id DESC LIMIT 1")
3198 -> 0.0014s
3199-- execute("UPDATE \"organizations\" SET vcs_id = github_id WHERE id BETWEEN 0 AND 5000")
3200 -> 0.0017s
3201== 20190913092565 CopyVcsIdForOrganization: migrated (0.0041s) ================
3203== 20190920160300 MessagesAddTypeSourceLine: migrating ========================
3204-- add_column(:messages, :type, :string, {:default=>nil})
3205 -> 0.0021s
3206-- add_column(:messages, :src, :string, {:default=>nil})
3207 -> 0.0019s
3208-- add_column(:messages, :line, :integer, {:default=>nil})
3209 -> 0.0020s
3210== 20190920160300 MessagesAddTypeSourceLine: migrated (0.0069s) ===============
3212== 20191112000000 ReposAddFork: migrating =====================================
3213-- add_column(:repositories, :fork, :boolean, {:default=>nil})
3214 -> 0.0022s
3215== 20191112000000 ReposAddFork: migrated (0.0024s) ============================
3217== 20191112172015 AddVcsIndexToRepositories: migrating ========================
3218-- add_index(:repositories, [:vcs_type, :vcs_id], {:algorithm=>:concurrently})
3219 -> 0.0021s
3220== 20191112172015 AddVcsIndexToRepositories: migrated (0.0024s) ===============
3222== 20191112172332 AddVcsIndexToUsers: migrating ===============================
3223-- add_index(:users, [:vcs_type, :vcs_id], {:algorithm=>:concurrently})
3224 -> 0.0021s
3225== 20191112172332 AddVcsIndexToUsers: migrated (0.0023s) ======================
3227== 20191219091445 AddHeadRepoVcsIdToPullRequest: migrating ====================
3228-- add_column(:pull_requests, :head_repo_vcs_id, :string, {:default=>nil})
3229 -> 0.0059s
3230-- execute("CREATE INDEX CONCURRENTLY index_pull_requests_on_head_repo_vcs_id ON pull_requests (head_repo_vcs_id);")
3231 -> 0.0010s
3232== 20191219091445 AddHeadRepoVcsIdToPullRequest: migrated (0.0072s) ===========
3234== 20191219091446 AddHeadRepoVcsIdToDeletedPullRequest: migrating =============
3235-- add_column(:deleted_pull_requests, :head_repo_vcs_id, :string, {:default=>nil})
3236 -> 0.0008s
3237-- execute("CREATE INDEX CONCURRENTLY index_deleted_pull_requests_on_head_repo_vcs_id ON deleted_pull_requests (head_repo_vcs_id);")
3238 -> 0.0008s
3239== 20191219091446 AddHeadRepoVcsIdToDeletedPullRequest: migrated (0.0018s) ====
3241== 20200122000000 AddConfigsJson: migrating ===================================
3242-- add_column(:request_configs, :config_json, :json)
3243 -> 0.0007s
3244-- add_column(:build_configs, :config_json, :json)
3245 -> 0.0005s
3246-- add_column(:job_configs, :config_json, :json)
3247 -> 0.0006s
3248-- add_column(:deleted_request_configs, :config_json, :json)
3249 -> 0.0005s
3250-- add_column(:deleted_build_configs, :config_json, :json)
3251 -> 0.0005s
3252-- add_column(:deleted_job_configs, :config_json, :json)
3253 -> 0.0005s
3254== 20200122000000 AddConfigsJson: migrated (0.0035s) ==========================
3256== 20200127000000 DropJobConfigsGpu: migrating ================================
3257-- execute("DROP MATERIALIZED VIEW job_configs_gpu\n")
3258 -> 0.0012s
3259== 20200127000000 DropJobConfigsGpu: migrated (0.0012s) =======================
3261== 20200127000001 RenameConfigsJson: migrating ================================
3262-- remove_column(:request_configs, :config)
3263 -> 0.0009s
3264-- rename_column(:request_configs, :config_json, :config)
3265 -> 0.0041s
3266-- remove_column(:build_configs, :config)
3267 -> 0.0007s
3268-- rename_column(:build_configs, :config_json, :config)
3269 -> 0.0088s
3270-- remove_column(:job_configs, :config)
3271 -> 0.0007s
3272-- rename_column(:job_configs, :config_json, :config)
3273 -> 0.0032s
3274-- remove_column(:deleted_request_configs, :config)
3275 -> 0.0005s
3276-- rename_column(:deleted_request_configs, :config_json, :config)
3277 -> 0.0011s
3278-- remove_column(:deleted_build_configs, :config)
3279 -> 0.0005s
3280-- rename_column(:deleted_build_configs, :config_json, :config)
3281 -> 0.0012s
3282-- remove_column(:deleted_job_configs, :config)
3283 -> 0.0005s
3284-- rename_column(:deleted_job_configs, :config_json, :config)
3285 -> 0.0011s
3286== 20200127000001 RenameConfigsJson: migrated (0.0241s) =======================
3288== 20200214144655 AddIndexToJobVersionsOnJobId: migrating =====================
3289-- add_index(:job_versions, :job_id, {:algorithm=>:concurrently})
3290 -> 0.0009s
3291== 20200214144655 AddIndexToJobVersionsOnJobId: migrated (0.0010s) ============
3293== 20200225085734 AddVcsSlugToRepository: migrating ===========================
3294-- add_column(:repositories, :vcs_slug, :string, {:default=>nil})
3295 -> 0.0010s
3296== 20200225085734 AddVcsSlugToRepository: migrated (0.0010s) ==================
3298== 20200227085734 AddVcsSourceHostToRepository: migrating =====================
3299-- add_column(:repositories, :vcs_source_host, :string, {:default=>nil})
3300 -> 0.0027s
3301== 20200227085734 AddVcsSourceHostToRepository: migrated (0.0028s) ============
3303== 20200227085736 AddVcsIndexes: migrating ====================================
3304-- 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")
3305 -> 0.0011s
3306== 20200227085736 AddVcsIndexes: migrated (0.0012s) ===========================
3308== 20200227085737 AddRepositoryNameAndSlugIndex: migrating ====================
3309-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_slug_or_names ON repositories (vcs_slug, owner_name, name) WHERE invalidated_at IS NULL")
3310 -> 0.0027s
3311== 20200227085737 AddRepositoryNameAndSlugIndex: migrated (0.0028s) ===========
3313== 20200227085742 AddPullRequestSourceData: migrating =========================
3314-- add_column(:pull_requests, :base_repo_slug, :string, {:default=>nil})
3315 -> 0.0014s
3316-- add_column(:pull_requests, :base_repo_vcs_id, :string, {:default=>nil})
3317 -> 0.0048s
3318-- add_column(:pull_requests, :base_ref, :string, {:default=>nil})
3319 -> 0.0011s
3320-- add_column(:deleted_pull_requests, :base_repo_slug, :string, {:default=>nil})
3321 -> 0.0010s
3322-- add_column(:deleted_pull_requests, :base_repo_vcs_id, :string, {:default=>nil})
3323 -> 0.0008s
3324-- add_column(:deleted_pull_requests, :base_ref, :string, {:default=>nil})
3325 -> 0.0008s
3326== 20200227085742 AddPullRequestSourceData: migrated (0.0104s) ================
3328== 20200312184018 AddUserUtmParamsTable: migrating ============================
3329-- create_table(:user_utm_params)
3330 -> 0.0042s
3331== 20200312184018 AddUserUtmParamsTable: migrated (0.0043s) ===================
3333== 20200316085738 AddRepositoryVcsSlugIndex: migrating ========================
3334-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_lower_vcs_slug ON repositories (LOWER(vcs_slug))")
3335 -> 0.0013s
3336-- execute("CREATE INDEX CONCURRENTLY index_repositories_on_lower_vcs_slug_valid ON repositories (LOWER(vcs_slug)) WHERE invalidated_at IS NULL")
3337 -> 0.0012s
3338== 20200316085738 AddRepositoryVcsSlugIndex: migrated (0.0027s) ===============
3340== 20200325115329 AddMultipleJobStateIndexesOrderByNewest: migrating ==========
3341-- 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'")
3342 -> 0.0013s
3343-- 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'")
3344 -> 0.0011s
3345-- 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'")
3346 -> 0.0010s
3347-- 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'")
3348 -> 0.0012s
3349-- 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'")
3350 -> 0.0011s
3351-- 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'")
3352 -> 0.0012s
3353-- 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'")
3354 -> 0.0010s
3355-- 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'")
3356 -> 0.0011s
3357-- 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'")
3358 -> 0.0013s
3359== 20200325115329 AddMultipleJobStateIndexesOrderByNewest: migrated (0.0105s) =
3361== 20200325130013 AddFunctionMostRecentJobIdsForUserRepositoriesByStates: migrating
3362-- 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 ")
3363 -> 0.0010s
3364== 20200325130013 AddFunctionMostRecentJobIdsForUserRepositoriesByStates: migrated (0.0011s)
3366== 20200330110527 AddFunctionMostRecentJobIdsForRepositoryByState: migrating ==
3367-- 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 ")
3368 -> 0.0008s
3369== 20200330110527 AddFunctionMostRecentJobIdsForRepositoryByState: migrated (0.0008s)
3371== 20200406121218 AddIndexJobsOnRepositoryIdOrderByNewest: migrating ==========
3372-- execute("CREATE INDEX CONCURRENTLY IF NOT EXISTS index_jobs_on_repository_id_order_by_newest on jobs (repository_id, id desc)")
3373 -> 0.0011s
3374== 20200406121218 AddIndexJobsOnRepositoryIdOrderByNewest: migrated (0.0011s) =
3376== 20200424000000 RequestRawConfigurationsAddMergeMode: migrating =============
3377-- add_column(:request_raw_configurations, :merge_mode, :string, {:default=>nil})
3378 -> 0.0009s
3379-- add_column(:deleted_request_raw_configurations, :merge_mode, :string, {:default=>nil})
3380 -> 0.0010s
3381== 20200424000000 RequestRawConfigurationsAddMergeMode: migrated (0.0021s) ====
3383== 20200527123653 AddColumnPriorityToTableJobsAndDeletedJobs: migrating =======
3384-- add_column(:jobs, :priority, :integer, {:default=>nil})
3385 -> 0.0009s
3386-- add_column(:deleted_jobs, :priority, :integer, {:default=>nil})
3387 -> 0.0009s
3388== 20200527123653 AddColumnPriorityToTableJobsAndDeletedJobs: migrated (0.0019s)
3390== 20200928143126 AddBuildTriggerPermissions: migrating =======================
3391-- add_column(:memberships, :build_permission, :boolean, {:default=>nil})
3392 -> 0.0008s
3393-- add_column(:permissions, :build, :boolean, {:default=>nil})
3394 -> 0.0009s
3395== 20200928143126 AddBuildTriggerPermissions: migrated (0.0018s) ==============
3397== 20202427123653 AddColumnHasLocalRegistrationToTableSubscriptions: migrating
3398-- add_column(:subscriptions, :has_local_registration, :boolean, {:default=>nil})
3399 -> 0.0009s
3400== 20202427123653 AddColumnHasLocalRegistrationToTableSubscriptions: migrated (0.0010s)
3402== 20210203130200 CreateBuildBackupsTable: migrating ==========================
3403-- create_table(:build_backups, {:id=>:integer})
3404 -> 0.0031s
3405== 20210203130200 CreateBuildBackupsTable: migrated (0.0032s) =================
3407== 20210203143155 AddConfirmationFieldsToUser: migrating ======================
3408-- add_column(:users, :confirmed_at, :timestamp, {:precision=>nil})
3409 -> 0.0007s
3410-- add_column(:users, :token_expires_at, :timestamp, {:precision=>nil})
3411 -> 0.0006s
3412-- add_column(:users, :confirmation_token, :string)
3413 -> 0.0006s
3414-- add_index(:users, :confirmation_token)
3415 -> 0.0009s
3416== 20210203143155 AddConfirmationFieldsToUser: migrated (0.0030s) =============
3418== 20210203143406 ConfirmCurrentUsers: migrating ==============================
3419== 20210203143406 ConfirmCurrentUsers: migrated (0.0000s) =====================
3421== 20210614140633 AddServerTypeToRepositories: migrating ======================
3422-- add_column(:repositories, :server_type, :string, {:limit=>20})
3423 -> 0.0009s
3424== 20210614140633 AddServerTypeToRepositories: migrated (0.0010s) =============
3426== 20220610092916 MostRecentJobIdsForUserRepositoriesByStatesLw: migrating ====
3427-- execute("\n CREATE OR REPLACE FUNCTION\n most_recent_job_ids_for_user_repositories_by_states_lw(uid int, states varchar default '') RETURNS table (id bigint)\n LANGUAGE plpgsql\n AS $$\n DECLARE\n rid int;\n BEGIN\n SET LOCAL work_mem = '16MB';\n IF states <> '' THEN\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 and state in (SELECT unnest(regexp_split_to_array(states, ','))) order by j.id desc limit 100;\n END LOOP;\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 $$;\n ")
3428 -> 0.0010s
3429== 20220610092916 MostRecentJobIdsForUserRepositoriesByStatesLw: migrated (0.0011s)
3431== 20220621151453 AddColumnRestartedByToTableJobs: migrating ==================
3432-- add_column(:jobs, :restarted_by, :integer, {:default=>nil})
3433 -> 0.0013s
3434-- add_column(:deleted_jobs, :restarted_by, :integer, {:default=>nil})
3435 -> 0.0008s
3436== 20220621151453 AddColumnRestartedByToTableJobs: migrated (0.0022s) =========
3438== 20220722162400 CreateAuditsTable: migrating ================================
3439-- create_table(:audits)
3440 -> 0.0034s
3441== 20220722162400 CreateAuditsTable: migrated (0.0035s) =======================
3443== 20220825140522 CreateCustomKeysTable: migrating ============================
3444-- create_table(:custom_keys)
3445 -> 0.0040s
3446== 20220825140522 CreateCustomKeysTable: migrated (0.0041s) ===================
3448== 20220905144600 AddScanFailedAtToRepositories: migrating ====================
3449-- add_column(:repositories, :scan_failed_at, :timestamp)
3450 -> 0.0009s
3451== 20220905144600 AddScanFailedAtToRepositories: migrated (0.0010s) ===========
3453== 20221214171030 AddPurposeColumnToTokens: migrating =========================
3454-- add_column(:tokens, :purpose, :integer, {:limit=>4, :default=>0})
3455 -> 0.0036s
3456== 20221214171030 AddPurposeColumnToTokens: migrated (0.0037s) ================
3458== 20230208161446 AddCloneUrlToRepositories: migrating ========================
3459-- add_column(:repositories, :clone_url, :string)
3460 -> 0.0010s
3461== 20230208161446 AddCloneUrlToRepositories: migrated (0.0010s) ===============
3463== 20230505055250 RolifyCreateRoles: migrating ================================
3464-- create_table(:roles)
3465 -> 0.0041s
3466-- create_table(:role_names)
3467 -> 0.0030s
3468-- create_table(:users_roles, {:id=>false})
3469 -> 0.0027s
3470-- add_index(:roles, :name)
3471 -> 0.0007s
3472-- add_index(:role_names, :name)
3473 -> 0.0006s
3474-- add_index(:roles, [:name, :resource_type, :resource_id])
3475 -> 0.0009s
3476-- add_index(:users_roles, [:user_id, :role_id])
3477 -> 0.0007s
3478== 20230505055250 RolifyCreateRoles: migrated (0.0131s) =======================
3480== 20230505060110 CreatePolicies: migrating ===================================
3481-- create_table(:policy_permissions)
3482 -> 0.0033s
3483-- create_table(:role_permissions, {:id=>false})
3484 -> 0.0024s
3485-- add_index(:policy_permissions, :name)
3486 -> 0.0007s
3487-- add_index(:role_permissions, [:role_name_id, :policy_permission_id])
3488 -> 0.0007s
3489== 20230505060110 CreatePolicies: migrated (0.0072s) ==========================
3491== 20230713115855 CreatePermissionsSync: migrating ============================
3492-- create_table(:permissions_syncs)
3493 -> 0.0044s
3494== 20230713115855 CreatePermissionsSync: migrated (0.0045s) ===================
3496== 20231005111642 CreatePermissionsIndex: migrating ===========================
3497-- add_index(:permissions_syncs, [:user_id, :resource_type, :resource_id], {:name=>"index_permissions_syncs_on_user_and_resource"})
3498 -> 0.0012s
3499-- add_index(:role_names, :role_type)
3500 -> 0.0007s
3501== 20231005111642 CreatePermissionsIndex: migrated (0.0020s) ==================
3503 sets unique_number on INSERT
3504 does not set unique_number on INSERT if 0 is given as a value
3505 sets unique_number on UPDATE
3506 does not set unique_number on UPDATE if unique_number is 0
3508set_updated_at trigger
3509 jobs
3510 sets updated_at on INSERT
3511 sets updated_at on UPDATE
3512 works also for new columns
3513 builds
3514 sets updated_at on INSERT
3515 sets updated_at on UPDATE
3516 works also for new columns
3518soft delete repo
3519 ensure that soft delete tables have the same fields that the originals
3520 soft deleting a repo moves all of the related data to deleted_* tables
3522Rake tasks
3523 rake db:create
3524 migrates the main db
3525 rake db:schema:load
3526 loads the main schema
3528Deprecation Warnings:
3530Using `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)>'.
3533If you need more of the backtrace for any of these deprecations to
3534identify where to make the necessary changes, you can configure
3535`config.raise_errors_for_deprecations!`, and it will turn the
3536deprecation warnings into errors, giving you the full backtrace.
35381 deprecation warning total
3540Finished in 22.72 seconds (files took 0.36529 seconds to load)
354119 examples, 0 failures
3543The command "bundle exec rspec spec" exited with 0.
cache.2
3544store build cache
35450.00s1.38snothing changed
after_success
35470.19s$ script/upload_structure.rb
3548<internal:/home/travis/.rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require': cannot load such file -- s3 (LoadError)
3549 from <internal:/home/travis/.rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
3550 from script/upload_structure.rb:5:in `<main>'
3552Done. Your build exited with 0.
Top