3 from south.db import db
4 from south.v2 import SchemaMigration
5 from django.db import models
7 class Migration(SchemaMigration):
9 def forwards(self, orm):
11 # Adding model 'Deleted'
12 db.create_table('api_deleted', (
13 ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14 ('object_id', self.gf('django.db.models.fields.IntegerField')()),
15 ('content_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contenttypes.ContentType'])),
16 ('created_at', self.gf('django.db.models.fields.DateTimeField')(db_index=True)),
17 ('deleted_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, db_index=True, blank=True)),
19 db.send_create_signal('api', ['Deleted'])
21 # Adding unique constraint on 'Deleted', fields ['content_type', 'object_id']
22 db.create_unique('api_deleted', ['content_type_id', 'object_id'])
25 def backwards(self, orm):
27 # Removing unique constraint on 'Deleted', fields ['content_type', 'object_id']
28 db.delete_unique('api_deleted', ['content_type_id', 'object_id'])
30 # Deleting model 'Deleted'
31 db.delete_table('api_deleted')
36 'Meta': {'unique_together': "(('content_type', 'object_id'),)", 'object_name': 'Deleted'},
37 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
38 'created_at': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
39 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
40 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
41 'object_id': ('django.db.models.fields.IntegerField', [], {})
43 'contenttypes.contenttype': {
44 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
45 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
46 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
47 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
48 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
52 complete_apps = ['api']