File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
src/Hangfire.PostgreSql/Scripts
tests/Hangfire.PostgreSql.Tests Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change
1
+ SET search_path = ' hangfire' ;
2
+
3
+ DO $$
4
+ BEGIN
5
+ IF EXISTS(SELECT 1 FROM " schema" WHERE " version" ::integer >= 23 ) THEN
6
+ RAISE EXCEPTION ' version-already-applied' ;
7
+ END IF;
8
+ END $$;
9
+
10
+ DROP INDEX IF EXISTS ix_hangfire_job_statename_is_not_null;
11
+ CREATE INDEX ix_hangfire_job_statename_is_not_null ON job USING btree(statename) INCLUDE (id) WHERE statename IS NOT NULL ;
12
+
13
+ RESET search_path;
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ public void InstallingSchemaUpdatesVersionAndShouldNotThrowAnException()
20
20
PostgreSqlObjectsInstaller . Install ( connection , schemaName ) ;
21
21
22
22
int lastVersion = connection . Query < int > ( $@ "SELECT version FROM ""{ schemaName } "".""schema""") . Single ( ) ;
23
- Assert . Equal ( 22 , lastVersion ) ;
23
+ Assert . Equal ( 23 , lastVersion ) ;
24
24
25
25
connection . Execute ( $@ "DROP SCHEMA ""{ schemaName } "" CASCADE;") ;
26
26
} ) ;
@@ -39,7 +39,7 @@ public void InstallingSchemaWithCapitalsUpdatesVersionAndShouldNotThrowAnExcepti
39
39
PostgreSqlObjectsInstaller . Install ( connection , schemaName ) ;
40
40
41
41
int lastVersion = connection . Query < int > ( $@ "SELECT version FROM ""{ schemaName } "".""schema""") . Single ( ) ;
42
- Assert . Equal ( 22 , lastVersion ) ;
42
+ Assert . Equal ( 23 , lastVersion ) ;
43
43
44
44
connection . Execute ( $@ "DROP SCHEMA ""{ schemaName } "" CASCADE;") ;
45
45
} ) ;
You can’t perform that action at this time.
0 commit comments