-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# 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): | ||
|
||
# Adding model 'Departamento' | ||
db.create_table('lugar_departamento', ( | ||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), | ||
('nombre', self.gf('django.db.models.fields.CharField')(unique=True, max_length=30)), | ||
('slug', self.gf('django.db.models.fields.SlugField')(max_length=50, unique=True, null=True, db_index=True)), | ||
)) | ||
db.send_create_signal('lugar', ['Departamento']) | ||
|
||
# Adding model 'Municipio' | ||
db.create_table('lugar_municipio', ( | ||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), | ||
('departamento', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['lugar.Departamento'])), | ||
('nombre', self.gf('django.db.models.fields.CharField')(unique=True, max_length=30)), | ||
('slug', self.gf('django.db.models.fields.SlugField')(max_length=50, unique=True, null=True, db_index=True)), | ||
)) | ||
db.send_create_signal('lugar', ['Municipio']) | ||
|
||
|
||
def backwards(self, orm): | ||
|
||
# Deleting model 'Departamento' | ||
db.delete_table('lugar_departamento') | ||
|
||
# Deleting model 'Municipio' | ||
db.delete_table('lugar_municipio') | ||
|
||
|
||
models = { | ||
'lugar.departamento': { | ||
'Meta': {'object_name': 'Departamento'}, | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'nombre': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), | ||
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'unique': 'True', 'null': 'True', 'db_index': 'True'}) | ||
}, | ||
'lugar.municipio': { | ||
'Meta': {'object_name': 'Municipio'}, | ||
'departamento': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['lugar.Departamento']"}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'nombre': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), | ||
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'unique': 'True', 'null': 'True', 'db_index': 'True'}) | ||
} | ||
} | ||
|
||
complete_apps = ['lugar'] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# 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): | ||
|
||
# Adding field 'Municipio.latitud' | ||
db.add_column('lugar_municipio', 'latitud', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=8, decimal_places=5, blank=True), keep_default=False) | ||
|
||
# Adding field 'Municipio.longitud' | ||
db.add_column('lugar_municipio', 'longitud', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=8, decimal_places=5, blank=True), keep_default=False) | ||
|
||
|
||
def backwards(self, orm): | ||
|
||
# Deleting field 'Municipio.latitud' | ||
db.delete_column('lugar_municipio', 'latitud') | ||
|
||
# Deleting field 'Municipio.longitud' | ||
db.delete_column('lugar_municipio', 'longitud') | ||
|
||
|
||
models = { | ||
'lugar.departamento': { | ||
'Meta': {'object_name': 'Departamento'}, | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'nombre': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), | ||
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'unique': 'True', 'null': 'True', 'db_index': 'True'}) | ||
}, | ||
'lugar.municipio': { | ||
'Meta': {'object_name': 'Municipio'}, | ||
'departamento': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['lugar.Departamento']"}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'latitud': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '8', 'decimal_places': '5', 'blank': 'True'}), | ||
'longitud': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '8', 'decimal_places': '5', 'blank': 'True'}), | ||
'nombre': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), | ||
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'unique': 'True', 'null': 'True', 'db_index': 'True'}) | ||
} | ||
} | ||
|
||
complete_apps = ['lugar'] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# 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): | ||
|
||
# Adding field 'Municipio.extension' | ||
db.add_column('lugar_municipio', 'extension', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=10, decimal_places=2, blank=True), keep_default=False) | ||
|
||
# Changing field 'Municipio.id' | ||
db.alter_column('lugar_municipio', 'id', self.gf('django.db.models.fields.IntegerField')(primary_key=True)) | ||
|
||
# Adding field 'Departamento.extension' | ||
db.add_column('lugar_departamento', 'extension', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=10, decimal_places=2), keep_default=False) | ||
|
||
# Changing field 'Departamento.id' | ||
db.alter_column('lugar_departamento', 'id', self.gf('django.db.models.fields.IntegerField')(primary_key=True)) | ||
|
||
|
||
def backwards(self, orm): | ||
|
||
# Deleting field 'Municipio.extension' | ||
db.delete_column('lugar_municipio', 'extension') | ||
|
||
# Changing field 'Municipio.id' | ||
db.alter_column('lugar_municipio', 'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)) | ||
|
||
# Deleting field 'Departamento.extension' | ||
db.delete_column('lugar_departamento', 'extension') | ||
|
||
# Changing field 'Departamento.id' | ||
db.alter_column('lugar_departamento', 'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)) | ||
|
||
|
||
models = { | ||
'lugar.departamento': { | ||
'Meta': {'object_name': 'Departamento'}, | ||
'extension': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '10', 'decimal_places': '2'}), | ||
'id': ('django.db.models.fields.IntegerField', [], {'primary_key': 'True'}), | ||
'nombre': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), | ||
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'unique': 'True', 'null': 'True', 'db_index': 'True'}) | ||
}, | ||
'lugar.municipio': { | ||
'Meta': {'object_name': 'Municipio'}, | ||
'departamento': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['lugar.Departamento']"}), | ||
'extension': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '10', 'decimal_places': '2', 'blank': 'True'}), | ||
'id': ('django.db.models.fields.IntegerField', [], {'primary_key': 'True'}), | ||
'latitud': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '8', 'decimal_places': '5', 'blank': 'True'}), | ||
'longitud': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '8', 'decimal_places': '5', 'blank': 'True'}), | ||
'nombre': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), | ||
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'unique': 'True', 'null': 'True', 'db_index': 'True'}) | ||
} | ||
} | ||
|
||
complete_apps = ['lugar'] |