Re: [Django] #25002: Postgresql migration fails when changing a CharField to a TimeField

2017-11-17 Thread Django
#25002: Postgresql migration fails when changing a CharField to a TimeField
+-
 Reporter:  Dirk Uys|Owner:  Simon Charette
 Type:  Bug |   Status:  closed
Component:  Migrations  |  Version:  master
 Severity:  Normal  |   Resolution:  fixed
 Keywords:  migrations  | Triage Stage:  Ready for checkin
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+-
Changes (by Tim Graham):

 * component:  Database layer (models, ORM) => Migrations


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.417e5b0c7ea94e2c501a3773becfa722%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25002: Postgresql migration fails when changing a CharField to a TimeField

2015-06-24 Thread Django
#25002: Postgresql migration fails when changing a CharField to a TimeField
-+-
 Reporter:  dirkcuys |Owner:  charettes
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  migrations   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by charettes):

 * status:  new => closed
 * resolution:   => fixed
 * stage:  Accepted => Ready for checkin


Comment:

 Merged the patch marked as RFC by Shai on Github.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.a6cab9b4f16f9e0a551ffd9e5bbd26c3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25002: Postgresql migration fails when changing a CharField to a TimeField

2015-06-24 Thread Django
#25002: Postgresql migration fails when changing a CharField to a TimeField
-+-
 Reporter:  dirkcuys |Owner:  charettes
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Simon Charette ):

 In [changeset:"bdb382b2a49de4a2426c3dde944776c1bdd08eb7" bdb382b]:
 {{{
 #!CommitTicketReference repository=""
 revision="bdb382b2a49de4a2426c3dde944776c1bdd08eb7"
 Refs #25002 -- Supported textual to temporal column alteration on Oracle.

 Thanks to Tim Graham for the report and Shai Berger for the review.
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.57f86425d99a8538a749291ba7c34fb9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25002: Postgresql migration fails when changing a CharField to a TimeField

2015-06-23 Thread Django
#25002: Postgresql migration fails when changing a CharField to a TimeField
-+-
 Reporter:  dirkcuys |Owner:  charettes
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by charettes):

 * needs_better_patch:  1 => 0


Comment:

 Tests are passing on Oracle.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.e8085fbcd91c3ba0b8ee7c33e1196537%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25002: Postgresql migration fails when changing a CharField to a TimeField

2015-06-23 Thread Django
#25002: Postgresql migration fails when changing a CharField to a TimeField
-+-
 Reporter:  dirkcuys |Owner:  charettes
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * needs_better_patch:  0 => 1


Comment:

 Test still doesn't pass.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.7c67a554692e8f7634665f1098491ab3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25002: Postgresql migration fails when changing a CharField to a TimeField

2015-06-22 Thread Django
#25002: Postgresql migration fails when changing a CharField to a TimeField
-+-
 Reporter:  dirkcuys |Owner:  charettes
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by charettes):

 * has_patch:  0 => 1


Comment:

 Created a tentative [https://github.com/django/django/pull/4910 PR] based
 on error message.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.bda05468dde28a45b395a336b24466e4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25002: Postgresql migration fails when changing a CharField to a TimeField

2015-06-22 Thread Django
#25002: Postgresql migration fails when changing a CharField to a TimeField
-+-
 Reporter:  dirkcuys |Owner:  charettes
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * status:  closed => new
 * has_patch:  1 => 0
 * resolution:  fixed =>
 * stage:  Ready for checkin => Accepted


Comment:

 Error on Oracle for the new test is `ORA-01758: table must be empty to add
 mandatory (NOT NULL) column`.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.aa6b91c64014a4b020c7fee768c6573f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25002: Postgresql migration fails when changing a CharField to a TimeField

2015-06-22 Thread Django
#25002: Postgresql migration fails when changing a CharField to a TimeField
-+-
 Reporter:  dirkcuys |Owner:  charettes
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  migrations   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Simon Charette ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"73040e584a9ccc770593a3885f5fe40fda142e0d" 73040e58]:
 {{{
 #!CommitTicketReference repository=""
 revision="73040e584a9ccc770593a3885f5fe40fda142e0d"
 Fixed #25002 -- Used PostgreSQL column type alteration USING clause.

 Thanks to Dirk Uys for the report.
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.019cd465a4a018770ced8efe7c5c14f3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25002: Postgresql migration fails when changing a CharField to a TimeField

2015-06-21 Thread Django
#25002: Postgresql migration fails when changing a CharField to a TimeField
-+-
 Reporter:  dirkcuys |Owner:  charettes
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by MarkusH):

 * stage:  Accepted => Ready for checkin


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.c6ce019cb19188d4b6e336360ee1d755%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25002: Postgresql migration fails when changing a CharField to a TimeField

2015-06-19 Thread Django
#25002: Postgresql migration fails when changing a CharField to a TimeField
-+-
 Reporter:  dirkcuys |Owner:  charettes
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by charettes):

 Markus, I'm not sure how I should proceed, do you want me to add an
 additional test that makes sure an integer field can be converted to a
 char one? It looks like it's already working from the tests and doesn't
 require an explicit `USING`.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.26b9ba008d26dcf4da04dbaa449d700c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25002: Postgresql migration fails when changing a CharField to a TimeField

2015-06-19 Thread Django
#25002: Postgresql migration fails when changing a CharField to a TimeField
-+-
 Reporter:  dirkcuys |Owner:  charettes
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by timgraham):

 #24264 looks like a suspect.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.dcc44a18f2879858d85074e90c7a312c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25002: Postgresql migration fails when changing a CharField to a TimeField

2015-06-19 Thread Django
#25002: Postgresql migration fails when changing a CharField to a TimeField
-+-
 Reporter:  dirkcuys |Owner:  charettes
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by charettes):

 Replying to [comment:5 MarkusH]:
 > That said, there is/was a ticket for `VARCHAR`/`INTEGER` conversation on
 a PK, I think. Do you mind investing that one too. Maybe they can both be
 closed by this patch?

 I'd like to but I can't find it by searching for tickets with the
 Migration component.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.dd8d25db5d6840c703ed50ee00f9fddc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25002: Postgresql migration fails when changing a CharField to a TimeField

2015-06-18 Thread Django
#25002: Postgresql migration fails when changing a CharField to a TimeField
-+-
 Reporter:  dirkcuys |Owner:  charettes
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by MarkusH):

 * version:  1.8 => master


Comment:

 I don't thing this bug justifies for backport to 1.8. It's the same
 behavior on 1.7. Use `AddField`, `RunSQL`/`RunPython`, `RemoveField`,
 `RenameField` for the desired outcome.

 That said, there is/was a ticket for `VARCHAR`/`INTEGER` conversation on a
 PK, I think. Do you mind investing that one too. Maybe they can both be
 closed by this patch?

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.277eddbf51831e06e2d2f64bf33accbe%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25002: Postgresql migration fails when changing a CharField to a TimeField

2015-06-18 Thread Django
#25002: Postgresql migration fails when changing a CharField to a TimeField
-+-
 Reporter:  dirkcuys |Owner:  charettes
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  1.8
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by charettes):

 * has_patch:  0 => 1
 * easy:  1 => 0


Comment:

 Not sure if this is something we want to backport to 1.8.x but the added
 test seems to be passing with the proposed changes.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.05061e46e75b40834ea4248cd3155a25%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25002: Postgresql migration fails when changing a CharField to a TimeField

2015-06-18 Thread Django
#25002: Postgresql migration fails when changing a CharField to a TimeField
-+-
 Reporter:  dirkcuys |Owner:  charettes
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  1.8
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by charettes):

 * owner:  nobody => charettes
 * status:  new => assigned
 * easy:  0 => 1
 * stage:  Unreviewed => Accepted


Comment:

 I'm not sure this qualify as a bug or an enhancement but a simple fix
 would be to set

 `DatabaseSchemaEditor.sql_alter_column_type = "ALTER COLUMN %(column)s
 TYPE %(type)s USING %(column)s::%(type)s"`.

 I'll submit a tentative PR to run the full test suite against CI before
 adding a test.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.cd57eca0d07adcbd4eaef4ab27acbcad%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25002: Postgresql migration fails when changing a CharField to a TimeField

2015-06-18 Thread Django
#25002: Postgresql migration fails when changing a CharField to a TimeField
-+-
 Reporter:  dirkcuys |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.8
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by dirkcuys:

Old description:

> The code from the migration is as follows:
>
> {{{#!python
> migrations.AlterField(
> model_name='studygroup',
> name='time',
> field=models.TimeField(),
> ),
> }}}
>
> The field used to be a models.CharField()
>
> The error follows:
>
> {{{
> django.db.utils.ProgrammingError: column "time" cannot be cast
> automatically to type time without time zone
> HINT:  Specify a USING expression to perform the conversion
> }}}
>
> I can manually fix this using SQL:
>
> {{{
> ALTER TABLE "studygroups_studygroup" ALTER COLUMN "time" TYPE time USING
> "time"::time;
> }}}

New description:

 The code from the migration is as follows:

 {{{#!python
 migrations.AlterField(
 model_name='studygroup',
 name='time',
 field=models.TimeField(),
 ),
 }}}

 The field used to be a models.CharField()

 The error follows:

 {{{
 django.db.utils.ProgrammingError: column "time" cannot be cast
 automatically to type time without time zone
 HINT:  Specify a USING expression to perform the conversion
 }}}

 I can manually fix this using SQL:

 {{{
 ALTER TABLE "studygroups_studygroup" ALTER COLUMN "time" TYPE time USING
 "time"::time;
 }}}

 I don't have code with the problem isolated, but this project shows the
 problem when configured to use postgres. http://github.com/p2pu/knight-
 app/.

--

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.46d9d45a2dd183ef957c013bb3df98ab%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25002: Postgresql migration fails when changing a CharField to a TimeField

2015-06-18 Thread Django
#25002: Postgresql migration fails when changing a CharField to a TimeField
-+-
 Reporter:  dirkcuys |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.8
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  migrations   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by dirkcuys):

 * needs_better_patch:   => 0
 * component:  Uncategorized => Database layer (models, ORM)
 * needs_tests:   => 0
 * keywords:   => migrations
 * needs_docs:   => 0
 * type:  Uncategorized => Bug


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.ab393691b20c78f4cd37d49244a04d93%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #25002: Postgresql migration fails when changing a CharField to a TimeField

2015-06-18 Thread Django
#25002: Postgresql migration fails when changing a CharField to a TimeField
---+
 Reporter:  dirkcuys   |  Owner:  nobody
 Type:  Uncategorized  | Status:  new
Component:  Uncategorized  |Version:  1.8
 Severity:  Normal |   Keywords:
 Triage Stage:  Unreviewed |  Has patch:  0
Easy pickings:  0  |  UI/UX:  0
---+
 The code from the migration is as follows:

 {{{#!python
 migrations.AlterField(
 model_name='studygroup',
 name='time',
 field=models.TimeField(),
 ),
 }}}

 The field used to be a models.CharField()

 The error follows:

 {{{
 django.db.utils.ProgrammingError: column "time" cannot be cast
 automatically to type time without time zone
 HINT:  Specify a USING expression to perform the conversion
 }}}

 I can manually fix this using SQL:

 {{{
 ALTER TABLE "studygroups_studygroup" ALTER COLUMN "time" TYPE time USING
 "time"::time;
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.4f07fd06c681e2f61683a710d3b9d70a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.