Skip to content

Commit

Permalink
fixes issue OpenSCAP#22 - support creating view in sqlite3 database
Browse files Browse the repository at this point in the history
  • Loading branch information
shlomizadok committed Jul 12, 2015
1 parent d37fce3 commit c198096
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 c198096

Please sign in to comment.