eregs / regulations-core

An engine that supplies the API that allows users to read regulations and their various layers.
Creative Commons Zero v1.0 Universal
16 stars 27 forks source link

Use single quotes in raw query. #44

Closed jmcarp closed 8 years ago

jmcarp commented 8 years ago

Fixes migration under postgres.

jmcarp commented 8 years ago

Context: migration 0007 works fine with sqlite, but the double quotes throw off postgres:

django.db.utils.ProgrammingError: column ":" does not exist
LINE 1: UPDATE regcore_layer SET reference=version||":"||label

This version works under both.

cmc333333 commented 8 years ago

Ooof; sorry about that. I can never remember which quote style to use in SQL.