[web2py] Re: table auth_user already exists

2012-07-26 Thread Niphlod
all of this instead of migrate=False where you know a table already exist ? On Thursday, July 26, 2012 5:23:50 PM UTC+2, Chris wrote: > > I've found what seems a simple way to let multiple apps share a DB and > create the same table definitions without conflict. Chris, you may find > this

[web2py] Re: table auth_user already exists

2012-07-26 Thread Chris
I've found what seems a simple way to let multiple apps share a DB and create the same table definitions without conflict. Chris, you may find this useful and also I'd love to hear from the true experts if there are problems with this approach. (It works for me but maybe there are other impli

[web2py] Re: table auth_user already exists

2011-06-27 Thread pbreit
I still need a tutorial on 1) how the .table and sql.log files are used, 2) what exactly migrate and fake_migrate do and 3) how to best resolve broken migrations.

[web2py] Re: table auth_user already exists

2011-06-27 Thread Anthony
Note, the 'migrate' and 'fake_migrate' arguments to DAL may not do what you think they should do -- they merely set the 'migrate' and 'fake_migrate' default values for any table definitions that do not explicitly set those arguments -- if a table explicitly sets one or both of those arguments, t

[web2py] Re: table auth_user already exists

2011-06-27 Thread Christopher Baron
Ok, auth.define_tables( migrate=False ) seems to fix it, but what happens when a future web2py update changes the auth tables ? On Jun 27, 3:09 pm, Christopher Baron wrote: > I've tried > > db = DAL("mysql://%s:%s@%s/%s" % (user, password, host, dbname), > migrate=False) > > and still have the

[web2py] Re: table auth_user already exists

2011-06-27 Thread Massimo Di Pierro
Wait... don't just try this or you messed up more. You first used 'sqlite://...' and it told you "table already exists". Now you need to fix that before you can change database (you changed to "mysql"). On Jun 27, 3:09 pm, Christopher Baron wrote: > I've tried > > db = DAL("mysql://%s:%s@%s/%s"

[web2py] Re: table auth_user already exists

2011-06-27 Thread Christopher Baron
I've tried db = DAL("mysql://%s:%s@%s/%s" % (user, password, host, dbname), migrate=False) and still have the same problem. On Jun 27, 3:07 pm, Christopher Baron wrote: > I upgraded via the admin update link and received an error, so I went > ahead and downloaded the source. > > Regarding the m

[web2py] Re: table auth_user already exists

2011-06-27 Thread Massimo Di Pierro
Try this: db = DAL('sqlite://storage.db', migrate=True, fake_migrate=True) if everything works than your .table files are correct, remove migrate=True, fake_migrate=True and you should be fine. On Jun 27, 3:07 pm, Christopher Baron wrote: > I upgraded via the admin update link and received an e

[web2py] Re: table auth_user already exists

2011-06-27 Thread Christopher Baron
I upgraded via the admin update link and received an error, so I went ahead and downloaded the source. Regarding the migration techniques, the exception is being thrown on creating web2py auth tables - specifically the following line of code : auth.define_tables() Shouldn't web2py handle this fo