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 ('type', self.gf('django.db.models.fields.CharField')(max_length='50')),
16 ('created_at', self.gf('django.db.models.fields.DateTimeField')()),
17 ('deleted_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
19 db.send_create_signal('api', ['Deleted'])
21 # Adding unique constraint on 'Deleted', fields ['type', 'object_id']
22 db.create_unique('api_deleted', ['type', 'object_id'])
25 def backwards(self, orm):
27 # Removing unique constraint on 'Deleted', fields ['type', 'object_id']
28 db.delete_unique('api_deleted', ['type', 'object_id'])
30 # Deleting model 'Deleted'
31 db.delete_table('api_deleted')
36 'Meta': {'unique_together': "(('type', 'object_id'),)", 'object_name': 'Deleted'},
37 'created_at': ('django.db.models.fields.DateTimeField', [], {}),
38 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
39 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
40 'object_id': ('django.db.models.fields.IntegerField', [], {}),
41 'type': ('django.db.models.fields.CharField', [], {'max_length': "'50'"})
45 complete_apps = ['api']