Re: [Django] #12976: manage.py sqlflush issues to many 'ALTER' when using multiple mysql databases.

2010-03-01 Thread Django
#12976: manage.py sqlflush issues to many 'ALTER'  when using multiple mysql
databases.
---+
  Reporter:  pczapla   | Owner:  nobody  
Status:  new   | Milestone:  1.2 
 Component:  Database layer (models, ORM)  |   Version:  1.2-beta
Resolution:|  Keywords:  mysql   
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  1   
Needs_better_patch:  0 |  
---+
Changes (by jacob):

  * stage:  Unreviewed => Accepted

-- 
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] #12976: manage.py sqlflush issues to many 'ALTER' when using multiple mysql databases.

2010-03-01 Thread Django
#12976: manage.py sqlflush issues to many 'ALTER'  when using multiple mysql
databases.
---+
  Reporter:  pczapla   | Owner:  nobody  
Status:  new   | Milestone:  1.2 
 Component:  Database layer (models, ORM)  |   Version:  1.2-beta
Resolution:|  Keywords:  mysql   
 Stage:  Unreviewed| Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  1   
Needs_better_patch:  0 |  
---+
Changes (by pczapla):

  * needs_better_patch:  => 0
  * has_patch:  0 => 1
  * needs_tests:  => 1
  * needs_docs:  => 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.



[Django] #12976: manage.py sqlflush issues to many 'ALTER' when using multiple mysql databases.

2010-02-26 Thread Django
#12976: manage.py sqlflush issues to many 'ALTER'  when using multiple mysql
databases.
--+-
 Reporter:  pczapla   |   Owner:  nobody
   Status:  new   |   Milestone:  1.2   
Component:  Database layer (models, ORM)  | Version:  1.2-beta  
 Keywords:  mysql |   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 In a brief when I have two databases with different sets of models the
 sqlflush statement output ALTER TABLE .. AUTO_INCREMENT = 1; for all
 tables in an application.
 The TRUNCATE commands are issued for the right tables.

 The problem is quite importan for us as it breaks the test command.

 I've created an application that demonstrate the problem. It has two
 databases: 'default' and 'second' and two models:
 'ModelOnTheDefaultDB', 'ModelOnTheSecondDB'.

 Here is how the output of syncdb and sqlflush looks like:
 {{{
 $ python manage.py syncdb
 Creating table test_app_modelonthedefaultdb

 $ python manage.py syncdb --database='second'
 Creating table test_app_modelontheseconddb

 $ python manage.py sqlflush
 BEGIN;
 SET FOREIGN_KEY_CHECKS = 0;
 TRUNCATE `test_app_modelonthedefaultdb`;
 SET FOREIGN_KEY_CHECKS = 1;
 ALTER TABLE `test_app_modelonthedefaultdb` AUTO_INCREMENT = 1;
 ALTER TABLE `test_app_modelontheseconddb` AUTO_INCREMENT = 1;  -- This
 alter table should not be here
 COMMIT;

 $ python manage.py sqlflush --database='second'
 BEGIN;
 SET FOREIGN_KEY_CHECKS = 0;
 TRUNCATE `test_app_modelontheseconddb`;
 SET FOREIGN_KEY_CHECKS = 1;
 ALTER TABLE `test_app_modelonthedefaultdb` AUTO_INCREMENT = 1; -- This
 alter table should not be here
 ALTER TABLE `test_app_modelontheseconddb` AUTO_INCREMENT = 1;
 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.