forked from boskee/django-schedule
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new fields in Event and Occurrence models for tracking timestamps
- Loading branch information
Showing
2 changed files
with
146 additions
and
1 deletion.
There are no files selected for viewing
142 changes: 142 additions & 0 deletions
142
...migrations/0002_auto__add_field_occurrence_created_on__add_field_occurrence_updated_on.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
# -*- coding: utf-8 -*- | ||
from south.utils import datetime_utils as datetime | ||
from south.db import db | ||
from south.v2 import SchemaMigration | ||
from django.db import models | ||
|
||
|
||
class Migration(SchemaMigration): | ||
|
||
def forwards(self, orm): | ||
# Adding field 'Occurrence.created_on' | ||
db.add_column(u'schedule_occurrence', 'created_on', | ||
self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, default=datetime.datetime(2013, 12, 28, 0, 0), blank=True), | ||
keep_default=False) | ||
|
||
# Adding field 'Occurrence.updated_on' | ||
db.add_column(u'schedule_occurrence', 'updated_on', | ||
self.gf('django.db.models.fields.DateTimeField')(auto_now=True, default=datetime.datetime(2013, 12, 28, 0, 0), blank=True), | ||
keep_default=False) | ||
|
||
# Adding field 'Event.updated_on' | ||
db.add_column(u'schedule_event', 'updated_on', | ||
self.gf('django.db.models.fields.DateTimeField')(auto_now=True, default=datetime.datetime(2013, 12, 28, 0, 0), blank=True), | ||
keep_default=False) | ||
|
||
|
||
# Changing field 'Event.created_on' | ||
db.alter_column(u'schedule_event', 'created_on', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True)) | ||
|
||
def backwards(self, orm): | ||
# Deleting field 'Occurrence.created_on' | ||
db.delete_column(u'schedule_occurrence', 'created_on') | ||
|
||
# Deleting field 'Occurrence.updated_on' | ||
db.delete_column(u'schedule_occurrence', 'updated_on') | ||
|
||
# Deleting field 'Event.updated_on' | ||
db.delete_column(u'schedule_event', 'updated_on') | ||
|
||
|
||
# Changing field 'Event.created_on' | ||
db.alter_column(u'schedule_event', 'created_on', self.gf('django.db.models.fields.DateTimeField')()) | ||
|
||
models = { | ||
u'auth.group': { | ||
'Meta': {'object_name': 'Group'}, | ||
u'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': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) | ||
}, | ||
u'auth.permission': { | ||
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, | ||
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), | ||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) | ||
}, | ||
u'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': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), | ||
u'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': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), | ||
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) | ||
}, | ||
u'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'}), | ||
u'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'}) | ||
}, | ||
'schedule.calendar': { | ||
'Meta': {'object_name': 'Calendar'}, | ||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}), | ||
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '200'}) | ||
}, | ||
'schedule.calendarrelation': { | ||
'Meta': {'object_name': 'CalendarRelation'}, | ||
'calendar': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['schedule.Calendar']"}), | ||
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), | ||
'distinction': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True'}), | ||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'inheritable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), | ||
'object_id': ('django.db.models.fields.IntegerField', [], {}) | ||
}, | ||
'schedule.event': { | ||
'Meta': {'object_name': 'Event'}, | ||
'calendar': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['schedule.Calendar']", 'null': 'True', 'blank': 'True'}), | ||
'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
'creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'creator'", 'null': 'True', 'to': u"orm['auth.User']"}), | ||
'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), | ||
'end': ('django.db.models.fields.DateTimeField', [], {}), | ||
'end_recurring_period': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), | ||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'rule': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['schedule.Rule']", 'null': 'True', 'blank': 'True'}), | ||
'start': ('django.db.models.fields.DateTimeField', [], {}), | ||
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}), | ||
'updated_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) | ||
}, | ||
'schedule.eventrelation': { | ||
'Meta': {'object_name': 'EventRelation'}, | ||
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), | ||
'distinction': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True'}), | ||
'event': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['schedule.Event']"}), | ||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'object_id': ('django.db.models.fields.IntegerField', [], {}) | ||
}, | ||
'schedule.occurrence': { | ||
'Meta': {'object_name': 'Occurrence'}, | ||
'cancelled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | ||
'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), | ||
'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), | ||
'end': ('django.db.models.fields.DateTimeField', [], {}), | ||
'event': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['schedule.Event']"}), | ||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'original_end': ('django.db.models.fields.DateTimeField', [], {}), | ||
'original_start': ('django.db.models.fields.DateTimeField', [], {}), | ||
'start': ('django.db.models.fields.DateTimeField', [], {}), | ||
'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), | ||
'updated_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) | ||
}, | ||
'schedule.rule': { | ||
'Meta': {'object_name': 'Rule'}, | ||
'description': ('django.db.models.fields.TextField', [], {}), | ||
'frequency': ('django.db.models.fields.CharField', [], {'max_length': '10'}), | ||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'name': ('django.db.models.fields.CharField', [], {'max_length': '32'}), | ||
'params': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) | ||
} | ||
} | ||
|
||
complete_apps = ['schedule'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters