File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed
Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 1+ changelogs_directory : my_delta_directory
Original file line number Diff line number Diff line change 1+ CREATE SCHEMA IF NOT EXISTS pum_test_data;
2+
3+ CREATE TABLE pum_test_data .some_table (
4+ id INT PRIMARY KEY ,
5+ name VARCHAR (100 ) NOT NULL ,
6+ created_date DATE DEFAULT CURRENT_DATE ,
7+ is_active BOOLEAN DEFAULT TRUE,
8+ amount NUMERIC (10 ,2 )
9+ );
Original file line number Diff line number Diff line change @@ -47,6 +47,19 @@ def test_install_simple(self):
4747 )
4848 upgrader .install ()
4949 self .assertTrue (sm .exists (self .conn ))
50+ self .assertEqual (sm .installed_modules (self .conn )[0 ][1 ], "1.2.3" )
51+
52+ def test_install_custom_directory (self ):
53+ cfg = PumConfig .from_yaml ("test/data/custom_directory/.pum-config.yaml" )
54+ sm = SchemaMigrations (cfg )
55+ self .assertFalse (sm .exists (self .conn ))
56+ upgrader = Upgrader (
57+ pg_service = self .pg_service ,
58+ config = cfg ,
59+ dir = "test/data/custom_directory" ,
60+ )
61+ upgrader .install ()
62+ self .assertTrue (sm .exists (self .conn ))
5063
5164
5265if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments