Changes between Version 1 and Version 2 of Ticket #23541
- Timestamp:
- Sep 22, 2014, 9:25:30 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #23541 – Description
v1 v2 3 3 1. Install this function at a shell for PostgreSQL 4 4 5 {{{CREATE FUNCTION exec(text) returns text language plpgsql volatile 5 {{{ 6 CREATE FUNCTION exec(text) returns text language plpgsql volatile 6 7 AS $f$ 7 8 BEGIN … … 9 10 RETURN $1; 10 11 END; 11 $f$;}}} 12 $f$; 13 }}} 12 14 13 15 source: http://wiki.postgresql.org/wiki/Dynamic_DDL … … 15 17 2. Write a RunSQL operation to help rename some tables 16 18 17 {{{class Migration(migrations.Migration): 19 {{{ 20 class Migration(migrations.Migration): 18 21 ... 19 22 operations = [ … … 25 28 ), 26 29 ] 27 ...}}} 30 ... 31 }}} 28 32 29 33 3. Run the migration. I got this error: 30 34 31 {{{Traceback (most recent call last): 35 {{{ 36 Traceback (most recent call last): 32 37 File "./manage.py", line 10, in <module> 33 38 execute_from_command_line(sys.argv) … … 56 61 File "/Users/abhillman/stable_env/lib/python2.7/site-packages/django/db/backends/utils.py", line 65, in execute 57 62 return self.cursor.execute(sql, params) 58 IndexError: list index out of range}}} 63 IndexError: list index out of range 64 }}} 59 65 60 66 Not sure what's going on here. Could it be the custom PGSQL function?