# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models

import os

class Migration(SchemaMigration):

    def forwards(self, orm):
        # TODO: Load sample json
        # os.system("shp2pgsql -s 26986 -g geometry data/parcels/Parcels_L3E.shp development_parcel | psql -h localhost -d ddtest -U mapcuser")
        # db.execute("ALTER SEQUENCE development_parcel_gid_seq RENAME TO development_parcel_parcel_id_seq")
        # db.execute("ALTER TABLE development_parcel RENAME gid TO parcel_id")
        
        db.rename_column('development_parcel', 'mapc_id', 'parcel_id')
        db.rename_column('development_parcel', 'muni_id', 'municipality_id')