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 --- news/migrations/0001_initial.py | 21 ------ news/migrations/0002_move_news_in.py | 71 ------------------ news/migrations/0003_new_date_columns_precision.py | 73 ------------------- news/migrations/0004_auto__add_field_news_slug.py | 66 ----------------- news/migrations/0005_add_slugs.py | 78 -------------------- news/migrations/0006_auto__chg_field_news_slug.py | 66 ----------------- news/migrations/0007_add_guid.py | 65 ----------------- news/migrations/0008_set_prior_guids.py | 83 --------------------- news/migrations/0009_utc_datetimes.py | 85 ---------------------- .../migrations/0010_auto__chg_field_news_author.py | 65 ----------------- .../0011_auto__add_field_news_safe_mode.py | 68 ----------------- news/migrations/0012_mark_old_news_safe_exempt.py | 73 ------------------- 12 files changed, 814 deletions(-) delete mode 100644 news/migrations/0001_initial.py delete mode 100644 news/migrations/0002_move_news_in.py delete mode 100644 news/migrations/0003_new_date_columns_precision.py delete mode 100644 news/migrations/0004_auto__add_field_news_slug.py delete mode 100644 news/migrations/0005_add_slugs.py delete mode 100644 news/migrations/0006_auto__chg_field_news_slug.py delete mode 100644 news/migrations/0007_add_guid.py delete mode 100644 news/migrations/0008_set_prior_guids.py delete mode 100644 news/migrations/0009_utc_datetimes.py delete mode 100644 news/migrations/0010_auto__chg_field_news_author.py delete mode 100644 news/migrations/0011_auto__add_field_news_safe_mode.py delete mode 100644 news/migrations/0012_mark_old_news_safe_exempt.py (limited to 'news') diff --git a/news/migrations/0001_initial.py b/news/migrations/0001_initial.py deleted file mode 100644 index e30bf5c9..00000000 --- a/news/migrations/0001_initial.py +++ /dev/null @@ -1,21 +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 = ['news'] diff --git a/news/migrations/0002_move_news_in.py b/news/migrations/0002_move_news_in.py deleted file mode 100644 index 43d68df4..00000000 --- a/news/migrations/0002_move_news_in.py +++ /dev/null @@ -1,71 +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', '0031_move_news_out'), - ) - - def forwards(self, orm): - db.send_create_signal('news', ['News']) - if not db.dry_run: - ct = orm['contenttypes.ContentType'].objects - ct.filter(app_label='main', model='news').update(app_label='news') - - def backwards(self, orm): - if not db.dry_run: - ct = orm['contenttypes.ContentType'].objects - ct.filter(app_label='news', model='news').update(app_label='main') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}) - }, - 'news.news': { - 'Meta': {'ordering': "['-postdate', '-id']", 'object_name': 'News', 'db_table': "'news'"}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'news_author'", 'to': "orm['auth.User']"}), - 'content': ('django.db.models.fields.TextField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'postdate': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - } - } - - complete_apps = ['news'] diff --git a/news/migrations/0003_new_date_columns_precision.py b/news/migrations/0003_new_date_columns_precision.py deleted file mode 100644 index 1c97f488..00000000 --- a/news/migrations/0003_new_date_columns_precision.py +++ /dev/null @@ -1,73 +0,0 @@ -# encoding: utf-8 -from south.db import db -from south.v2 import SchemaMigration -from django.db import models -from django.utils.timezone import now - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'News.last_modified' - db.add_column('news', 'last_modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, default=now(), db_index=True, blank=True), keep_default=False) - # Changing field 'News.postdate' - db.alter_column('news', 'postdate', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True)) - # Adding index on 'News', fields ['postdate'] - db.create_index('news', ['postdate']) - - def backwards(self, orm): - # Removing index on 'News', fields ['postdate'] - db.delete_index('news', ['postdate']) - # Deleting field 'News.last_modified' - db.delete_column('news', 'last_modified') - # Changing field 'News.postdate' - db.alter_column('news', 'postdate', self.gf('django.db.models.fields.DateField')(auto_now_add=True)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}) - }, - 'news.news': { - 'Meta': {'ordering': "['-postdate', '-id']", 'object_name': 'News', 'db_table': "'news'"}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'news_author'", 'to': "orm['auth.User']"}), - 'content': ('django.db.models.fields.TextField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'postdate': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - } - } - - complete_apps = ['news'] diff --git a/news/migrations/0004_auto__add_field_news_slug.py b/news/migrations/0004_auto__add_field_news_slug.py deleted file mode 100644 index 7e5dcb79..00000000 --- a/news/migrations/0004_auto__add_field_news_slug.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): - # Adding field 'News.slug' - db.add_column('news', 'slug', self.gf('django.db.models.fields.SlugField')(max_length=255, unique=True, null=True, db_index=True), keep_default=False) - - def backwards(self, orm): - # Deleting field 'News.slug' - db.delete_column('news', 'slug') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}) - }, - 'news.news': { - 'Meta': {'ordering': "['-postdate']", 'object_name': 'News', 'db_table': "'news'"}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'news_author'", 'to': "orm['auth.User']"}), - 'content': ('django.db.models.fields.TextField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'postdate': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'unique': 'True', 'null': 'True', 'db_index': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - } - } - - complete_apps = ['news'] diff --git a/news/migrations/0005_add_slugs.py b/news/migrations/0005_add_slugs.py deleted file mode 100644 index 96bd5213..00000000 --- a/news/migrations/0005_add_slugs.py +++ /dev/null @@ -1,78 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models - -from django.template.defaultfilters import slugify - -class Migration(DataMigration): - - def forwards(self, orm): - existing = list(orm.News.objects.values_list( - 'slug', flat=True).distinct()) - for item in orm.News.objects.defer('content').filter(slug=None): - suffixed = slug = slugify(item.title) - suffix = 1 - while suffixed in existing: - suffix += 1 - suffixed = "%s-%d" % (slug, suffix) - - item.slug = suffixed - existing.append(suffixed) - - item.save() - - def backwards(self, orm): - orm.News.objects.all.update(slug=None) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}) - }, - 'news.news': { - 'Meta': {'ordering': "['-postdate']", 'object_name': 'News', 'db_table': "'news'"}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'news_author'", 'to': "orm['auth.User']"}), - 'content': ('django.db.models.fields.TextField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'postdate': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'unique': 'True', 'null': 'True', 'db_index': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - } - } - - complete_apps = ['news'] diff --git a/news/migrations/0006_auto__chg_field_news_slug.py b/news/migrations/0006_auto__chg_field_news_slug.py deleted file mode 100644 index c6c61e84..00000000 --- a/news/migrations/0006_auto__chg_field_news_slug.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): - # Changing field 'News.slug' - db.alter_column('news', 'slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=255)) - - def backwards(self, orm): - # Changing field 'News.slug' - db.alter_column('news', 'slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=255, null=True)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}) - }, - 'news.news': { - 'Meta': {'ordering': "['-postdate']", 'object_name': 'News', 'db_table': "'news'"}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'news_author'", 'to': "orm['auth.User']"}), - 'content': ('django.db.models.fields.TextField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'postdate': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - } - } - - complete_apps = ['news'] diff --git a/news/migrations/0007_add_guid.py b/news/migrations/0007_add_guid.py deleted file mode 100644 index 5fa8193e..00000000 --- a/news/migrations/0007_add_guid.py +++ /dev/null @@ -1,65 +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('news', 'guid', self.gf('django.db.models.fields.CharField')(default='', max_length=255), keep_default=False) - - def backwards(self, orm): - db.delete_column('news', 'guid') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}) - }, - 'news.news': { - 'Meta': {'ordering': "['-postdate']", 'object_name': 'News', 'db_table': "'news'"}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'news_author'", 'to': "orm['auth.User']"}), - 'content': ('django.db.models.fields.TextField', [], {}), - 'guid': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'postdate': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - } - } - - complete_apps = ['news'] diff --git a/news/migrations/0008_set_prior_guids.py b/news/migrations/0008_set_prior_guids.py deleted file mode 100644 index 704b11c9..00000000 --- a/news/migrations/0008_set_prior_guids.py +++ /dev/null @@ -1,83 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import DataMigration -from django.conf import settings -from django.db import models - -class Migration(DataMigration): - '''The point of this migration is to not mark every news item as 'new' in - people's feed readers, and store the GUID perminantly with the news item. - All previously published news items will get their former auto-assigned - GUID; new ones will get a generated tag: URI and this won't apply to - them.''' - - def forwards(self, orm): - all_news = orm.News.objects.all().defer('content') - site = orm['sites.site'].objects.get(pk=settings.SITE_ID).domain - for news in all_news: - new_guid = 'http://%s/news/%s/' % (site, news.slug) - # looks totally silly, but prevents full updates of all fields, - # including content and last_modified which we want to leave alone - orm.News.objects.filter(pk=news.pk).update(guid=new_guid) - - def backwards(self, orm): - pass - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}) - }, - 'news.news': { - 'Meta': {'ordering': "['-postdate']", 'object_name': 'News', 'db_table': "'news'"}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'news_author'", 'to': "orm['auth.User']"}), - 'content': ('django.db.models.fields.TextField', [], {}), - 'guid': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), - 'postdate': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - }, - 'sites.site': { - 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"}, - 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - } - } - - complete_apps = ['sites', 'news'] diff --git a/news/migrations/0009_utc_datetimes.py b/news/migrations/0009_utc_datetimes.py deleted file mode 100644 index 6cddf783..00000000 --- a/news/migrations/0009_utc_datetimes.py +++ /dev/null @@ -1,85 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import DataMigration -from django.db import models -from django.utils.tzinfo import LocalTimezone - -def new_date(old_date, reverse=False): - if old_date is None: - return None - tz = LocalTimezone(old_date) - offset = tz.utcoffset(old_date) - if reverse: - offset = -offset - return old_date - offset - -class Migration(DataMigration): - - def forwards(self, orm): - all_news = orm.News.objects.all().defer('content') - for news in all_news: - # prevents full object updates - orm.News.objects.filter(pk=news.pk).update( - postdate=new_date(news.postdate), - last_modified=new_date(news.last_modified)) - - def backwards(self, orm): - all_news = orm.News.objects.all().defer('content') - for news in all_news: - # prevents full object updates - orm.News.objects.filter(pk=news.pk).update( - postdate=new_date(news.postdate, True), - last_modified=new_date(news.last_modified, True)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}) - }, - 'news.news': { - 'Meta': {'ordering': "['-postdate']", 'object_name': 'News', 'db_table': "'news'"}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'news_author'", 'to': "orm['auth.User']"}), - 'content': ('django.db.models.fields.TextField', [], {}), - 'guid': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'postdate': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - } - } - - complete_apps = ['news'] diff --git a/news/migrations/0010_auto__chg_field_news_author.py b/news/migrations/0010_auto__chg_field_news_author.py deleted file mode 100644 index 64fdc580..00000000 --- a/news/migrations/0010_auto__chg_field_news_author.py +++ /dev/null @@ -1,65 +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('news', 'author_id', self.gf('django.db.models.fields.related.ForeignKey')(on_delete=models.PROTECT, to=orm['auth.User'])) - - def backwards(self, orm): - db.alter_column('news', 'author_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}) - }, - 'news.news': { - 'Meta': {'ordering': "['-postdate']", 'object_name': 'News', 'db_table': "'news'"}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'news_author'", 'on_delete': 'models.PROTECT', 'to': "orm['auth.User']"}), - 'content': ('django.db.models.fields.TextField', [], {}), - 'guid': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'postdate': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - } - } - - complete_apps = ['news'] diff --git a/news/migrations/0011_auto__add_field_news_safe_mode.py b/news/migrations/0011_auto__add_field_news_safe_mode.py deleted file mode 100644 index 565c7adb..00000000 --- a/news/migrations/0011_auto__add_field_news_safe_mode.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('news', 'safe_mode', - self.gf('django.db.models.fields.BooleanField')(default=True), - keep_default=True) - - def backwards(self, orm): - db.delete_column('news', 'safe_mode') - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}) - }, - 'news.news': { - 'Meta': {'ordering': "('-postdate',)", 'object_name': 'News', 'db_table': "'news'"}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'news_author'", 'on_delete': 'models.PROTECT', 'to': "orm['auth.User']"}), - 'content': ('django.db.models.fields.TextField', [], {}), - 'guid': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'postdate': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'safe_mode': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - } - } - - complete_apps = ['news'] diff --git a/news/migrations/0012_mark_old_news_safe_exempt.py b/news/migrations/0012_mark_old_news_safe_exempt.py deleted file mode 100644 index b2661cd8..00000000 --- a/news/migrations/0012_mark_old_news_safe_exempt.py +++ /dev/null @@ -1,73 +0,0 @@ -# -*- coding: utf-8 -*- -import markdown - -from south.db import db -from south.v2 import DataMigration -from django.db import models - -class Migration(DataMigration): - - def forwards(self, orm): - md = markdown.Markdown(safe_mode=True, enable_attributes=False) - magic = md.html_replacement_text - items = orm.News.objects.all() - has_html = [item.pk for item in items if magic in md.convert(item.content)] - for pk in has_html: - orm.News.objects.filter(pk=pk).update(safe_mode=False) - - def backwards(self, orm): - orm.News.objects.all().update(safe_mode=True) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - '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'}) - }, - 'news.news': { - 'Meta': {'ordering': "('-postdate',)", 'object_name': 'News', 'db_table': "'news'"}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'news_author'", 'on_delete': 'models.PROTECT', 'to': "orm['auth.User']"}), - 'content': ('django.db.models.fields.TextField', [], {}), - 'guid': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_modified': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'postdate': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), - 'safe_mode': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}), - 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}) - } - } - - complete_apps = ['news'] - symmetrical = True -- cgit v1.2.3-54-g00ecf 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 --- devel/migrations/0001_initial.py | 101 +++++++++++++++++ main/migrations/0001_initial.py | 119 ++++++++++++++++++++ mirrors/migrations/0001_initial.py | 123 +++++++++++++++++++++ news/migrations/0001_initial.py | 37 +++++++ packages/migrations/0001_initial.py | 205 +++++++++++++++++++++++++++++++++++ releng/migrations/0001_initial.py | 185 +++++++++++++++++++++++++++++++ todolists/migrations/0001_initial.py | 61 +++++++++++ 7 files changed, 831 insertions(+) create mode 100644 devel/migrations/0001_initial.py create mode 100644 main/migrations/0001_initial.py create mode 100644 mirrors/migrations/0001_initial.py create mode 100644 news/migrations/0001_initial.py create mode 100644 packages/migrations/0001_initial.py create mode 100644 releng/migrations/0001_initial.py create mode 100644 todolists/migrations/0001_initial.py (limited to 'news') diff --git a/devel/migrations/0001_initial.py b/devel/migrations/0001_initial.py new file mode 100644 index 00000000..3dd3582b --- /dev/null +++ b/devel/migrations/0001_initial.py @@ -0,0 +1,101 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals +import pytz + +from django.db import models, migrations +import django_countries.fields +import django.db.models.deletion +from django.conf import settings +import devel.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('main', '0001_initial'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='DeveloperKey', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('key', devel.fields.PGPKeyField(unique=True, max_length=40, verbose_name=b'PGP key fingerprint')), + ('created', models.DateTimeField()), + ('expires', models.DateTimeField(null=True, blank=True)), + ('revoked', models.DateTimeField(null=True, blank=True)), + ('owner', models.ForeignKey(related_name=b'all_keys', to=settings.AUTH_USER_MODEL, help_text=b'The developer this key belongs to', null=True)), + ('parent', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, to='devel.DeveloperKey', null=True)), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='MasterKey', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('pgp_key', devel.fields.PGPKeyField(help_text=b'consists of 40 hex digits; use `gpg --fingerprint`', max_length=40, verbose_name=b'PGP key fingerprint')), + ('created', models.DateField()), + ('revoked', models.DateField(null=True, blank=True)), + ('owner', models.ForeignKey(related_name=b'masterkey_owner', to=settings.AUTH_USER_MODEL, help_text=b'The developer holding this master key')), + ('revoker', models.ForeignKey(related_name=b'masterkey_revoker', to=settings.AUTH_USER_MODEL, help_text=b'The developer holding the revocation certificate')), + ], + options={ + 'ordering': ('created',), + 'get_latest_by': 'created', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='PGPSignature', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('signer', devel.fields.PGPKeyField(max_length=40, verbose_name=b'Signer key fingerprint', db_index=True)), + ('signee', devel.fields.PGPKeyField(max_length=40, verbose_name=b'Signee key fingerprint', db_index=True)), + ('created', models.DateField()), + ('expires', models.DateField(null=True, blank=True)), + ('revoked', models.DateField(null=True, blank=True)), + ], + options={ + 'ordering': ('signer', 'signee'), + 'get_latest_by': 'created', + 'verbose_name': 'PGP signature', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='UserProfile', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('notify', models.BooleanField(default=True, help_text=b"When enabled, send user 'flag out-of-date' notifications", verbose_name=b'Send notifications')), + ('time_zone', models.CharField(default=b'UTC', help_text=b'Used for developer clock page', max_length=100, choices=[(z, z) for z in pytz.common_timezones])), + ('alias', models.CharField(help_text=b'Required field', max_length=50)), + ('public_email', models.CharField(help_text=b'Required field', max_length=50)), + ('other_contact', models.CharField(max_length=100, null=True, blank=True)), + ('pgp_key', devel.fields.PGPKeyField(help_text=b'consists of 40 hex digits; use `gpg --fingerprint`', max_length=40, null=True, verbose_name=b'PGP key fingerprint', blank=True)), + ('website', models.CharField(max_length=200, null=True, blank=True)), + ('yob', models.IntegerField(null=True, verbose_name=b'Year of birth', blank=True)), + ('country', django_countries.fields.CountryField(blank=True, max_length=2)), + ('location', models.CharField(max_length=50, null=True, blank=True)), + ('languages', models.CharField(max_length=50, null=True, blank=True)), + ('interests', models.CharField(max_length=255, null=True, blank=True)), + ('occupation', models.CharField(max_length=50, null=True, blank=True)), + ('roles', models.CharField(max_length=255, null=True, blank=True)), + ('favorite_distros', models.CharField(max_length=255, null=True, blank=True)), + ('picture', models.FileField(default=b'devs/silhouette.png', help_text=b'Ideally 125px by 125px', upload_to=b'devs')), + ('latin_name', models.CharField(help_text=b'Latin-form name; used only for non-Latin full names', max_length=255, null=True, blank=True)), + ('last_modified', models.DateTimeField(editable=False)), + ('allowed_repos', models.ManyToManyField(to='main.Repo', blank=True)), + ('user', models.OneToOneField(related_name=b'userprofile', to=settings.AUTH_USER_MODEL)), + ], + options={ + 'get_latest_by': 'last_modified', + 'verbose_name': 'additional profile data', + 'verbose_name_plural': 'additional profile data', + 'db_table': 'user_profiles', + }, + bases=(models.Model,), + ), + ] diff --git a/main/migrations/0001_initial.py b/main/migrations/0001_initial.py new file mode 100644 index 00000000..8349d4b9 --- /dev/null +++ b/main/migrations/0001_initial.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import main.fields +import django.db.models.deletion +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Arch', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(unique=True, max_length=255)), + ('agnostic', models.BooleanField(default=False, help_text=b'Is this architecture non-platform specific?')), + ('required_signoffs', models.PositiveIntegerField(default=2, help_text=b'Number of signoffs required for packages of this architecture')), + ], + options={ + 'ordering': ('name',), + 'db_table': 'arches', + 'verbose_name_plural': 'arches', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Donor', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(unique=True, max_length=255)), + ('visible', models.BooleanField(default=True, help_text=b'Should we show this donor on the public page?')), + ('created', models.DateTimeField()), + ], + options={ + 'ordering': ('name',), + 'db_table': 'donors', + 'get_latest_by': 'created', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Package', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('pkgname', models.CharField(max_length=255)), + ('pkgbase', models.CharField(max_length=255, db_index=True)), + ('pkgver', models.CharField(max_length=255)), + ('pkgrel', models.CharField(max_length=255)), + ('epoch', models.PositiveIntegerField(default=0)), + ('pkgdesc', models.TextField(null=True, verbose_name=b'description')), + ('url', models.CharField(max_length=255, null=True, verbose_name=b'URL')), + ('filename', models.CharField(max_length=255)), + ('compressed_size', main.fields.PositiveBigIntegerField()), + ('installed_size', main.fields.PositiveBigIntegerField()), + ('build_date', models.DateTimeField(null=True)), + ('last_update', models.DateTimeField(db_index=True)), + ('files_last_update', models.DateTimeField(null=True, blank=True)), + ('created', models.DateTimeField()), + ('packager_str', models.CharField(max_length=255, verbose_name=b'packager string')), + ('signature_bytes', models.BinaryField(verbose_name=b'PGP signature', null=True)), + ('flag_date', models.DateTimeField(null=True, blank=True)), + ('arch', models.ForeignKey(related_name=b'packages', on_delete=django.db.models.deletion.PROTECT, to='main.Arch')), + ('packager', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to=settings.AUTH_USER_MODEL, null=True)), + ], + options={ + 'ordering': ('pkgname',), + 'db_table': 'packages', + 'get_latest_by': 'last_update', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='PackageFile', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('is_directory', models.BooleanField(default=False)), + ('directory', models.CharField(max_length=1024)), + ('filename', models.CharField(max_length=1024, null=True, blank=True)), + ('pkg', models.ForeignKey(to='main.Package')), + ], + options={ + 'db_table': 'package_files', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Repo', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(unique=True, max_length=255)), + ('testing', models.BooleanField(default=False, help_text=b'Is this repo meant for package testing?')), + ('staging', models.BooleanField(default=False, help_text=b'Is this repo meant for package staging?')), + ('bugs_project', models.SmallIntegerField(default=1, help_text=b'Flyspray project ID for this repository.')), + ('bugs_category', models.SmallIntegerField(default=2, help_text=b'Flyspray category ID for this repository.')), + ('svn_root', models.CharField(help_text=b'SVN root (e.g. path) for this repository.', max_length=64)), + ], + options={ + 'ordering': ('name',), + 'db_table': 'repos', + }, + bases=(models.Model,), + ), + migrations.AddField( + model_name='package', + name='repo', + field=models.ForeignKey(related_name=b'packages', on_delete=django.db.models.deletion.PROTECT, to='main.Repo'), + preserve_default=True, + ), + migrations.AlterUniqueTogether( + name='package', + unique_together=set([('pkgname', 'repo', 'arch')]), + ), + ] 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, + ), + ] diff --git a/news/migrations/0001_initial.py b/news/migrations/0001_initial.py new file mode 100644 index 00000000..fc6b6cfb --- /dev/null +++ b/news/migrations/0001_initial.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import django.db.models.deletion +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='News', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('slug', models.SlugField(unique=True, max_length=255)), + ('postdate', models.DateTimeField(verbose_name=b'post date', db_index=True)), + ('last_modified', models.DateTimeField(editable=False, db_index=True)), + ('title', models.CharField(max_length=255)), + ('guid', models.CharField(max_length=255, editable=False)), + ('content', models.TextField()), + ('safe_mode', models.BooleanField(default=True)), + ('author', models.ForeignKey(related_name=b'news_author', on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)), + ], + options={ + 'ordering': ('-postdate',), + 'db_table': 'news', + 'verbose_name_plural': 'news', + 'get_latest_by': 'postdate', + }, + bases=(models.Model,), + ), + ] diff --git a/packages/migrations/0001_initial.py b/packages/migrations/0001_initial.py new file mode 100644 index 00000000..5ecac84a --- /dev/null +++ b/packages/migrations/0001_initial.py @@ -0,0 +1,205 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import django.db.models.deletion +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + ('main', '0001_initial'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Conflict', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=255, db_index=True)), + ('version', models.CharField(default=b'', max_length=255)), + ('comparison', models.CharField(default=b'', max_length=255)), + ('pkg', models.ForeignKey(related_name=b'conflicts', to='main.Package')), + ], + options={ + 'ordering': ('name',), + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Depend', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=255, db_index=True)), + ('version', models.CharField(default=b'', max_length=255)), + ('comparison', models.CharField(default=b'', max_length=255)), + ('description', models.TextField(null=True, blank=True)), + ('deptype', models.CharField(default=b'D', max_length=1, choices=[(b'D', b'Depend'), (b'O', b'Optional Depend'), (b'M', b'Make Depend'), (b'C', b'Check Depend')])), + ('pkg', models.ForeignKey(related_name=b'depends', to='main.Package')), + ], + options={ + 'ordering': ('name',), + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='FlagRequest', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('user_email', models.EmailField(max_length=75, verbose_name=b'email address')), + ('created', models.DateTimeField(editable=False, db_index=True)), + ('ip_address', models.GenericIPAddressField(verbose_name=b'IP address', unpack_ipv4=True)), + ('pkgbase', models.CharField(max_length=255, db_index=True)), + ('pkgver', models.CharField(max_length=255)), + ('pkgrel', models.CharField(max_length=255)), + ('epoch', models.PositiveIntegerField(default=0)), + ('num_packages', models.PositiveIntegerField(default=1, verbose_name=b'number of packages')), + ('message', models.TextField(verbose_name=b'message to developer', blank=True)), + ('is_spam', models.BooleanField(default=False, help_text=b'Is this comment from a real person?')), + ('is_legitimate', models.BooleanField(default=True, help_text=b'Is this actually an out-of-date flag request?')), + ('repo', models.ForeignKey(to='main.Repo')), + ('user', models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, null=True)), + ], + options={ + 'get_latest_by': 'created', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='License', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=255)), + ('pkg', models.ForeignKey(related_name=b'licenses', to='main.Package')), + ], + options={ + 'ordering': ('name',), + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='PackageGroup', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=255, db_index=True)), + ('pkg', models.ForeignKey(related_name=b'groups', to='main.Package')), + ], + options={ + 'ordering': ('name',), + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='PackageRelation', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('pkgbase', models.CharField(max_length=255)), + ('type', models.PositiveIntegerField(default=1, choices=[(1, b'Maintainer'), (2, b'Watcher')])), + ('created', models.DateTimeField(editable=False)), + ('user', models.ForeignKey(related_name=b'package_relations', to=settings.AUTH_USER_MODEL)), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Provision', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=255, db_index=True)), + ('version', models.CharField(default=b'', max_length=255)), + ('pkg', models.ForeignKey(related_name=b'provides', to='main.Package')), + ], + options={ + 'ordering': ('name',), + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Replacement', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=255, db_index=True)), + ('version', models.CharField(default=b'', max_length=255)), + ('comparison', models.CharField(default=b'', max_length=255)), + ('pkg', models.ForeignKey(related_name=b'replaces', to='main.Package')), + ], + options={ + 'ordering': ('name',), + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Signoff', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('pkgbase', models.CharField(max_length=255, db_index=True)), + ('pkgver', models.CharField(max_length=255)), + ('pkgrel', models.CharField(max_length=255)), + ('epoch', models.PositiveIntegerField(default=0)), + ('created', models.DateTimeField(editable=False, db_index=True)), + ('revoked', models.DateTimeField(null=True)), + ('comments', models.TextField(null=True, blank=True)), + ('arch', models.ForeignKey(to='main.Arch')), + ('repo', models.ForeignKey(to='main.Repo')), + ('user', models.ForeignKey(related_name=b'package_signoffs', to=settings.AUTH_USER_MODEL)), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='SignoffSpecification', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('pkgbase', models.CharField(max_length=255, db_index=True)), + ('pkgver', models.CharField(max_length=255)), + ('pkgrel', models.CharField(max_length=255)), + ('epoch', models.PositiveIntegerField(default=0)), + ('created', models.DateTimeField(editable=False)), + ('required', models.PositiveIntegerField(default=2, help_text=b'How many signoffs are required for this package?')), + ('enabled', models.BooleanField(default=True, help_text=b'Is this package eligible for signoffs?')), + ('known_bad', models.BooleanField(default=False, help_text=b'Is package is known to be broken in some way?')), + ('comments', models.TextField(null=True, blank=True)), + ('arch', models.ForeignKey(to='main.Arch')), + ('repo', models.ForeignKey(to='main.Repo')), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL, null=True)), + ], + options={ + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Update', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('pkgname', models.CharField(max_length=255, db_index=True)), + ('pkgbase', models.CharField(max_length=255)), + ('action_flag', models.PositiveSmallIntegerField(verbose_name=b'action flag', choices=[(1, b'Addition'), (2, b'Change'), (3, b'Deletion')])), + ('created', models.DateTimeField(editable=False, db_index=True)), + ('old_pkgver', models.CharField(max_length=255, null=True)), + ('old_pkgrel', models.CharField(max_length=255, null=True)), + ('old_epoch', models.PositiveIntegerField(null=True)), + ('new_pkgver', models.CharField(max_length=255, null=True)), + ('new_pkgrel', models.CharField(max_length=255, null=True)), + ('new_epoch', models.PositiveIntegerField(null=True)), + ('arch', models.ForeignKey(related_name=b'updates', to='main.Arch')), + ('package', models.ForeignKey(related_name=b'updates', on_delete=django.db.models.deletion.SET_NULL, to='main.Package', null=True)), + ('repo', models.ForeignKey(related_name=b'updates', to='main.Repo')), + ], + options={ + 'get_latest_by': 'created', + }, + bases=(models.Model,), + ), + migrations.AlterUniqueTogether( + name='packagerelation', + unique_together=set([('pkgbase', 'user', 'type')]), + ), + ] diff --git a/releng/migrations/0001_initial.py b/releng/migrations/0001_initial.py new file mode 100644 index 00000000..b56f389d --- /dev/null +++ b/releng/migrations/0001_initial.py @@ -0,0 +1,185 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Architecture', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=200)), + ], + options={ + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Bootloader', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=200)), + ], + options={ + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='BootType', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=200)), + ], + options={ + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='ClockChoice', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=200)), + ], + options={ + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Filesystem', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=200)), + ], + options={ + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='HardwareType', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=200)), + ], + options={ + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='InstallType', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=200)), + ], + options={ + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Iso', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=255)), + ('created', models.DateTimeField(editable=False)), + ('removed', models.DateTimeField(default=None, null=True, blank=True)), + ('active', models.BooleanField(default=True)), + ], + options={ + 'verbose_name': 'ISO', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='IsoType', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=200)), + ], + options={ + 'verbose_name': 'ISO type', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Module', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=200)), + ], + options={ + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Release', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('release_date', models.DateField(db_index=True)), + ('version', models.CharField(unique=True, max_length=50)), + ('kernel_version', models.CharField(max_length=50, blank=True)), + ('md5_sum', models.CharField(max_length=32, verbose_name=b'MD5 digest', blank=True)), + ('sha1_sum', models.CharField(max_length=40, verbose_name=b'SHA1 digest', blank=True)), + ('created', models.DateTimeField(editable=False)), + ('available', models.BooleanField(default=True)), + ('info', models.TextField(verbose_name=b'Public information', blank=True)), + ('torrent_data', models.TextField(help_text=b'base64-encoded torrent file', blank=True)), + ], + options={ + 'ordering': ('-release_date', '-version'), + 'get_latest_by': 'release_date', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Source', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=200)), + ], + options={ + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Test', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('user_name', models.CharField(max_length=500)), + ('user_email', models.EmailField(max_length=75, verbose_name=b'email address')), + ('ip_address', models.GenericIPAddressField(verbose_name=b'IP address', unpack_ipv4=True)), + ('created', models.DateTimeField(editable=False)), + ('success', models.BooleanField(default=True)), + ('comments', models.TextField(null=True, blank=True)), + ('architecture', models.ForeignKey(to='releng.Architecture')), + ('boot_type', models.ForeignKey(to='releng.BootType')), + ('bootloader', models.ForeignKey(to='releng.Bootloader')), + ('clock_choice', models.ForeignKey(to='releng.ClockChoice')), + ('filesystem', models.ForeignKey(to='releng.Filesystem')), + ('hardware_type', models.ForeignKey(to='releng.HardwareType')), + ('install_type', models.ForeignKey(to='releng.InstallType')), + ('iso', models.ForeignKey(to='releng.Iso')), + ('iso_type', models.ForeignKey(to='releng.IsoType')), + ('modules', models.ManyToManyField(to='releng.Module', null=True, blank=True)), + ('rollback_filesystem', models.ForeignKey(related_name=b'rollback_test_set', blank=True, to='releng.Filesystem', null=True)), + ('rollback_modules', models.ManyToManyField(related_name=b'rollback_test_set', null=True, to='releng.Module', blank=True)), + ('source', models.ForeignKey(to='releng.Source')), + ], + options={ + }, + bases=(models.Model,), + ), + ] diff --git a/todolists/migrations/0001_initial.py b/todolists/migrations/0001_initial.py new file mode 100644 index 00000000..4ffbf838 --- /dev/null +++ b/todolists/migrations/0001_initial.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import django.db.models.deletion +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + ('main', '0001_initial'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Todolist', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('slug', models.SlugField(unique=True, max_length=255)), + ('old_id', models.IntegerField(unique=True, null=True)), + ('name', models.CharField(max_length=255)), + ('description', models.TextField()), + ('created', models.DateTimeField(db_index=True)), + ('last_modified', models.DateTimeField(editable=False)), + ('raw', models.TextField(blank=True)), + ('creator', models.ForeignKey(related_name=b'created_todolists', on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)), + ], + options={ + 'get_latest_by': 'created', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='TodolistPackage', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('pkgname', models.CharField(max_length=255)), + ('pkgbase', models.CharField(max_length=255)), + ('created', models.DateTimeField(editable=False)), + ('last_modified', models.DateTimeField(editable=False)), + ('removed', models.DateTimeField(null=True, blank=True)), + ('status', models.SmallIntegerField(default=0, choices=[(0, b'Incomplete'), (1, b'Complete'), (2, b'In-progress')])), + ('comments', models.TextField(null=True, blank=True)), + ('arch', models.ForeignKey(to='main.Arch')), + ('pkg', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, to='main.Package', null=True)), + ('repo', models.ForeignKey(to='main.Repo')), + ('todolist', models.ForeignKey(to='todolists.Todolist')), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, null=True)), + ], + options={ + 'get_latest_by': 'created', + }, + bases=(models.Model,), + ), + migrations.AlterUniqueTogether( + name='todolistpackage', + unique_together=set([('todolist', 'pkgname', 'arch')]), + ), + ] -- cgit v1.2.3-54-g00ecf