Comment (by Paul in 't Hout):
This mostly works, I had to change the following to make it work
{{{
rename_table_sql = "RENAME TABLE %s TO %s;"
}}}
to
{{{
rename_table_sql = "ALTER TABLE %s RENAME TO %s;"
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33789#comment:11>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* Attachment "generate_rename_table_colums_new_trunc.py" added.
--
Ticket URL: <https://code.djangoproject.com/ticket/33789>
Comment (by Mariusz Felisiak):
Replying to [comment:11 Paul in 't Hout]:
> This mostly works, I had to change the following to make it work
>
> {{{
> rename_table_sql = "RENAME TABLE %s TO %s;"
> }}}
>
> to
> {{{
> rename_table_sql = "ALTER TABLE %s RENAME TO %s;"
> }}}
Thanks for checking. I attached the new version that also should generate
`RENAME` statements for columns. Can you take a look?
--
Ticket URL: <https://code.djangoproject.com/ticket/33789#comment:12>
Comment (by Paul in 't Hout):
I've run this multiple times for our project and it turned up exactly
those tables/columns with the problem, very nice!
If there is a place for a caution or a note that this script should be run
with Django 4.x in place (and not prior to upgrading) that would be great.
That had me fooled first time around :-)
--
Ticket URL: <https://code.djangoproject.com/ticket/33789#comment:13>
* owner: nobody => Mariusz Felisiak
* status: new => assigned
Comment:
Thanks for checking. I'd prepare a release note.
--
Ticket URL: <https://code.djangoproject.com/ticket/33789#comment:14>
Comment (by Mariusz Felisiak):
The
[https://code.djangoproject.com/attachment/ticket/33789/generate_rename_table_colums_new_trunc.py
upgrade script] to generate `RENAME` DDL statements for Django 4.0.
--
Ticket URL: <https://code.djangoproject.com/ticket/33789#comment:15>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/15784 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/33789#comment:16>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/33789#comment:17>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"a0608c4b111555023c24ab7333a42ec53dca6b42" a0608c4b]:
{{{
#!CommitTicketReference repository=""
revision="a0608c4b111555023c24ab7333a42ec53dca6b42"
Fixed #33789 -- Doc'd changes in quoting table/column names on Oracle in
Django 4.0.
Thanks Paul in 't Hout for the report.
Regression in 1f643c28b5f2b039c47155692844dbae1cb091cd.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33789#comment:18>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"91b365ef67c82d790dc6021882d39f7aed960a2e" 91b365e]:
{{{
#!CommitTicketReference repository=""
revision="91b365ef67c82d790dc6021882d39f7aed960a2e"
[4.1.x] Fixed #33789 -- Doc'd changes in quoting table/column names on
Oracle in Django 4.0.
Thanks Paul in 't Hout for the report.
Regression in 1f643c28b5f2b039c47155692844dbae1cb091cd.
Backport of a0608c4b111555023c24ab7333a42ec53dca6b42 from main
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33789#comment:19>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"0f3b25044c34fd17b6fcde0cb53db0181f212b20" 0f3b2504]:
{{{
#!CommitTicketReference repository=""
revision="0f3b25044c34fd17b6fcde0cb53db0181f212b20"
[4.0.x] Fixed #33789 -- Doc'd changes in quoting table/column names on
Oracle in Django 4.0.
Thanks Paul in 't Hout for the report.
Regression in 1f643c28b5f2b039c47155692844dbae1cb091cd.
Backport of a0608c4b111555023c24ab7333a42ec53dca6b42 from main
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33789#comment:20>