mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	This replaces django.db.backends.postgresql_psycopg2, which has been an alias to django.db.backends.postgresql since Django 1.9.
		
			
				
	
	
		
			23 lines
		
	
	
		
			730 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			730 B
		
	
	
	
		
			Python
		
	
	
	
	
	
# Generated by Django 1.11.6 on 2017-11-30 04:58
 | 
						|
 | 
						|
from django.db import migrations
 | 
						|
from django.db.backends.postgresql.schema import DatabaseSchemaEditor
 | 
						|
from django.db.migrations.state import StateApps
 | 
						|
 | 
						|
 | 
						|
def remove_prereg_users_without_realm(
 | 
						|
        apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None:
 | 
						|
    prereg_model = apps.get_model("zerver", "PreregistrationUser")
 | 
						|
    prereg_model.objects.filter(realm=None, realm_creation=False).delete()
 | 
						|
 | 
						|
class Migration(migrations.Migration):
 | 
						|
 | 
						|
    dependencies = [
 | 
						|
        ('zerver', '0125_realm_max_invites'),
 | 
						|
    ]
 | 
						|
 | 
						|
    operations = [
 | 
						|
        migrations.RunPython(remove_prereg_users_without_realm,
 | 
						|
                             reverse_code=migrations.RunPython.noop),
 | 
						|
    ]
 |