List Info

Thread: manage.py sql not committing?




manage.py sql not committing?
user name
2006-03-15 02:10:40
hi list,

using mysql 5.0 and python 2.4 on winxp pro

i'm calling manage.py sql myproject, and all of the sql
scrolls by with
no errors but the tables aren't being created in the db. 
i've called
manage.py sql init, and that worked fine.  my project.app is
listed in
INSTALLED_APPS

sql looks similar to:
BEGIN;
CREATE TABLE `foo` (
    `id` mediumint(9) unsigned auto_increment NOT NULL
PRIMARY KEY,
    `name` varchar(255) NOT NULL
);
COMMIT;

yet the table is not created.
calling manage.py sqlall myproject does the same thing.  
any ideas?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

manage.py sql not committing?
user name
2006-03-15 02:34:32

On 3/15/06, gmail.com">jemmingergmail.com <gmail.com">jemmingergmail.com> wrote:

hi list,

yet the table is not created.
calling manage.py sqlall myproject does the same thing.
any ideas?

The sql and sqlall commands are just printing the SQL to the console. They exist to help debug/preview exactly what is/will be done to the database when other commands are executed, and to provide a starting point for hand-tweaking SQL for legacy cases.

If you run 'manager.py install myproject', this will take the SQL output of sqlall, and actually commit it to the database.

Alternatively, you can take the output of sqlall, and manually pipe it into your sql shell (copy and paste contents into a sql prompt, or use a pipe/redirect at a command prompt).

Hope this helps,
Russ Magee %-)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users"; group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to django-users-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

manage.py sql not committing?
user name
2006-03-15 02:54:45
ah, yes i glossed over that... thank you


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )