Skip to content
This repository has been archived by the owner on Jun 13, 2018. It is now read-only.

Commit

Permalink
Merge pull request #25 from shlomizadok/sqlite_migration
Browse files Browse the repository at this point in the history
fixes issue #22 - support creating view in sqlite3 database
  • Loading branch information
isimluk committed Jul 13, 2015
2 parents 430a965 + c198096 commit a8ef68e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
class ReplaceArfReportBreakdownView < ActiveRecord::Migration
def self.up
execute 'DROP VIEW scaptimony_arf_report_breakdowns' if table_exists? 'scaptimony_arf_report_breakdowns'
execute <<-SQL
CREATE OR REPLACE VIEW scaptimony_arf_report_breakdowns AS
CREATE VIEW scaptimony_arf_report_breakdowns AS
SELECT
arf.id as arf_report_id,
COUNT(CASE WHEN result.name IN ('pass','fixed') THEN 1 ELSE null END) as passed,
Expand Down

0 comments on commit a8ef68e

Please sign in to comment.