PageRenderTime 48ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/apps/package/migrations/0005_auto.py

https://github.com/kennethlove/opencomparison
Python | 129 lines | 117 code | 9 blank | 3 comment | 0 complexity | 18b94bec348162395f5eb064cd0c87dc MD5 | raw file
  1. # encoding: utf-8
  2. import datetime
  3. from south.db import db
  4. from south.v2 import SchemaMigration
  5. from django.db import models
  6. class Migration(SchemaMigration):
  7. def forwards(self, orm):
  8. # Adding M2M table for field usage on 'Package'
  9. db.create_table('package_package_usage', (
  10. ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
  11. ('package', models.ForeignKey(orm['package.package'], null=False)),
  12. ('user', models.ForeignKey(orm['auth.user'], null=False))
  13. ))
  14. db.create_unique('package_package_usage', ['package_id', 'user_id'])
  15. def backwards(self, orm):
  16. # Removing M2M table for field usage on 'Package'
  17. db.delete_table('package_package_usage')
  18. models = {
  19. 'auth.group': {
  20. 'Meta': {'object_name': 'Group'},
  21. 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  22. 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
  23. 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
  24. },
  25. 'auth.permission': {
  26. 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
  27. 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  28. 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
  29. 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  30. 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
  31. },
  32. 'auth.user': {
  33. 'Meta': {'object_name': 'User'},
  34. 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
  35. 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
  36. 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
  37. 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
  38. 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  39. 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
  40. 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
  41. 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
  42. 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
  43. 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
  44. 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
  45. 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
  46. 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
  47. },
  48. 'contenttypes.contenttype': {
  49. 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
  50. 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  51. 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  52. 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  53. 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
  54. },
  55. 'package.category': {
  56. 'Meta': {'ordering': "['title']", 'object_name': 'Category'},
  57. 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
  58. 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  59. 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  60. 'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
  61. 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}),
  62. 'title': ('django.db.models.fields.CharField', [], {'max_length': "'50'"}),
  63. 'title_plural': ('django.db.models.fields.CharField', [], {'max_length': "'50'", 'blank': 'True'})
  64. },
  65. 'package.commit': {
  66. 'Meta': {'ordering': "['-commit_date']", 'object_name': 'Commit'},
  67. 'commit_date': ('django.db.models.fields.DateTimeField', [], {}),
  68. 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
  69. 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  70. 'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
  71. 'package': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['package.Package']"})
  72. },
  73. 'package.package': {
  74. 'Meta': {'ordering': "['title']", 'object_name': 'Package'},
  75. 'category': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['package.Category']"}),
  76. 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
  77. 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  78. 'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
  79. 'participants': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  80. 'pypi_downloads': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  81. 'pypi_url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '200', 'blank': 'True'}),
  82. 'pypi_version': ('django.db.models.fields.CharField', [], {'max_length': "'20'", 'blank': 'True'}),
  83. 'related_packages': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'related_packages_rel_+'", 'blank': 'True', 'to': "orm['package.Package']"}),
  84. 'repo': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['package.Repo']", 'null': 'True'}),
  85. 'repo_commits': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  86. 'repo_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  87. 'repo_forks': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  88. 'repo_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
  89. 'repo_watchers': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
  90. 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}),
  91. 'title': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
  92. 'usage': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'})
  93. },
  94. 'package.packageexample': {
  95. 'Meta': {'ordering': "['title']", 'object_name': 'PackageExample'},
  96. 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
  97. 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
  98. 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  99. 'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
  100. 'package': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['package.Package']"}),
  101. 'title': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
  102. 'url': ('django.db.models.fields.URLField', [], {'max_length': '200'})
  103. },
  104. 'package.repo': {
  105. 'Meta': {'ordering': "['-is_supported', 'title']", 'object_name': 'Repo'},
  106. 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
  107. 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
  108. 'handler': ('django.db.models.fields.CharField', [], {'default': "'package.handlers.unsupported'", 'max_length': "'200'"}),
  109. 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  110. 'is_other': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
  111. 'is_supported': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
  112. 'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
  113. 'repo_regex': ('django.db.models.fields.CharField', [], {'max_length': "'100'", 'blank': 'True'}),
  114. 'slug_regex': ('django.db.models.fields.CharField', [], {'max_length': "'100'", 'blank': 'True'}),
  115. 'title': ('django.db.models.fields.CharField', [], {'max_length': "'50'"}),
  116. 'url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
  117. 'user_regex': ('django.db.models.fields.CharField', [], {'max_length': "'100'", 'blank': 'True'})
  118. }
  119. }
  120. complete_apps = ['package']