Re: [Django] #2225: 'manage.py sql ...' gets confused when using tables from separate apps

2014-08-31 Thread Django
#2225: 'manage.py sql ...' gets confused when using tables from separate apps
-+-
 Reporter:  Lucas Hazel  |Owner:
 Type:  defect   |  glassresistor
Component:  Database layer   |   Status:  closed
  (models, ORM)  |  Version:  master
 Severity:  minor|   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by aaugustin):

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


Comment:

 I've looked at the patches proposed to fix this ticket. They are not
 needed after the app-loading refactor. See
 6b172a6d6dcfe88be4dc0e5052707a756c1c830c and follow-up commits that
 touched `django/core/management/__init__.py`.

 If you're still seeing this problem, please check that it happens with
 Django 1.7 (RC3 at this time) and open a new ticket -- that will be more
 convenient than reopening a 4 years old ticket. Thanks!

--
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/069.b76d4d9415da9ffde16aed4574443052%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #2225: 'manage.py sql ...' gets confused when using tables from separate apps

2014-07-30 Thread Django
#2225: 'manage.py sql ...' gets confused when using tables from separate apps
-+-
 Reporter:  Lucas Hazel  |Owner:
 Type:  defect   |  glassresistor
Component:  Database layer   |   Status:  new
  (models, ORM)  |  Version:  master
 Severity:  minor|   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by domonique.carter@…):

 * status:  closed => new
 * ui_ux:   => 0
 * resolution:  fixed =>
 * easy:   => 0


Comment:

 Replying to [comment:10 russellm]:
 > I'm pretty sure this problem doesn't exist anymore.


 I am actually still getting the error from sqlall. I type in python
 manage.py sqlall data user. data and user are both applications. One of
 the models in user references a model in data. From my understanding of
 the previous statements; syncdb actually just adds the alter statement to
 the create statement. Is that a correct interpretation.

-- 
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/069.bf6d2c197806200faf4c59a51e9fec2c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #2225: 'manage.py sql ...' gets confused when using tables from separate apps

2010-10-04 Thread Django
#2225: 'manage.py sql ...' gets confused when using tables from separate apps
---+
  Reporter:  Lucas Hazel   | Owner:  
glassresistor
Status:  closed| Milestone: 
  
 Component:  Database layer (models, ORM)  |   Version:  SVN
  
Resolution:  fixed |  Keywords: 
  
 Stage:  Accepted  | Has_patch:  1  
  
Needs_docs:  0 |   Needs_tests:  1  
  
Needs_better_patch:  0 |  
---+
Changes (by russellm):

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

Comment:

 I'm pretty sure this problem doesn't exist anymore.

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #2225: 'manage.py sql ...' gets confused when using tables from separate apps

2010-09-11 Thread Django
#2225: 'manage.py sql ...' gets confused when using tables from separate apps
---+
  Reporter:  Lucas Hazel   | Owner:  
glassresistor
Status:  new   | Milestone: 
  
 Component:  Database layer (models, ORM)  |   Version:  SVN
  
Resolution:|  Keywords: 
  
 Stage:  Accepted  | Has_patch:  1  
  
Needs_docs:  0 |   Needs_tests:  1  
  
Needs_better_patch:  0 |  
---+
Changes (by glassresistor):

  * needs_docs:  1 => 0

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #2225: 'manage.py sql ...' gets confused when using tables from separate apps

2010-09-11 Thread Django
#2225: 'manage.py sql ...' gets confused when using tables from separate apps
---+
  Reporter:  Lucas Hazel   | Owner:  
glassresistor
Status:  new   | Milestone: 
  
 Component:  Database layer (models, ORM)  |   Version:  SVN
  
Resolution:|  Keywords: 
  
 Stage:  Accepted  | Has_patch:  1  
  
Needs_docs:  1 |   Needs_tests:  1  
  
Needs_better_patch:  0 |  
---+
Changes (by glassresistor):

  * owner:  nobody => glassresistor
  * needs_better_patch:  1 => 0

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #2225: 'manage.py sql ...' gets confused when using tables from separate apps

2009-12-13 Thread Django
#2225: 'manage.py sql ...' gets confused when using tables from separate apps
---+
  Reporter:  Lucas Hazel   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  1 |   Needs_tests:  1 
Needs_better_patch:  1 |  
---+
Changes (by glassresistor):

  * owner:  glassresistor => nobody
  * needs_better_patch:  0 => 1
  * has_patch:  0 => 1
  * needs_tests:  0 => 1
  * needs_docs:  0 => 1

Comment:

 To fix this problem I had to create a new BaseCommand extension so that
 unlike AppCommand CrossAppCommand looks at all of the models in the
 project so the table references across multiple apps will have sane
 outputs which can be piped into an sql database.

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.




Re: [Django] #2225: 'manage.py sql ...' gets confused when using tables from separate apps

2009-12-13 Thread Django
#2225: 'manage.py sql ...' gets confused when using tables from separate apps
---+
  Reporter:  Lucas Hazel   | Owner:  
glassresistor
Status:  new   | Milestone: 
  
 Component:  Database layer (models, ORM)  |   Version:  SVN
  
Resolution:|  Keywords: 
  
 Stage:  Accepted  | Has_patch:  0  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Comment (by glassresistor):

 After looked through the logs from a postgres 8.4 database I found that
 the actual queries used to create the 3 tables above through syncdb does
 not include the alter statement but instead is just a part of the create
 statement.  Syncdb seems to check the full project space while sql,
 sqlall, sqlreset, since they take in apps as arguments loop through the
 listed apps and inside that, loops through models internal to the apps
 themselves.  I propose that sqls behaviour be changed such that the models
 list get concatenated such that sql would in the case of sql app2 spit out
 -- The following references should be added but depend on non-existent
 tables:
 but sql app1 app2 would spit out Create table statements without
 mentioning an alter which doesn't get done.

 {{{
 618-2009-12-13 10:27:27 EST LOG:  statement: CREATE TABLE "app1_a" (
 619-"id" serial NOT NULL PRIMARY KEY,
 620-"article_body" text NOT NULL
 621-)
 622-;
 623-2009-12-13 10:27:27 EST LOG:  statement: CREATE TABLE "app1_c" (
 624-"id" serial NOT NULL PRIMARY KEY,
 625-"key_id" integer NOT NULL REFERENCES "app1_a" ("id")
 DEFERRABLE INITIALLY DEFERRED
 626-)
 627-;
 628:2009-12-13 10:27:27 EST LOG:  statement: CREATE TABLE "app2_b" (
 629-"id" serial NOT NULL PRIMARY KEY,
 630-"a_id" integer NOT NULL REFERENCES "app1_a" ("id") DEFERRABLE
 INITIALLY DEFERRED
 631-)
 632-;
 }}}

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.




Re: [Django] #2225: 'manage.py sql ...' gets confused when using tables from separate apps

2009-12-12 Thread Django
#2225: 'manage.py sql ...' gets confused when using tables from separate apps
---+
  Reporter:  Lucas Hazel   | Owner:  
glassresistor
Status:  new   | Milestone: 
  
 Component:  Database layer (models, ORM)  |   Version:  SVN
  
Resolution:|  Keywords: 
  
 Stage:  Accepted  | Has_patch:  0  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Changes (by anonymous):

  * owner:  anonymous => glassresistor
  * status:  assigned => new

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.




Re: [Django] #2225: 'manage.py sql ...' gets confused when using tables from separate apps

2009-12-12 Thread Django
#2225: 'manage.py sql ...' gets confused when using tables from separate apps
---+
  Reporter:  Lucas Hazel   | Owner:  anonymous
Status:  assigned  | Milestone:   
 Component:  Database layer (models, ORM)  |   Version:  SVN  
Resolution:|  Keywords:   
 Stage:  Accepted  | Has_patch:  0
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Changes (by glassresis...@gmail.com):

  * owner:  nobody => anonymous
  * status:  new => assigned

Comment:

 Came across this today looking for an easy bug fix.  I can confirm that
 the error still exists in the current trunk, that syncdb does work even
 though sql implies that it will not work.  Below I have the output for 3
 models in 2 apps the foreign key inside model C has no errors but model B
 which is in a different app isn't aware of table app1_a's existance.

 Should be able to copy how reference checking works inside apps and extend
 it to check other apps as well within the sql management command in the
 same way syncdb does this, unless its just coincidental that app1_a gets
 created before app2_b and then syncdb will also need some reworking.

 {{{
 (svn)m...@vsolanis:~/django/testtables$ python ./manage.py sql app1 app2
 BEGIN;
 CREATE TABLE "app1_a" (
 "id" serial NOT NULL PRIMARY KEY,
 "article_body" text NOT NULL
 )
 ;
 CREATE TABLE "app1_c" (
 "id" serial NOT NULL PRIMARY KEY,
 "key_id" integer NOT NULL REFERENCES "app1_a" ("id") DEFERRABLE
 INITIALLY DEFERRED
 )
 ;
 CREATE TABLE "app2_b" (
 "id" serial NOT NULL PRIMARY KEY,
 "a_id" integer NOT NULL
 )
 ;
 -- The following references should be added but depend on non-existent
 tables:
 -- ALTER TABLE "app2_b" ADD CONSTRAINT "a_id_refs_id_ea2536ff" FOREIGN KEY
 ("a_id") REFERENCES "app1_a" ("id") DEFERRABLE INITIALLY DEFERRED;
 COMMIT;

 }}}

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.