oxdata/lookup/migrations/0001_initial.py

79 lines
4.2 KiB
Python
Raw Normal View History

2009-09-07 15:29:39 +00:00
# -*- coding: utf-8 -*-
from south.db import db
from django.db import models
from oxdata.lookup.models import *
class Migration:
def forwards(self, orm):
# Adding model 'MovieId'
db.create_table('lookup_movieid', (
('id', orm['lookup.MovieId:id']),
('created', orm['lookup.MovieId:created']),
('modified', orm['lookup.MovieId:modified']),
('title', orm['lookup.MovieId:title']),
('year', orm['lookup.MovieId:year']),
('director', orm['lookup.MovieId:director']),
('series_title', orm['lookup.MovieId:series_title']),
('episode_title', orm['lookup.MovieId:episode_title']),
('season', orm['lookup.MovieId:season']),
('episode', orm['lookup.MovieId:episode']),
('oxdb_id', orm['lookup.MovieId:oxdb_id']),
('imdb_id', orm['lookup.MovieId:imdb_id']),
('amg_id', orm['lookup.MovieId:amg_id']),
('wikipedia_id', orm['lookup.MovieId:wikipedia_id']),
('criterion_id', orm['lookup.MovieId:criterion_id']),
('impawards_id', orm['lookup.MovieId:impawards_id']),
))
db.send_create_signal('lookup', ['MovieId'])
# Adding model 'Karagarga'
db.create_table('lookup_karagarga', (
('id', orm['lookup.Karagarga:id']),
('movie_id', orm['lookup.Karagarga:movie_id']),
('karagarga_id', orm['lookup.Karagarga:karagarga_id']),
))
db.send_create_signal('lookup', ['Karagarga'])
def backwards(self, orm):
# Deleting model 'MovieId'
db.delete_table('lookup_movieid')
# Deleting model 'Karagarga'
db.delete_table('lookup_karagarga')
models = {
'lookup.karagarga': {
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'karagarga_id': ('django.db.models.fields.IntegerField', [], {'unique': 'True'}),
'movie_id': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'karagarga_ids'", 'to': "orm['lookup.MovieId']"})
},
'lookup.movieid': {
'amg_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'criterion_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'director': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '1000', 'blank': 'True'}),
'episode': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
'episode_title': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '1000', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'imdb_id': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '7', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'impawards_id': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'oxdb_id': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '42', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'season': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
'series_title': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '1000', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '1000', 'blank': 'True'}),
'wikipedia_id': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'year': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '4', 'blank': 'True'})
}
}
complete_apps = ['lookup']