Skip to content

Instantly share code, notes, and snippets.

@RobinIsTheBird
Last active May 5, 2017 18:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobinIsTheBird/348f62758f4bdbe58f66be09854c2f06 to your computer and use it in GitHub Desktop.
Save RobinIsTheBird/348f62758f4bdbe58f66be09854c2f06 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
class RemoveSpeciesUdfs(migrations.RemoveField):
def database_backwards(
self, app_label, schema_editor, from_state, to_state):
migrations.RunSQL(
"ALTER TABLE treemap_species "
"ADD COLUMN udfs hstore NOT NULL DEFAULT ''")
dependencies = [
('treemap', '0042_auto_20170112_1603'),
]
operations = [
RemoveSpeciesUdfs(
model_name='species',
name='udfs',
),
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment