def forwards(self, orm):

        from django_authenticator.util import migration_was_applied
        if migration_was_applied(__file__, 'django_authopenid'):
            return
        
        # Deleting model 'ExternalLoginData'
        db.delete_table('django_authopenid_externallogindata')
Exemple #2
0
    def forwards(self, orm):

        from django_authenticator.util import migration_was_applied
        if migration_was_applied(__file__, 'django_authopenid'):
            return

        # Deleting model 'ExternalLoginData'
        db.delete_table('django_authopenid_externallogindata')
    def forwards(self, orm):
        "determines openid provider from url"

        from django_authenticator.util import migration_was_applied
        if migration_was_applied(__file__, 'django_authopenid'):
            return

        for assoc in orm['django_authopenid.UserAssociation'].objects.all():
            assoc.provider_name = util.get_openid_provider_name(assoc.openid_url)
            print '%s -> %s' % (assoc.user.username, assoc.provider_name)
            assoc.save()
    def forwards(self, orm):
        "determines openid provider from url"

        from django_authenticator.util import migration_was_applied
        if migration_was_applied(__file__, 'django_authopenid'):
            return

        for assoc in orm['django_authopenid.UserAssociation'].objects.all():
            assoc.provider_name = util.get_openid_provider_name(
                assoc.openid_url)
            print '%s -> %s' % (assoc.user.username, assoc.provider_name)
            assoc.save()
    def forwards(self, orm):

        from django_authenticator.util import migration_was_applied
        if migration_was_applied(__file__, 'django_authopenid'):
            return
        
        # Adding model 'Nonce'
        db.create_table('django_authopenid_nonce', (
            ('timestamp', self.gf('django.db.models.fields.IntegerField')()),
            ('salt', self.gf('django.db.models.fields.CharField')(max_length=40)),
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('server_url', self.gf('django.db.models.fields.CharField')(max_length=255)),
        ))
        db.send_create_signal('django_authenticator', ['Nonce'])

        # Adding model 'Association'
        db.create_table('django_authopenid_association', (
            ('handle', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('issued', self.gf('django.db.models.fields.IntegerField')()),
            ('server_url', self.gf('django.db.models.fields.TextField')(max_length=2047)),
            ('assoc_type', self.gf('django.db.models.fields.TextField')(max_length=64)),
            ('secret', self.gf('django.db.models.fields.TextField')(max_length=255)),
            ('lifetime', self.gf('django.db.models.fields.IntegerField')()),
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
        ))
        db.send_create_signal('django_authenticator', ['Association'])

        # Adding model 'UserAssociation'
        db.create_table('django_authopenid_userassociation', (
            ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], unique=True)),
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('openid_url', self.gf('django.db.models.fields.CharField')(max_length=255)),
        ))
        db.send_create_signal('django_authenticator', ['UserAssociation'])

        # Adding model 'UserPasswordQueue'
        db.create_table('django_authopenid_userpasswordqueue', (
            ('new_password', self.gf('django.db.models.fields.CharField')(max_length=30)),
            ('confirm_key', self.gf('django.db.models.fields.CharField')(max_length=40)),
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], unique=True)),
        ))
        db.send_create_signal('django_authenticator', ['UserPasswordQueue'])

        # Adding model 'ExternalLoginData'
        db.create_table('django_authopenid_externallogindata', (
            ('external_username', self.gf('django.db.models.fields.CharField')(unique=True, max_length=40)),
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('external_session_data', self.gf('django.db.models.fields.TextField')()),
            ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True)),
        ))
        db.send_create_signal('django_authenticator', ['ExternalLoginData'])
    def forwards(self, orm):

        from django_authenticator.util import migration_was_applied
        if migration_was_applied(__file__, 'django_authopenid'):
            return
        
        # Adding field 'UserAssociation.provider_name'
        db.add_column('django_authopenid_userassociation', 'provider_name', self.gf('django.db.models.fields.CharField')(default='unknown', max_length=64), keep_default=False)

        # Removing unique constraint on 'UserAssociation', fields ['user']
        db.delete_unique('django_authopenid_userassociation', ['user_id'])

        # Adding unique constraint on 'UserAssociation', fields ['provider_name', 'user']
        db.create_unique('django_authopenid_userassociation', ['provider_name', 'user_id'])
    def forwards(self, orm):

        from django_authenticator.util import migration_was_applied
        if migration_was_applied(__file__, 'django_authopenid'):
            return

        # Adding field 'UserAssociation.provider_name'
        db.add_column('django_authopenid_userassociation',
                      'provider_name',
                      self.gf('django.db.models.fields.CharField')(
                          default='unknown', max_length=64),
                      keep_default=False)

        # Removing unique constraint on 'UserAssociation', fields ['user']
        db.delete_unique('django_authopenid_userassociation', ['user_id'])

        # Adding unique constraint on 'UserAssociation', fields ['provider_name', 'user']
        db.create_unique('django_authopenid_userassociation',
                         ['provider_name', 'user_id'])
Exemple #8
0
    def forwards(self, orm):

        from django_authenticator.util import migration_was_applied
        if migration_was_applied(__file__, 'django_authopenid'):
            return

        # Adding model 'Nonce'
        db.create_table('django_authopenid_nonce', (
            ('timestamp', self.gf('django.db.models.fields.IntegerField')()),
            ('salt',
             self.gf('django.db.models.fields.CharField')(max_length=40)),
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('server_url',
             self.gf('django.db.models.fields.CharField')(max_length=255)),
        ))
        db.send_create_signal('django_authenticator', ['Nonce'])

        # Adding model 'Association'
        db.create_table('django_authopenid_association', (
            ('handle',
             self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('issued', self.gf('django.db.models.fields.IntegerField')()),
            ('server_url',
             self.gf('django.db.models.fields.TextField')(max_length=2047)),
            ('assoc_type',
             self.gf('django.db.models.fields.TextField')(max_length=64)),
            ('secret',
             self.gf('django.db.models.fields.TextField')(max_length=255)),
            ('lifetime', self.gf('django.db.models.fields.IntegerField')()),
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
        ))
        db.send_create_signal('django_authenticator', ['Association'])

        # Adding model 'UserAssociation'
        db.create_table('django_authopenid_userassociation', (
            ('user', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['auth.User'], unique=True)),
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('openid_url',
             self.gf('django.db.models.fields.CharField')(max_length=255)),
        ))
        db.send_create_signal('django_authenticator', ['UserAssociation'])

        # Adding model 'UserPasswordQueue'
        db.create_table('django_authopenid_userpasswordqueue', (
            ('new_password',
             self.gf('django.db.models.fields.CharField')(max_length=30)),
            ('confirm_key',
             self.gf('django.db.models.fields.CharField')(max_length=40)),
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('user', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['auth.User'], unique=True)),
        ))
        db.send_create_signal('django_authenticator', ['UserPasswordQueue'])

        # Adding model 'ExternalLoginData'
        db.create_table('django_authopenid_externallogindata', (
            ('external_username', self.gf('django.db.models.fields.CharField')(
                unique=True, max_length=40)),
            ('id',
             self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('external_session_data',
             self.gf('django.db.models.fields.TextField')()),
            ('user', self.gf('django.db.models.fields.related.ForeignKey')(
                to=orm['auth.User'], null=True)),
        ))
        db.send_create_signal('django_authenticator', ['ExternalLoginData'])