This repository has been archived by the owner on Aug 20, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Serge Travin
committed
Jul 30, 2011
1 parent
c3544f7
commit ab65e99
Showing
3 changed files
with
57 additions
and
6 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
setwithme/apps/game/migrations/0008_auto__del_field_game_uid__chg_field_game_id.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,51 @@ | ||
# 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): | ||
|
||
# Deleting field 'Game.uid' | ||
db.delete_column('game_game', 'uid') | ||
|
||
# Changing field 'Game.id' | ||
db.alter_column('game_game', 'id', self.gf('django.db.models.fields.CharField')(max_length=36, primary_key=True)) | ||
|
||
|
||
def backwards(self, orm): | ||
|
||
# User chose to not deal with backwards NULL issues for 'Game.uid' | ||
raise RuntimeError("Cannot reverse this migration. 'Game.uid' and its values cannot be restored.") | ||
|
||
# Changing field 'Game.id' | ||
db.alter_column('game_game', 'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)) | ||
|
||
|
||
models = { | ||
'game.game': { | ||
'Meta': {'object_name': 'Game'}, | ||
'desk_cards': ('django.db.models.fields.CommaSeparatedIntegerField', [], {'default': "''", 'max_length': '250'}), | ||
'end': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), | ||
'finished': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | ||
'id': ('django.db.models.fields.CharField', [], {'max_length': '36', 'primary_key': 'True'}), | ||
'remaining_cards': ('django.db.models.fields.CommaSeparatedIntegerField', [], {'max_length': '250'}), | ||
'start': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}) | ||
}, | ||
'game.gamesession': { | ||
'Meta': {'object_name': 'GameSession'}, | ||
'client_state': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | ||
'failures': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | ||
'game': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['game.Game']", 'null': 'True'}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'last_access': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), | ||
'set_pressed_dt': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), | ||
'sets_found': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | ||
'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}), | ||
'user': ('django.db.models.fields.CharField', [], {'max_length': '50'}) | ||
} | ||
} | ||
|
||
complete_apps = ['game'] |
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
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