|
18 | 18 |
|
19 | 19 | a1 = annotation.create(resource_guid: i1.guid, key_name: key_name, value: 'some_value')
|
20 | 20 |
|
21 |
| - expect { Sequel::Migrator.run(db, migration_to_test, allow_missing_migration_files: true) }.not_to raise_error |
| 21 | + expect { Sequel::Migrator.run(db, migrations_path, target: current_migration_index, allow_missing_migration_files: true) }.not_to raise_error |
22 | 22 | expect(a1.reload.key_name).to eq(truncated_key_name)
|
23 | 23 | end
|
24 | 24 |
|
|
28 | 28 |
|
29 | 29 | a1 = annotation.create(resource_guid: i1.guid, key_name: key_name, value: 'some_value')
|
30 | 30 |
|
31 |
| - expect { Sequel::Migrator.run(db, migration_to_test, allow_missing_migration_files: true) }.not_to raise_error |
| 31 | + expect { Sequel::Migrator.run(db, migrations_path, target: current_migration_index, allow_missing_migration_files: true) }.not_to raise_error |
32 | 32 | expect(a1.reload.key_name).to eq(key_name)
|
33 | 33 | end
|
34 | 34 |
|
|
50 | 50 | expect(b1.id).to be < b2.id
|
51 | 51 | expect(b1.id).to be < b3.id
|
52 | 52 |
|
53 |
| - expect { Sequel::Migrator.run(db, migration_to_test, allow_missing_migration_files: true) }.not_to raise_error |
| 53 | + expect { Sequel::Migrator.run(db, migrations_path, target: current_migration_index, allow_missing_migration_files: true) }.not_to raise_error |
54 | 54 | expect(annotation.where(key_name:).count).to eq(2)
|
55 | 55 | expect(a1.reload).to be_a(annotation)
|
56 | 56 | expect { a2.reload }.to raise_error(Sequel::NoExistingObject)
|
|
76 | 76 | b3 = annotation.create(resource_guid: i1.guid, key_prefix: 'bommel', key_name: key_b, value: 'v3')
|
77 | 77 | b4 = annotation.create(resource_guid: i1.guid, key_prefix: 'sword', key_name: key_a, value: 'v4')
|
78 | 78 |
|
79 |
| - expect { Sequel::Migrator.run(db, migration_to_test, allow_missing_migration_files: true) }.not_to raise_error |
| 79 | + expect { Sequel::Migrator.run(db, migrations_path, target: current_migration_index, allow_missing_migration_files: true) }.not_to raise_error |
80 | 80 |
|
81 | 81 | expect(annotation.all.count).to eq(7)
|
82 | 82 | expect(a1.reload).to be_a(annotation)
|
|
98 | 98 | # In case key_prefix is set
|
99 | 99 | annotation.create(resource_guid: i2.guid, key_prefix: 'bommel', key_name: key, value: 'v1')
|
100 | 100 |
|
101 |
| - expect { Sequel::Migrator.run(db, migration_to_test, allow_missing_migration_files: true) }.not_to raise_error |
| 101 | + expect { Sequel::Migrator.run(db, migrations_path, target: current_migration_index, allow_missing_migration_files: true) }.not_to raise_error |
102 | 102 |
|
103 | 103 | expect { annotation.create(resource_guid: i1.guid, key_name: key, value: 'v2') }.to raise_error(Sequel::UniqueConstraintViolation)
|
104 | 104 | expect { annotation.create(resource_guid: i2.guid, key_prefix: 'bommel', key_name: key, value: 'v2') }.to raise_error(Sequel::UniqueConstraintViolation)
|
|
110 | 110 | key_a = 'a' * 63
|
111 | 111 | key_b = 'b' * 63
|
112 | 112 |
|
113 |
| - expect { Sequel::Migrator.run(db, migration_to_test, allow_missing_migration_files: true) }.not_to raise_error |
| 113 | + expect { Sequel::Migrator.run(db, migrations_path, target: current_migration_index, allow_missing_migration_files: true) }.not_to raise_error |
114 | 114 |
|
115 | 115 | # In case key_prefix is not set
|
116 | 116 | a1 = annotation.create(resource_guid: i1.guid, key_name: key_a, value: 'v1')
|
|
152 | 152 | expect(b1.id).to be < b2.id
|
153 | 153 | expect(b1.id).to be < b3.id
|
154 | 154 |
|
155 |
| - expect { Sequel::Migrator.run(db, migration_to_test, allow_missing_migration_files: true) }.not_to raise_error |
| 155 | + expect { Sequel::Migrator.run(db, migrations_path, target: current_migration_index, allow_missing_migration_files: true) }.not_to raise_error |
156 | 156 | expect(label.where(key_name: key).count).to eq(2)
|
157 | 157 | expect(a1.reload).to be_a(label)
|
158 | 158 | expect { a2.reload }.to raise_error(Sequel::NoExistingObject)
|
|
178 | 178 | b3 = label.create(resource_guid: i1.guid, key_prefix: 'bommel', key_name: key_b, value: 'v3')
|
179 | 179 | b4 = label.create(resource_guid: i1.guid, key_prefix: 'sword', key_name: key_a, value: 'v4')
|
180 | 180 |
|
181 |
| - expect { Sequel::Migrator.run(db, migration_to_test, allow_missing_migration_files: true) }.not_to raise_error |
| 181 | + expect { Sequel::Migrator.run(db, migrations_path, target: current_migration_index, allow_missing_migration_files: true) }.not_to raise_error |
182 | 182 |
|
183 | 183 | expect(label.all.count).to eq(7)
|
184 | 184 | expect(a1.reload).to be_a(label)
|
|
200 | 200 | # In case key_prefix is set
|
201 | 201 | label.create(resource_guid: i2.guid, key_prefix: 'bommel', key_name: key, value: 'v1')
|
202 | 202 |
|
203 |
| - expect { Sequel::Migrator.run(db, migration_to_test, allow_missing_migration_files: true) }.not_to raise_error |
| 203 | + expect { Sequel::Migrator.run(db, migrations_path, target: current_migration_index, allow_missing_migration_files: true) }.not_to raise_error |
204 | 204 |
|
205 | 205 | expect { label.create(resource_guid: i1.guid, key_name: key, value: 'v2') }.to raise_error(Sequel::UniqueConstraintViolation)
|
206 | 206 | expect { label.create(resource_guid: i2.guid, key_prefix: 'bommel', key_name: key, value: 'v2') }.to raise_error(Sequel::UniqueConstraintViolation)
|
|
212 | 212 | key_a = 'a' * 63
|
213 | 213 | key_b = 'b' * 63
|
214 | 214 |
|
215 |
| - expect { Sequel::Migrator.run(db, migration_to_test, allow_missing_migration_files: true) }.not_to raise_error |
| 215 | + expect { Sequel::Migrator.run(db, migrations_path, target: current_migration_index, allow_missing_migration_files: true) }.not_to raise_error |
216 | 216 |
|
217 | 217 | # In case key_prefix is not set
|
218 | 218 | a1 = label.create(resource_guid: i1.guid, key_name: key_a, value: 'v1')
|
|
0 commit comments