mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[2.1.x] Fixed #29749 -- Made the migrations loader ignore files starting with a tilde or underscore.
Regression in29150d5da8. Backport of32fbccab40from master
This commit is contained in:
		| @@ -500,6 +500,14 @@ class LoaderTests(TestCase): | ||||
|         } | ||||
|         self.assertEqual(plan, expected_plan) | ||||
|  | ||||
|     @override_settings(MIGRATION_MODULES={'migrations': 'migrations.test_migrations_private'}) | ||||
|     def test_ignore_files(self): | ||||
|         """Files prefixed with underscore, tilde, or dot aren't loaded.""" | ||||
|         loader = MigrationLoader(connection) | ||||
|         loader.load_disk() | ||||
|         migrations = [name for app, name in loader.disk_migrations if app == 'migrations'] | ||||
|         self.assertEqual(migrations, ['0001_initial']) | ||||
|  | ||||
|  | ||||
| class PycLoaderTests(MigrationTestBase): | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user