diff options
| author | Robert | 2018-01-08 14:01:13 +0100 |
|---|---|---|
| committer | Robert | 2018-01-08 14:01:13 +0100 |
| commit | 6123fa3580b0048f39157c35cecef3c914e06b4c (patch) | |
| tree | 15939baa35d07581bc2adf0804da7fcd5905ec46 /app/models/referential.rb | |
| parent | dcc56c4d02f9f71b13dd38251367306842cd10c7 (diff) | |
| parent | 2ea51b513170b1b6578b47ca10b995e07ee11fef (diff) | |
| download | chouette-core-6123fa3580b0048f39157c35cecef3c914e06b4c.tar.bz2 | |
Merge branch 'master' of github.com:af83/stif-boiv
Diffstat (limited to 'app/models/referential.rb')
| -rw-r--r-- | app/models/referential.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/models/referential.rb b/app/models/referential.rb index a5d5acbf9..4cddd502e 100644 --- a/app/models/referential.rb +++ b/app/models/referential.rb @@ -156,7 +156,7 @@ class Referential < ActiveRecord::Base def stop_points Chouette::StopPoint.all end - + def compliance_check_sets ComplianceCheckSet.all end @@ -356,7 +356,13 @@ class Referential < ActiveRecord::Base end Rails.logger.info("Schema create benchmark: '#{slug}'\t#{report}") - Rails.logger.error( "Schema migrations count for Referential #{slug} " + Referential.connection.select_value("select count(*) from #{slug}.schema_migrations;").to_s ) + Rails.logger.info("Schema migrations count for Referential #{slug}: #{migration_count || '-'}") + end + end + + def migration_count + if self.class.connection.table_exists?("#{slug}.schema_migrations") + self.class.connection.select_value("select count(*) from #{slug}.schema_migrations;") end end |
