From 945337177d35a5c038e29b6594e1251f26d42156 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 29 Mar 2014 11:56:29 -0500 Subject: Add last_modified column to mirrors This will make it easier in the future to clear out inactive mirrors that haven't been touched in a while. Signed-off-by: Dan McGee --- .../0028_auto__add_field_mirror_last_modified.py | 87 ++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 mirrors/migrations/0028_auto__add_field_mirror_last_modified.py (limited to 'mirrors/migrations') diff --git a/mirrors/migrations/0028_auto__add_field_mirror_last_modified.py b/mirrors/migrations/0028_auto__add_field_mirror_last_modified.py new file mode 100644 index 00000000..dbd4b129 --- /dev/null +++ b/mirrors/migrations/0028_auto__add_field_mirror_last_modified.py @@ -0,0 +1,87 @@ +# -*- coding: utf-8 -*- +from south.utils import datetime_utils as datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + db.add_column(u'mirrors_mirror', 'last_modified', + self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now()), + keep_default=False) + orm.Mirror.objects.update(last_modified=models.F('created')) + + def backwards(self, orm): + db.delete_column(u'mirrors_mirror', 'last_modified') + + + models = { + u'mirrors.checklocation': { + 'Meta': {'ordering': "('hostname', 'source_ip')", 'object_name': 'CheckLocation'}, + 'country': ('django_countries.fields.CountryField', [], {'max_length': '2'}), + 'created': ('django.db.models.fields.DateTimeField', [], {}), + 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'source_ip': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}) + }, + u'mirrors.mirror': { + 'Meta': {'ordering': "('name',)", 'object_name': 'Mirror'}, + 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), + 'alternate_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), + 'bug': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}), + 'created': ('django.db.models.fields.DateTimeField', [], {}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'last_modified': ('django.db.models.fields.DateTimeField', [], {}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), + 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), + 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), + 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), + 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['mirrors.Mirror']", 'null': 'True', 'on_delete': 'models.SET_NULL'}) + }, + u'mirrors.mirrorlog': { + 'Meta': {'object_name': 'MirrorLog'}, + 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), + 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), + 'error': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), + 'location': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'null': 'True', 'to': u"orm['mirrors.CheckLocation']"}), + 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': u"orm['mirrors.MirrorUrl']"}) + }, + u'mirrors.mirrorprotocol': { + 'Meta': {'ordering': "('protocol',)", 'object_name': 'MirrorProtocol'}, + 'created': ('django.db.models.fields.DateTimeField', [], {}), + 'default': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) + }, + u'mirrors.mirrorrsync': { + 'Meta': {'ordering': "('ip',)", 'object_name': 'MirrorRsync'}, + 'created': ('django.db.models.fields.DateTimeField', [], {}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'ip': ('mirrors.fields.IPNetworkField', [], {'max_length': '44'}), + 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': u"orm['mirrors.Mirror']"}) + }, + u'mirrors.mirrorurl': { + 'Meta': {'object_name': 'MirrorUrl'}, + 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'country': ('django_countries.fields.CountryField', [], {'db_index': 'True', 'max_length': '2', 'blank': 'True'}), + 'created': ('django.db.models.fields.DateTimeField', [], {}), + 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': u"orm['mirrors.Mirror']"}), + 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'on_delete': 'models.PROTECT', 'to': u"orm['mirrors.MirrorProtocol']"}), + 'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) + } + } + + complete_apps = ['mirrors'] -- cgit v1.2.3-2-g168b From 6a09ffdd8e7ed12b73d181f0530510562ec7e316 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 29 Mar 2014 12:28:05 -0500 Subject: Protect ORM migration portion in db.dry_run Signed-off-by: Dan McGee --- mirrors/migrations/0028_auto__add_field_mirror_last_modified.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mirrors/migrations') diff --git a/mirrors/migrations/0028_auto__add_field_mirror_last_modified.py b/mirrors/migrations/0028_auto__add_field_mirror_last_modified.py index dbd4b129..35e80733 100644 --- a/mirrors/migrations/0028_auto__add_field_mirror_last_modified.py +++ b/mirrors/migrations/0028_auto__add_field_mirror_last_modified.py @@ -11,7 +11,8 @@ class Migration(SchemaMigration): db.add_column(u'mirrors_mirror', 'last_modified', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now()), keep_default=False) - orm.Mirror.objects.update(last_modified=models.F('created')) + if not db.dry_run: + orm.Mirror.objects.update(last_modified=models.F('created')) def backwards(self, orm): db.delete_column(u'mirrors_mirror', 'last_modified') -- cgit v1.2.3-2-g168b From 51d90e23c9237772a2c327a7fe518d5554532861 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 28 Jun 2014 12:04:19 -0500 Subject: Remove old south migrations Django 1.7 has built-in migrations support, so we no longer want these around. All existing installs should be fully migrated at this point to the latest schema. Signed-off-by: Dan McGee --- mirrors/migrations/0001_initial.py | 17 ---- mirrors/migrations/0002_rename_model_tables.py | 80 ------------------ mirrors/migrations/0003_auto__add_mirrorlog.py | 72 ---------------- ...4_auto__add_field_mirrorprotocol_is_download.py | 62 -------------- .../0005_populate_protocol_is_download.py | 64 -------------- ...orurl_has_ipv4__add_field_mirrorurl_has_ipv6.py | 66 --------------- mirrors/migrations/0007_unique_names_urls.py | 66 --------------- .../0008_auto__add_field_mirrorurl_country.py | 67 --------------- .../0009_auto__chg_field_mirrorurl_country.py | 66 --------------- .../0010_auto__add_field_mirrorprotocol_default.py | 66 --------------- .../migrations/0011_adjust_protocol_defaults.py | 67 --------------- .../0012_auto__add_on_delete_attribute.py | 68 --------------- mirrors/migrations/0013_rename_country_fields.py | 68 --------------- mirrors/migrations/0014_add_country_code_fields.py | 74 ----------------- mirrors/migrations/0015_assign_country_codes.py | 93 --------------------- ...country_old__del_field_mirrorurl_country_old.py | 76 ----------------- .../0017_auto__chg_field_mirrorlog_error.py | 66 --------------- .../0018_auto__add_field_mirror_alternate_email.py | 68 --------------- .../migrations/0019_move_country_data_to_url.py | 74 ----------------- .../0020_auto__del_field_mirror_country.py | 70 ---------------- .../0021_auto__chg_field_mirrorrsync_ip.py | 66 --------------- mirrors/migrations/0022_auto__add_checklocation.py | 83 ------------------ ...created__add_field_mirrorrsync_created__add_.py | 97 ---------------------- .../0024_auto__add_field_mirrorlog_location.py | 83 ------------------ .../0025_auto__chg_field_mirrorrsync_ip.py | 85 ------------------- .../0026_auto__add_field_mirrorurl_active.py | 83 ------------------ .../migrations/0027_auto__add_field_mirror_bug.py | 91 -------------------- .../0028_auto__add_field_mirror_last_modified.py | 88 -------------------- 28 files changed, 2026 deletions(-) delete mode 100644 mirrors/migrations/0001_initial.py delete mode 100644 mirrors/migrations/0002_rename_model_tables.py delete mode 100644 mirrors/migrations/0003_auto__add_mirrorlog.py delete mode 100644 mirrors/migrations/0004_auto__add_field_mirrorprotocol_is_download.py delete mode 100644 mirrors/migrations/0005_populate_protocol_is_download.py delete mode 100644 mirrors/migrations/0006_auto__add_field_mirrorurl_has_ipv4__add_field_mirrorurl_has_ipv6.py delete mode 100644 mirrors/migrations/0007_unique_names_urls.py delete mode 100644 mirrors/migrations/0008_auto__add_field_mirrorurl_country.py delete mode 100644 mirrors/migrations/0009_auto__chg_field_mirrorurl_country.py delete mode 100644 mirrors/migrations/0010_auto__add_field_mirrorprotocol_default.py delete mode 100644 mirrors/migrations/0011_adjust_protocol_defaults.py delete mode 100644 mirrors/migrations/0012_auto__add_on_delete_attribute.py delete mode 100644 mirrors/migrations/0013_rename_country_fields.py delete mode 100644 mirrors/migrations/0014_add_country_code_fields.py delete mode 100644 mirrors/migrations/0015_assign_country_codes.py delete mode 100644 mirrors/migrations/0016_auto__del_field_mirror_country_old__del_field_mirrorurl_country_old.py delete mode 100644 mirrors/migrations/0017_auto__chg_field_mirrorlog_error.py delete mode 100644 mirrors/migrations/0018_auto__add_field_mirror_alternate_email.py delete mode 100644 mirrors/migrations/0019_move_country_data_to_url.py delete mode 100644 mirrors/migrations/0020_auto__del_field_mirror_country.py delete mode 100644 mirrors/migrations/0021_auto__chg_field_mirrorrsync_ip.py delete mode 100644 mirrors/migrations/0022_auto__add_checklocation.py delete mode 100644 mirrors/migrations/0023_auto__add_field_mirrorurl_created__add_field_mirrorrsync_created__add_.py delete mode 100644 mirrors/migrations/0024_auto__add_field_mirrorlog_location.py delete mode 100644 mirrors/migrations/0025_auto__chg_field_mirrorrsync_ip.py delete mode 100644 mirrors/migrations/0026_auto__add_field_mirrorurl_active.py delete mode 100644 mirrors/migrations/0027_auto__add_field_mirror_bug.py delete mode 100644 mirrors/migrations/0028_auto__add_field_mirror_last_modified.py (limited to 'mirrors/migrations') diff --git a/mirrors/migrations/0001_initial.py b/mirrors/migrations/0001_initial.py deleted file mode 100644 index 4a3173c5..00000000 --- a/mirrors/migrations/0001_initial.py +++ /dev/null @@ -1,17 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - pass - - def backwards(self, orm): - pass - - models = {} - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0002_rename_model_tables.py b/mirrors/migrations/0002_rename_model_tables.py deleted file mode 100644 index 087edd68..00000000 --- a/mirrors/migrations/0002_rename_model_tables.py +++ /dev/null @@ -1,80 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - depends_on = ( - ('main', '0030_move_mirror_models'), - ) - - mirror_apps = [ 'mirror', 'mirrorprotocol', 'mirrorurl', 'mirrorrsync' ] - - def forwards(self, orm): - db.rename_table('main_mirror', 'mirrors_mirror') - db.rename_table('main_mirrorurl', 'mirrors_mirrorurl') - db.rename_table('main_mirrorrsync', 'mirrors_mirrorrsync') - db.rename_table('main_mirrorprotocol', 'mirrors_mirrorprotocol') - - if not db.dry_run: - ct = orm['contenttypes.ContentType'].objects - ct.filter(app_label='main', model__in=self.mirror_apps).update( - app_label='mirrors') - - def backwards(self, orm): - db.rename_table('mirrors_mirror', 'main_mirror') - db.rename_table('mirrors_mirrorurl', 'main_mirrorurl') - db.rename_table('mirrors_mirrorrsync', 'main_mirrorrsync') - db.rename_table('mirrors_mirrorprotocol', 'main_mirrorprotocol') - - if not db.dry_run: - ct = orm['contenttypes.ContentType'].objects - ct.filter(app_label='mirrors', model__in=self.mirror_apps).update( - app_label='main') - - models = { - 'mirrors.mirror': { - 'Meta': {'ordering': "('country', 'name')", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['mirrors.Mirror']", 'null': 'True'}) - }, - 'mirrors.mirrorprotocol': { - 'Meta': {'object_name': 'MirrorProtocol'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - 'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '24'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': "orm['mirrors.Mirror']"}) - }, - 'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0003_auto__add_mirrorlog.py b/mirrors/migrations/0003_auto__add_mirrorlog.py deleted file mode 100644 index 5b4c225b..00000000 --- a/mirrors/migrations/0003_auto__add_mirrorlog.py +++ /dev/null @@ -1,72 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'MirrorLog' - db.create_table('mirrors_mirrorlog', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('url', self.gf('django.db.models.fields.related.ForeignKey')(related_name='logs', to=orm['mirrors.MirrorUrl'])), - ('check_time', self.gf('django.db.models.fields.DateTimeField')(db_index=True)), - ('last_sync', self.gf('django.db.models.fields.DateTimeField')(null=True)), - ('duration', self.gf('django.db.models.fields.FloatField')(null=True)), - ('is_success', self.gf('django.db.models.fields.BooleanField')(default=True)), - ('error', self.gf('django.db.models.fields.CharField')(default='', max_length=255, blank=True)), - )) - db.send_create_signal('mirrors', ['MirrorLog']) - - def backwards(self, orm): - # Deleting model 'MirrorLog' - db.delete_table('mirrors_mirrorlog') - - models = { - 'mirrors.mirror': { - 'Meta': {'ordering': "('country', 'name')", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['mirrors.Mirror']", 'null': 'True'}) - }, - 'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': "orm['mirrors.MirrorUrl']"}) - }, - 'mirrors.mirrorprotocol': { - 'Meta': {'object_name': 'MirrorProtocol'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - 'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '24'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': "orm['mirrors.Mirror']"}) - }, - 'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0004_auto__add_field_mirrorprotocol_is_download.py b/mirrors/migrations/0004_auto__add_field_mirrorprotocol_is_download.py deleted file mode 100644 index 0506e2cd..00000000 --- a/mirrors/migrations/0004_auto__add_field_mirrorprotocol_is_download.py +++ /dev/null @@ -1,62 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - db.add_column('mirrors_mirrorprotocol', 'is_download', self.gf('django.db.models.fields.BooleanField')(default=True), keep_default=True) - - def backwards(self, orm): - db.delete_column('mirrors_mirrorprotocol', 'is_download') - - models = { - 'mirrors.mirror': { - 'Meta': {'ordering': "('country', 'name')", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['mirrors.Mirror']", 'null': 'True'}) - }, - 'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': "orm['mirrors.MirrorUrl']"}) - }, - 'mirrors.mirrorprotocol': { - 'Meta': {'object_name': 'MirrorProtocol'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - 'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '24'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': "orm['mirrors.Mirror']"}) - }, - 'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0005_populate_protocol_is_download.py b/mirrors/migrations/0005_populate_protocol_is_download.py deleted file mode 100644 index 6d488388..00000000 --- a/mirrors/migrations/0005_populate_protocol_is_download.py +++ /dev/null @@ -1,64 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models - -class Migration(DataMigration): - - def forwards(self, orm): - orm.MirrorProtocol.objects.filter(protocol__iexact='ftp').update(is_download=True) - orm.MirrorProtocol.objects.filter(protocol__iexact='http').update(is_download=True) - orm.MirrorProtocol.objects.filter(protocol__iexact='rsync').update(is_download=False) - - def backwards(self, orm): - pass - - models = { - 'mirrors.mirror': { - 'Meta': {'ordering': "('country', 'name')", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['mirrors.Mirror']", 'null': 'True'}) - }, - 'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': "orm['mirrors.MirrorUrl']"}) - }, - 'mirrors.mirrorprotocol': { - 'Meta': {'object_name': 'MirrorProtocol'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - 'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '24'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': "orm['mirrors.Mirror']"}) - }, - 'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0006_auto__add_field_mirrorurl_has_ipv4__add_field_mirrorurl_has_ipv6.py b/mirrors/migrations/0006_auto__add_field_mirrorurl_has_ipv4__add_field_mirrorurl_has_ipv6.py deleted file mode 100644 index 5a40207d..00000000 --- a/mirrors/migrations/0006_auto__add_field_mirrorurl_has_ipv4__add_field_mirrorurl_has_ipv6.py +++ /dev/null @@ -1,66 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - db.add_column('mirrors_mirrorurl', 'has_ipv4', self.gf('django.db.models.fields.BooleanField')(default=True), keep_default=True) - db.add_column('mirrors_mirrorurl', 'has_ipv6', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=True) - - def backwards(self, orm): - db.delete_column('mirrors_mirrorurl', 'has_ipv4') - db.delete_column('mirrors_mirrorurl', 'has_ipv6') - - models = { - 'mirrors.mirror': { - 'Meta': {'ordering': "('country', 'name')", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['mirrors.Mirror']", 'null': 'True'}) - }, - 'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': "orm['mirrors.MirrorUrl']"}) - }, - 'mirrors.mirrorprotocol': { - 'Meta': {'object_name': 'MirrorProtocol'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - 'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '24'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': "orm['mirrors.Mirror']"}) - }, - 'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0007_unique_names_urls.py b/mirrors/migrations/0007_unique_names_urls.py deleted file mode 100644 index 49c0fbb7..00000000 --- a/mirrors/migrations/0007_unique_names_urls.py +++ /dev/null @@ -1,66 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - db.create_unique('mirrors_mirror', ['name']) - db.create_unique('mirrors_mirrorurl', ['url']) - - def backwards(self, orm): - db.delete_unique('mirrors_mirrorurl', ['url']) - db.delete_unique('mirrors_mirror', ['name']) - - models = { - 'mirrors.mirror': { - 'Meta': {'ordering': "('country', 'name')", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['mirrors.Mirror']", 'null': 'True'}) - }, - 'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': "orm['mirrors.MirrorUrl']"}) - }, - 'mirrors.mirrorprotocol': { - 'Meta': {'ordering': "('protocol',)", 'object_name': 'MirrorProtocol'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - 'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '24'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': "orm['mirrors.Mirror']"}) - }, - 'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0008_auto__add_field_mirrorurl_country.py b/mirrors/migrations/0008_auto__add_field_mirrorurl_country.py deleted file mode 100644 index 660ac080..00000000 --- a/mirrors/migrations/0008_auto__add_field_mirrorurl_country.py +++ /dev/null @@ -1,67 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'MirrorUrl.country' - db.add_column('mirrors_mirrorurl', 'country', self.gf('django.db.models.fields.CharField')(db_index=True, max_length=255, null=True, blank=True), keep_default=False) - - def backwards(self, orm): - # Deleting field 'MirrorUrl.country' - db.delete_column('mirrors_mirrorurl', 'country') - - models = { - 'mirrors.mirror': { - 'Meta': {'ordering': "('country', 'name')", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['mirrors.Mirror']", 'null': 'True'}) - }, - 'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': "orm['mirrors.MirrorUrl']"}) - }, - 'mirrors.mirrorprotocol': { - 'Meta': {'ordering': "('protocol',)", 'object_name': 'MirrorProtocol'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - 'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '24'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': "orm['mirrors.Mirror']"}) - }, - 'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'country': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0009_auto__chg_field_mirrorurl_country.py b/mirrors/migrations/0009_auto__chg_field_mirrorurl_country.py deleted file mode 100644 index bca6b6fb..00000000 --- a/mirrors/migrations/0009_auto__chg_field_mirrorurl_country.py +++ /dev/null @@ -1,66 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - pass - - - def backwards(self, orm): - pass - - models = { - 'mirrors.mirror': { - 'Meta': {'ordering': "('country', 'name')", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['mirrors.Mirror']", 'null': 'True'}) - }, - 'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': "orm['mirrors.MirrorUrl']"}) - }, - 'mirrors.mirrorprotocol': { - 'Meta': {'ordering': "('protocol',)", 'object_name': 'MirrorProtocol'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - 'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '24'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': "orm['mirrors.Mirror']"}) - }, - 'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'country': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0010_auto__add_field_mirrorprotocol_default.py b/mirrors/migrations/0010_auto__add_field_mirrorprotocol_default.py deleted file mode 100644 index 66e60090..00000000 --- a/mirrors/migrations/0010_auto__add_field_mirrorprotocol_default.py +++ /dev/null @@ -1,66 +0,0 @@ -# encoding: utf-8 -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -class Migration(SchemaMigration): - - def forwards(self, orm): - db.add_column('mirrors_mirrorprotocol', 'default', self.gf('django.db.models.fields.BooleanField')(default=True), keep_default=True) - - def backwards(self, orm): - db.delete_column('mirrors_mirrorprotocol', 'default') - - - models = { - 'mirrors.mirror': { - 'Meta': {'ordering': "('country', 'name')", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['mirrors.Mirror']", 'null': 'True'}) - }, - 'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': "orm['mirrors.MirrorUrl']"}) - }, - 'mirrors.mirrorprotocol': { - 'Meta': {'ordering': "('protocol',)", 'object_name': 'MirrorProtocol'}, - 'default': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - 'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '24'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': "orm['mirrors.Mirror']"}) - }, - 'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'country': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0011_adjust_protocol_defaults.py b/mirrors/migrations/0011_adjust_protocol_defaults.py deleted file mode 100644 index a5ffafb4..00000000 --- a/mirrors/migrations/0011_adjust_protocol_defaults.py +++ /dev/null @@ -1,67 +0,0 @@ -# encoding: utf-8 -from south.db import db -from south.v2 import DataMigration -from django.db import models - -class Migration(DataMigration): - - def forwards(self, orm): - orm.MirrorProtocol.objects.all().update(default=False) - orm.MirrorProtocol.objects.filter(protocol='http').update(default=True) - - def backwards(self, orm): - pass - - - models = { - 'mirrors.mirror': { - 'Meta': {'ordering': "('country', 'name')", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['mirrors.Mirror']", 'null': 'True'}) - }, - 'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': "orm['mirrors.MirrorUrl']"}) - }, - 'mirrors.mirrorprotocol': { - 'Meta': {'ordering': "('protocol',)", 'object_name': 'MirrorProtocol'}, - 'default': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - 'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '24'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': "orm['mirrors.Mirror']"}) - }, - 'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'country': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0012_auto__add_on_delete_attribute.py b/mirrors/migrations/0012_auto__add_on_delete_attribute.py deleted file mode 100644 index f81fe0ae..00000000 --- a/mirrors/migrations/0012_auto__add_on_delete_attribute.py +++ /dev/null @@ -1,68 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - db.alter_column('mirrors_mirror', 'upstream_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['mirrors.Mirror'], null=True, on_delete=models.SET_NULL)) - db.alter_column('mirrors_mirrorurl', 'protocol_id', self.gf('django.db.models.fields.related.ForeignKey')(on_delete=models.PROTECT, to=orm['mirrors.MirrorProtocol'])) - - def backwards(self, orm): - db.alter_column('mirrors_mirror', 'upstream_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['mirrors.Mirror'], null=True)) - db.alter_column('mirrors_mirrorurl', 'protocol_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['mirrors.MirrorProtocol'])) - - models = { - 'mirrors.mirror': { - 'Meta': {'ordering': "('country', 'name')", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['mirrors.Mirror']", 'null': 'True', 'on_delete': 'models.SET_NULL'}) - }, - 'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': "orm['mirrors.MirrorUrl']"}) - }, - 'mirrors.mirrorprotocol': { - 'Meta': {'ordering': "('protocol',)", 'object_name': 'MirrorProtocol'}, - 'default': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - 'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '24'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': "orm['mirrors.Mirror']"}) - }, - 'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'country': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'on_delete': 'models.PROTECT', 'to': "orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0013_rename_country_fields.py b/mirrors/migrations/0013_rename_country_fields.py deleted file mode 100644 index 8a9bc34a..00000000 --- a/mirrors/migrations/0013_rename_country_fields.py +++ /dev/null @@ -1,68 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - db.rename_column('mirrors_mirror', 'country', 'country_old') - db.rename_column('mirrors_mirrorurl', 'country', 'country_old') - - def backwards(self, orm): - db.rename_column('mirrors_mirror', 'country_old', 'country') - db.rename_column('mirrors_mirrorurl', 'country_old', 'country') - - models = { - 'mirrors.mirror': { - 'Meta': {'ordering': "('country_old', 'name')", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'country_old': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['mirrors.Mirror']", 'null': 'True', 'on_delete': 'models.SET_NULL'}) - }, - 'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': "orm['mirrors.MirrorUrl']"}) - }, - 'mirrors.mirrorprotocol': { - 'Meta': {'ordering': "('protocol',)", 'object_name': 'MirrorProtocol'}, - 'default': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - 'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '24'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': "orm['mirrors.Mirror']"}) - }, - 'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'country_old': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'on_delete': 'models.PROTECT', 'to': "orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0014_add_country_code_fields.py b/mirrors/migrations/0014_add_country_code_fields.py deleted file mode 100644 index 010194d7..00000000 --- a/mirrors/migrations/0014_add_country_code_fields.py +++ /dev/null @@ -1,74 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - db.add_column('mirrors_mirror', 'country', - self.gf('django_countries.fields.CountryField')(default='', max_length=2, blank=True), - keep_default=False) - db.add_column('mirrors_mirrorurl', 'country', - self.gf('django_countries.fields.CountryField')(default='', max_length=2, blank=True), - keep_default=False) - - def backwards(self, orm): - db.delete_column('mirrors_mirror', 'country') - db.delete_column('mirrors_mirrorurl', 'country') - - models = { - 'mirrors.mirror': { - 'Meta': {'ordering': "('country', 'name')", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'country_old': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['mirrors.Mirror']", 'null': 'True', 'on_delete': 'models.SET_NULL'}) - }, - 'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': "orm['mirrors.MirrorUrl']"}) - }, - 'mirrors.mirrorprotocol': { - 'Meta': {'ordering': "('protocol',)", 'object_name': 'MirrorProtocol'}, - 'default': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - 'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '24'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': "orm['mirrors.Mirror']"}) - }, - 'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'country_old': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'on_delete': 'models.PROTECT', 'to': "orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0015_assign_country_codes.py b/mirrors/migrations/0015_assign_country_codes.py deleted file mode 100644 index 5d83e02c..00000000 --- a/mirrors/migrations/0015_assign_country_codes.py +++ /dev/null @@ -1,93 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models - -from django_countries.data import COUNTRIES - -class Migration(DataMigration): - - def forwards(self, orm): - reverse_map = dict((v.upper(), k) for k, v in COUNTRIES.items()) - # add a few special cases to the list that we know might exist - reverse_map['GREAT BRITAIN'] = 'GB' - reverse_map['KOREA'] = 'KR' - reverse_map['MACEDONIA'] = 'MK' - reverse_map['RUSSIA'] = 'RU' - reverse_map['SOUTH KOREA'] = 'KR' - reverse_map['TAIWAN'] = 'TW' - reverse_map['VIETNAM'] = 'VN' - - for country_name in orm.Mirror.objects.values_list( - 'country_old', flat=True).order_by().distinct(): - code = reverse_map.get(country_name.upper(), '') - orm.Mirror.objects.filter( - country_old=country_name).update(country=code) - - for country_name in orm.MirrorUrl.objects.filter( - country_old__isnull=False).values_list( - 'country_old', flat=True).order_by().distinct(): - code = reverse_map.get(country_name.upper(), '') - orm.MirrorUrl.objects.filter( - country_old=country_name).update(country=code) - - def backwards(self, orm): - orm.MirrorUrl.objects.all().update(country='') - orm.Mirror.objects.all().update(country='') - - models = { - 'mirrors.mirror': { - 'Meta': {'ordering': "('country', 'name')", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'country_old': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['mirrors.Mirror']", 'null': 'True', 'on_delete': 'models.SET_NULL'}) - }, - 'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': "orm['mirrors.MirrorUrl']"}) - }, - 'mirrors.mirrorprotocol': { - 'Meta': {'ordering': "('protocol',)", 'object_name': 'MirrorProtocol'}, - 'default': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - 'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '24'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': "orm['mirrors.Mirror']"}) - }, - 'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), - 'country_old': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'on_delete': 'models.PROTECT', 'to': "orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] - symmetrical = True diff --git a/mirrors/migrations/0016_auto__del_field_mirror_country_old__del_field_mirrorurl_country_old.py b/mirrors/migrations/0016_auto__del_field_mirror_country_old__del_field_mirrorurl_country_old.py deleted file mode 100644 index b296d7ae..00000000 --- a/mirrors/migrations/0016_auto__del_field_mirror_country_old__del_field_mirrorurl_country_old.py +++ /dev/null @@ -1,76 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - db.delete_column('mirrors_mirror', 'country_old') - db.delete_column('mirrors_mirrorurl', 'country_old') - db.create_index('mirrors_mirror', ['country']) - db.create_index('mirrors_mirrorurl', ['country']) - - def backwards(self, orm): - db.delete_index('mirrors_mirrorurl', ['country']) - db.delete_index('mirrors_mirror', ['country']) - db.add_column('mirrors_mirror', 'country_old', - self.gf('django.db.models.fields.CharField')(default='Any', max_length=255, db_index=True), - keep_default=False) - db.add_column('mirrors_mirrorurl', 'country_old', - self.gf('django.db.models.fields.CharField')(blank=True, max_length=255, null=True, db_index=True), - keep_default=False) - - models = { - 'mirrors.mirror': { - 'Meta': {'ordering': "('country', 'name')", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'db_index': 'True', 'max_length': '2', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['mirrors.Mirror']", 'null': 'True', 'on_delete': 'models.SET_NULL'}) - }, - 'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': "orm['mirrors.MirrorUrl']"}) - }, - 'mirrors.mirrorprotocol': { - 'Meta': {'ordering': "('protocol',)", 'object_name': 'MirrorProtocol'}, - 'default': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - 'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '24'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': "orm['mirrors.Mirror']"}) - }, - 'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'country': ('django_countries.fields.CountryField', [], {'db_index': 'True', 'max_length': '2', 'blank': 'True'}), - 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'on_delete': 'models.PROTECT', 'to': "orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0017_auto__chg_field_mirrorlog_error.py b/mirrors/migrations/0017_auto__chg_field_mirrorlog_error.py deleted file mode 100644 index 60c4ec26..00000000 --- a/mirrors/migrations/0017_auto__chg_field_mirrorlog_error.py +++ /dev/null @@ -1,66 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - db.alter_column('mirrors_mirrorlog', 'error', self.gf('django.db.models.fields.TextField')(default='')) - - def backwards(self, orm): - db.alter_column('mirrors_mirrorlog', 'error', self.gf('django.db.models.fields.CharField')(max_length=255)) - - models = { - 'mirrors.mirror': { - 'Meta': {'ordering': "('country', 'name')", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'db_index': 'True', 'max_length': '2', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['mirrors.Mirror']", 'null': 'True', 'on_delete': 'models.SET_NULL'}) - }, - 'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': "orm['mirrors.MirrorUrl']"}) - }, - 'mirrors.mirrorprotocol': { - 'Meta': {'ordering': "('protocol',)", 'object_name': 'MirrorProtocol'}, - 'default': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - 'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '24'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': "orm['mirrors.Mirror']"}) - }, - 'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'country': ('django_countries.fields.CountryField', [], {'db_index': 'True', 'max_length': '2', 'blank': 'True'}), - 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'on_delete': 'models.PROTECT', 'to': "orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0018_auto__add_field_mirror_alternate_email.py b/mirrors/migrations/0018_auto__add_field_mirror_alternate_email.py deleted file mode 100644 index a08699e8..00000000 --- a/mirrors/migrations/0018_auto__add_field_mirror_alternate_email.py +++ /dev/null @@ -1,68 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - def forwards(self, orm): - db.add_column('mirrors_mirror', 'alternate_email', - self.gf('django.db.models.fields.EmailField')(default='', max_length=255, blank=True), - keep_default=False) - - def backwards(self, orm): - db.delete_column('mirrors_mirror', 'alternate_email') - - models = { - 'mirrors.mirror': { - 'Meta': {'ordering': "('country', 'name')", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'alternate_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'db_index': 'True', 'max_length': '2', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['mirrors.Mirror']", 'null': 'True', 'on_delete': 'models.SET_NULL'}) - }, - 'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': "orm['mirrors.MirrorUrl']"}) - }, - 'mirrors.mirrorprotocol': { - 'Meta': {'ordering': "('protocol',)", 'object_name': 'MirrorProtocol'}, - 'default': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - 'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '24'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': "orm['mirrors.Mirror']"}) - }, - 'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'country': ('django_countries.fields.CountryField', [], {'db_index': 'True', 'max_length': '2', 'blank': 'True'}), - 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'on_delete': 'models.PROTECT', 'to': "orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0019_move_country_data_to_url.py b/mirrors/migrations/0019_move_country_data_to_url.py deleted file mode 100644 index 81b7bb3e..00000000 --- a/mirrors/migrations/0019_move_country_data_to_url.py +++ /dev/null @@ -1,74 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models - -class Migration(DataMigration): - - def forwards(self, orm): - for url in orm.MirrorUrl.objects.select_related('mirror').all(): - # set the country field on the URL if we have one, - # and it isn't already set to anything. - if url.country or not url.mirror.country: - continue - orm.MirrorUrl.objects.filter(pk=url.pk).update( - country=url.mirror.country) - - def backwards(self, orm): - pass - - models = { - 'mirrors.mirror': { - 'Meta': {'ordering': "('country', 'name')", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'alternate_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'db_index': 'True', 'max_length': '2', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['mirrors.Mirror']", 'null': 'True', 'on_delete': 'models.SET_NULL'}) - }, - 'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': "orm['mirrors.MirrorUrl']"}) - }, - 'mirrors.mirrorprotocol': { - 'Meta': {'ordering': "('protocol',)", 'object_name': 'MirrorProtocol'}, - 'default': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - 'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '24'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': "orm['mirrors.Mirror']"}) - }, - 'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'country': ('django_countries.fields.CountryField', [], {'db_index': 'True', 'max_length': '2', 'blank': 'True'}), - 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'on_delete': 'models.PROTECT', 'to': "orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] - symmetrical = True diff --git a/mirrors/migrations/0020_auto__del_field_mirror_country.py b/mirrors/migrations/0020_auto__del_field_mirror_country.py deleted file mode 100644 index c2220a50..00000000 --- a/mirrors/migrations/0020_auto__del_field_mirror_country.py +++ /dev/null @@ -1,70 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - db.delete_column('mirrors_mirror', 'country') - - - def backwards(self, orm): - db.add_column('mirrors_mirror', 'country', - self.gf('django_countries.fields.CountryField')(blank=True, default='', max_length=2, db_index=True), - keep_default=False) - - - models = { - 'mirrors.mirror': { - 'Meta': {'ordering': "('name',)", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'alternate_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['mirrors.Mirror']", 'null': 'True', 'on_delete': 'models.SET_NULL'}) - }, - 'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': "orm['mirrors.MirrorUrl']"}) - }, - 'mirrors.mirrorprotocol': { - 'Meta': {'ordering': "('protocol',)", 'object_name': 'MirrorProtocol'}, - 'default': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - 'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '24'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': "orm['mirrors.Mirror']"}) - }, - 'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'country': ('django_countries.fields.CountryField', [], {'db_index': 'True', 'max_length': '2', 'blank': 'True'}), - 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': "orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'on_delete': 'models.PROTECT', 'to': "orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0021_auto__chg_field_mirrorrsync_ip.py b/mirrors/migrations/0021_auto__chg_field_mirrorrsync_ip.py deleted file mode 100644 index bbf14bb0..00000000 --- a/mirrors/migrations/0021_auto__chg_field_mirrorrsync_ip.py +++ /dev/null @@ -1,66 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - db.alter_column(u'mirrors_mirrorrsync', 'ip', self.gf('django.db.models.fields.CharField')(max_length=44)) - - def backwards(self, orm): - db.alter_column(u'mirrors_mirrorrsync', 'ip', self.gf('django.db.models.fields.CharField')(max_length=24)) - - models = { - u'mirrors.mirror': { - 'Meta': {'ordering': "('name',)", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'alternate_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['mirrors.Mirror']", 'null': 'True', 'on_delete': 'models.SET_NULL'}) - }, - u'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': u"orm['mirrors.MirrorUrl']"}) - }, - u'mirrors.mirrorprotocol': { - 'Meta': {'ordering': "('protocol',)", 'object_name': 'MirrorProtocol'}, - 'default': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - u'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '44'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': u"orm['mirrors.Mirror']"}) - }, - u'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'country': ('django_countries.fields.CountryField', [], {'db_index': 'True', 'max_length': '2', 'blank': 'True'}), - 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': u"orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'on_delete': 'models.PROTECT', 'to': u"orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0022_auto__add_checklocation.py b/mirrors/migrations/0022_auto__add_checklocation.py deleted file mode 100644 index 896b2dab..00000000 --- a/mirrors/migrations/0022_auto__add_checklocation.py +++ /dev/null @@ -1,83 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - db.create_table(u'mirrors_checklocation', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('hostname', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('source_ip', self.gf('django.db.models.fields.GenericIPAddressField')(unique=True, max_length=39)), - ('country', self.gf('django_countries.fields.CountryField')(max_length=2)), - ('created', self.gf('django.db.models.fields.DateTimeField')()), - )) - db.send_create_signal(u'mirrors', ['CheckLocation']) - - - def backwards(self, orm): - db.delete_table(u'mirrors_checklocation') - - - models = { - u'mirrors.checklocation': { - 'Meta': {'ordering': "('hostname', 'source_ip')", 'object_name': 'CheckLocation'}, - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2'}), - 'created': ('django.db.models.fields.DateTimeField', [], {}), - 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'source_ip': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}) - }, - u'mirrors.mirror': { - 'Meta': {'ordering': "('name',)", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'alternate_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['mirrors.Mirror']", 'null': 'True', 'on_delete': 'models.SET_NULL'}) - }, - u'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': u"orm['mirrors.MirrorUrl']"}) - }, - u'mirrors.mirrorprotocol': { - 'Meta': {'ordering': "('protocol',)", 'object_name': 'MirrorProtocol'}, - 'default': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - u'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '44'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': u"orm['mirrors.Mirror']"}) - }, - u'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'country': ('django_countries.fields.CountryField', [], {'db_index': 'True', 'max_length': '2', 'blank': 'True'}), - 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': u"orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'on_delete': 'models.PROTECT', 'to': u"orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0023_auto__add_field_mirrorurl_created__add_field_mirrorrsync_created__add_.py b/mirrors/migrations/0023_auto__add_field_mirrorurl_created__add_field_mirrorrsync_created__add_.py deleted file mode 100644 index 1a1f48a0..00000000 --- a/mirrors/migrations/0023_auto__add_field_mirrorurl_created__add_field_mirrorrsync_created__add_.py +++ /dev/null @@ -1,97 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models -from pytz import utc - - -class Migration(SchemaMigration): - - def forwards(self, orm): - default = datetime.datetime(2000, 1, 1, 0, 0).replace(tzinfo=utc) - db.add_column(u'mirrors_mirrorurl', 'created', - self.gf('django.db.models.fields.DateTimeField')(default=default), - keep_default=False) - db.add_column(u'mirrors_mirrorrsync', 'created', - self.gf('django.db.models.fields.DateTimeField')(default=default), - keep_default=False) - db.add_column(u'mirrors_mirrorprotocol', 'created', - self.gf('django.db.models.fields.DateTimeField')(default=default), - keep_default=False) - db.add_column(u'mirrors_mirror', 'created', - self.gf('django.db.models.fields.DateTimeField')(default=default), - keep_default=False) - - - def backwards(self, orm): - db.delete_column(u'mirrors_mirrorurl', 'created') - db.delete_column(u'mirrors_mirrorrsync', 'created') - db.delete_column(u'mirrors_mirrorprotocol', 'created') - db.delete_column(u'mirrors_mirror', 'created') - - - models = { - u'mirrors.checklocation': { - 'Meta': {'ordering': "('hostname', 'source_ip')", 'object_name': 'CheckLocation'}, - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2'}), - 'created': ('django.db.models.fields.DateTimeField', [], {}), - 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'source_ip': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}) - }, - u'mirrors.mirror': { - 'Meta': {'ordering': "('name',)", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'alternate_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['mirrors.Mirror']", 'null': 'True', 'on_delete': 'models.SET_NULL'}) - }, - u'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': u"orm['mirrors.MirrorUrl']"}) - }, - u'mirrors.mirrorprotocol': { - 'Meta': {'ordering': "('protocol',)", 'object_name': 'MirrorProtocol'}, - 'created': ('django.db.models.fields.DateTimeField', [], {}), - 'default': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - u'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - 'created': ('django.db.models.fields.DateTimeField', [], {}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '44'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': u"orm['mirrors.Mirror']"}) - }, - u'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'country': ('django_countries.fields.CountryField', [], {'db_index': 'True', 'max_length': '2', 'blank': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {}), - 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': u"orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'on_delete': 'models.PROTECT', 'to': u"orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0024_auto__add_field_mirrorlog_location.py b/mirrors/migrations/0024_auto__add_field_mirrorlog_location.py deleted file mode 100644 index acf8df17..00000000 --- a/mirrors/migrations/0024_auto__add_field_mirrorlog_location.py +++ /dev/null @@ -1,83 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - db.add_column(u'mirrors_mirrorlog', 'location', - self.gf('django.db.models.fields.related.ForeignKey')(related_name='logs', null=True, to=orm['mirrors.CheckLocation']), - keep_default=False) - - - def backwards(self, orm): - db.delete_column(u'mirrors_mirrorlog', 'location_id') - - - models = { - u'mirrors.checklocation': { - 'Meta': {'ordering': "('hostname', 'source_ip')", 'object_name': 'CheckLocation'}, - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2'}), - 'created': ('django.db.models.fields.DateTimeField', [], {}), - 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'source_ip': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}) - }, - u'mirrors.mirror': { - 'Meta': {'ordering': "('name',)", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'alternate_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['mirrors.Mirror']", 'null': 'True', 'on_delete': 'models.SET_NULL'}) - }, - u'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'location': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'null': 'True', 'to': u"orm['mirrors.CheckLocation']"}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': u"orm['mirrors.MirrorUrl']"}) - }, - u'mirrors.mirrorprotocol': { - 'Meta': {'ordering': "('protocol',)", 'object_name': 'MirrorProtocol'}, - 'created': ('django.db.models.fields.DateTimeField', [], {}), - 'default': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - u'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - 'created': ('django.db.models.fields.DateTimeField', [], {}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('django.db.models.fields.CharField', [], {'max_length': '44'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': u"orm['mirrors.Mirror']"}) - }, - u'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'country': ('django_countries.fields.CountryField', [], {'db_index': 'True', 'max_length': '2', 'blank': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {}), - 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': u"orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'on_delete': 'models.PROTECT', 'to': u"orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0025_auto__chg_field_mirrorrsync_ip.py b/mirrors/migrations/0025_auto__chg_field_mirrorrsync_ip.py deleted file mode 100644 index b359b637..00000000 --- a/mirrors/migrations/0025_auto__chg_field_mirrorrsync_ip.py +++ /dev/null @@ -1,85 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - if db.backend_name == 'postgres': - # For PostgreSQL, because it uses the 'inet' type and not a varchar - # column, we need to add an explict 'USING' cast to the SQL - # statement. We then execute the alter_column as well to ensure any - # of the other side-effects happen. - db.execute('ALTER TABLE "mirrors_mirrorrsync" ALTER COLUMN "ip" TYPE inet USING "ip"::inet') - db.alter_column(u'mirrors_mirrorrsync', 'ip', self.gf('mirrors.fields.IPNetworkField')(max_length=44)) - - def backwards(self, orm): - db.alter_column(u'mirrors_mirrorrsync', 'ip', self.gf('django.db.models.fields.CharField')(max_length=44)) - - models = { - u'mirrors.checklocation': { - 'Meta': {'ordering': "('hostname', 'source_ip')", 'object_name': 'CheckLocation'}, - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2'}), - 'created': ('django.db.models.fields.DateTimeField', [], {}), - 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'source_ip': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}) - }, - u'mirrors.mirror': { - 'Meta': {'ordering': "('name',)", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'alternate_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['mirrors.Mirror']", 'null': 'True', 'on_delete': 'models.SET_NULL'}) - }, - u'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'location': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'null': 'True', 'to': u"orm['mirrors.CheckLocation']"}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': u"orm['mirrors.MirrorUrl']"}) - }, - u'mirrors.mirrorprotocol': { - 'Meta': {'ordering': "('protocol',)", 'object_name': 'MirrorProtocol'}, - 'created': ('django.db.models.fields.DateTimeField', [], {}), - 'default': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - u'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - 'created': ('django.db.models.fields.DateTimeField', [], {}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('mirrors.fields.IPNetworkField', [], {'max_length': '44'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': u"orm['mirrors.Mirror']"}) - }, - u'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'country': ('django_countries.fields.CountryField', [], {'db_index': 'True', 'max_length': '2', 'blank': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {}), - 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': u"orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'on_delete': 'models.PROTECT', 'to': u"orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0026_auto__add_field_mirrorurl_active.py b/mirrors/migrations/0026_auto__add_field_mirrorurl_active.py deleted file mode 100644 index f989435f..00000000 --- a/mirrors/migrations/0026_auto__add_field_mirrorurl_active.py +++ /dev/null @@ -1,83 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - db.add_column(u'mirrors_mirrorurl', 'active', - self.gf('django.db.models.fields.BooleanField')(default=True), - keep_default=True) - - def backwards(self, orm): - db.delete_column(u'mirrors_mirrorurl', 'active') - - - models = { - u'mirrors.checklocation': { - 'Meta': {'ordering': "('hostname', 'source_ip')", 'object_name': 'CheckLocation'}, - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2'}), - 'created': ('django.db.models.fields.DateTimeField', [], {}), - 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'source_ip': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}) - }, - u'mirrors.mirror': { - 'Meta': {'ordering': "('name',)", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'alternate_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['mirrors.Mirror']", 'null': 'True', 'on_delete': 'models.SET_NULL'}) - }, - u'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'location': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'null': 'True', 'to': u"orm['mirrors.CheckLocation']"}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': u"orm['mirrors.MirrorUrl']"}) - }, - u'mirrors.mirrorprotocol': { - 'Meta': {'ordering': "('protocol',)", 'object_name': 'MirrorProtocol'}, - 'created': ('django.db.models.fields.DateTimeField', [], {}), - 'default': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - u'mirrors.mirrorrsync': { - 'Meta': {'object_name': 'MirrorRsync'}, - 'created': ('django.db.models.fields.DateTimeField', [], {}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('mirrors.fields.IPNetworkField', [], {'max_length': '44'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': u"orm['mirrors.Mirror']"}) - }, - u'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'db_index': 'True', 'max_length': '2', 'blank': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {}), - 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': u"orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'on_delete': 'models.PROTECT', 'to': u"orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0027_auto__add_field_mirror_bug.py b/mirrors/migrations/0027_auto__add_field_mirror_bug.py deleted file mode 100644 index f7304ba8..00000000 --- a/mirrors/migrations/0027_auto__add_field_mirror_bug.py +++ /dev/null @@ -1,91 +0,0 @@ -# -*- coding: utf-8 -*- -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - def forwards(self, orm): - db.add_column(u'mirrors_mirror', 'bug', - self.gf('django.db.models.fields.PositiveIntegerField')(null=True), - keep_default=False) - # UPDATE mirrors_mirror m - # SET bug = ( - # SELECT extracted::int FROM ( - # SELECT id, substring(notes from 'FS#([\d]+)') AS extracted FROM mirrors_mirror - # ) a - # WHERE extracted IS NOT NULL AND a.id = m.id - # ) - # WHERE notes LIKE '%FS#%'; - - def backwards(self, orm): - db.delete_column(u'mirrors_mirror', 'bug') - - - models = { - u'mirrors.checklocation': { - 'Meta': {'ordering': "('hostname', 'source_ip')", 'object_name': 'CheckLocation'}, - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2'}), - 'created': ('django.db.models.fields.DateTimeField', [], {}), - 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'source_ip': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}) - }, - u'mirrors.mirror': { - 'Meta': {'ordering': "('name',)", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'alternate_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'bug': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['mirrors.Mirror']", 'null': 'True', 'on_delete': 'models.SET_NULL'}) - }, - u'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'location': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'null': 'True', 'to': u"orm['mirrors.CheckLocation']"}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': u"orm['mirrors.MirrorUrl']"}) - }, - u'mirrors.mirrorprotocol': { - 'Meta': {'ordering': "('protocol',)", 'object_name': 'MirrorProtocol'}, - 'created': ('django.db.models.fields.DateTimeField', [], {}), - 'default': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - u'mirrors.mirrorrsync': { - 'Meta': {'ordering': "('ip',)", 'object_name': 'MirrorRsync'}, - 'created': ('django.db.models.fields.DateTimeField', [], {}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('mirrors.fields.IPNetworkField', [], {'max_length': '44'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': u"orm['mirrors.Mirror']"}) - }, - u'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'db_index': 'True', 'max_length': '2', 'blank': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {}), - 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': u"orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'on_delete': 'models.PROTECT', 'to': u"orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] diff --git a/mirrors/migrations/0028_auto__add_field_mirror_last_modified.py b/mirrors/migrations/0028_auto__add_field_mirror_last_modified.py deleted file mode 100644 index 35e80733..00000000 --- a/mirrors/migrations/0028_auto__add_field_mirror_last_modified.py +++ /dev/null @@ -1,88 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - db.add_column(u'mirrors_mirror', 'last_modified', - self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now()), - keep_default=False) - if not db.dry_run: - orm.Mirror.objects.update(last_modified=models.F('created')) - - def backwards(self, orm): - db.delete_column(u'mirrors_mirror', 'last_modified') - - - models = { - u'mirrors.checklocation': { - 'Meta': {'ordering': "('hostname', 'source_ip')", 'object_name': 'CheckLocation'}, - 'country': ('django_countries.fields.CountryField', [], {'max_length': '2'}), - 'created': ('django.db.models.fields.DateTimeField', [], {}), - 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'source_ip': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}) - }, - u'mirrors.mirror': { - 'Meta': {'ordering': "('name',)", 'object_name': 'Mirror'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'admin_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'alternate_email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'blank': 'True'}), - 'bug': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'isos': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'rsync_password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'rsync_user': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50', 'blank': 'True'}), - 'tier': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), - 'upstream': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['mirrors.Mirror']", 'null': 'True', 'on_delete': 'models.SET_NULL'}) - }, - u'mirrors.mirrorlog': { - 'Meta': {'object_name': 'MirrorLog'}, - 'check_time': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'duration': ('django.db.models.fields.FloatField', [], {'null': 'True'}), - 'error': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_success': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'last_sync': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), - 'location': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'null': 'True', 'to': u"orm['mirrors.CheckLocation']"}), - 'url': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'logs'", 'to': u"orm['mirrors.MirrorUrl']"}) - }, - u'mirrors.mirrorprotocol': { - 'Meta': {'ordering': "('protocol',)", 'object_name': 'MirrorProtocol'}, - 'created': ('django.db.models.fields.DateTimeField', [], {}), - 'default': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_download': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'protocol': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}) - }, - u'mirrors.mirrorrsync': { - 'Meta': {'ordering': "('ip',)", 'object_name': 'MirrorRsync'}, - 'created': ('django.db.models.fields.DateTimeField', [], {}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'ip': ('mirrors.fields.IPNetworkField', [], {'max_length': '44'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rsync_ips'", 'to': u"orm['mirrors.Mirror']"}) - }, - u'mirrors.mirrorurl': { - 'Meta': {'object_name': 'MirrorUrl'}, - 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'country': ('django_countries.fields.CountryField', [], {'db_index': 'True', 'max_length': '2', 'blank': 'True'}), - 'created': ('django.db.models.fields.DateTimeField', [], {}), - 'has_ipv4': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'has_ipv6': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'mirror': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'to': u"orm['mirrors.Mirror']"}), - 'protocol': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'urls'", 'on_delete': 'models.PROTECT', 'to': u"orm['mirrors.MirrorProtocol']"}), - 'url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) - } - } - - complete_apps = ['mirrors'] -- cgit v1.2.3-2-g168b From 0896b5697a09e1da532e9e42bbc4b2da2dd2d856 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 28 Jun 2014 12:06:54 -0500 Subject: Add auto-generated migrations from new Django migrations framework Signed-off-by: Dan McGee --- mirrors/migrations/0001_initial.py | 123 +++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 mirrors/migrations/0001_initial.py (limited to 'mirrors/migrations') diff --git a/mirrors/migrations/0001_initial.py b/mirrors/migrations/0001_initial.py new file mode 100644 index 00000000..6f36c9eb --- /dev/null +++ b/mirrors/migrations/0001_initial.py @@ -0,0 +1,123 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import django_countries.fields +import django.db.models.deletion +import mirrors.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='CheckLocation', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('hostname', models.CharField(max_length=255)), + ('source_ip', models.GenericIPAddressField(unique=True, verbose_name=b'source IP', unpack_ipv4=True)), + ('country', django_countries.fields.CountryField(max_length=2)), + ('created', models.DateTimeField(editable=False)), + ], + options={ + 'ordering': ('hostname', 'source_ip'), + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Mirror', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(unique=True, max_length=255)), + ('tier', models.SmallIntegerField(default=2, choices=[(0, b'Tier 0'), (1, b'Tier 1'), (2, b'Tier 2'), (-1, b'Untiered')])), + ('admin_email', models.EmailField(max_length=255, blank=True)), + ('alternate_email', models.EmailField(max_length=255, blank=True)), + ('public', models.BooleanField(default=True)), + ('active', models.BooleanField(default=True)), + ('isos', models.BooleanField(default=True, verbose_name=b'ISOs')), + ('rsync_user', models.CharField(default=b'', max_length=50, blank=True)), + ('rsync_password', models.CharField(default=b'', max_length=50, blank=True)), + ('bug', models.PositiveIntegerField(null=True, verbose_name=b'Flyspray bug', blank=True)), + ('notes', models.TextField(blank=True)), + ('created', models.DateTimeField(editable=False)), + ('last_modified', models.DateTimeField(editable=False)), + ('upstream', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, to='mirrors.Mirror', null=True)), + ], + options={ + 'ordering': ('name',), + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='MirrorLog', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('check_time', models.DateTimeField(db_index=True)), + ('last_sync', models.DateTimeField(null=True)), + ('duration', models.FloatField(null=True)), + ('is_success', models.BooleanField(default=True)), + ('error', models.TextField(default=b'', blank=True)), + ('location', models.ForeignKey(related_name=b'logs', to='mirrors.CheckLocation', null=True)), + ], + options={ + 'get_latest_by': 'check_time', + 'verbose_name': 'mirror check log', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='MirrorProtocol', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('protocol', models.CharField(unique=True, max_length=10)), + ('is_download', models.BooleanField(default=True, help_text=b'Is protocol useful for end-users, e.g. HTTP')), + ('default', models.BooleanField(default=True, help_text=b'Included by default when building mirror list?')), + ('created', models.DateTimeField(editable=False)), + ], + options={ + 'ordering': ('protocol',), + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='MirrorRsync', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('ip', mirrors.fields.IPNetworkField(max_length=44, verbose_name=b'IP')), + ('created', models.DateTimeField(editable=False)), + ('mirror', models.ForeignKey(related_name=b'rsync_ips', to='mirrors.Mirror')), + ], + options={ + 'ordering': ('ip',), + 'verbose_name': 'mirror rsync IP', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='MirrorUrl', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('url', models.CharField(unique=True, max_length=255, verbose_name=b'URL')), + ('country', django_countries.fields.CountryField(blank=True, max_length=2, db_index=True)), + ('has_ipv4', models.BooleanField(default=True, verbose_name=b'IPv4 capable', editable=False)), + ('has_ipv6', models.BooleanField(default=False, verbose_name=b'IPv6 capable', editable=False)), + ('created', models.DateTimeField(editable=False)), + ('active', models.BooleanField(default=True)), + ('mirror', models.ForeignKey(related_name=b'urls', to='mirrors.Mirror')), + ('protocol', models.ForeignKey(related_name=b'urls', on_delete=django.db.models.deletion.PROTECT, editable=False, to='mirrors.MirrorProtocol')), + ], + options={ + 'verbose_name': 'mirror URL', + }, + bases=(models.Model,), + ), + migrations.AddField( + model_name='mirrorlog', + name='url', + field=models.ForeignKey(related_name=b'logs', to='mirrors.MirrorUrl'), + preserve_default=True, + ), + ] -- cgit v1.2.3-2-g168b