On Thursday, January 19, 2017 at 6:26:44 AM UTC-8, Andrea Fae' wrote: > > morevoer I want to rename the name of auth tables files but this tables > are totally standard...I have to modify db.py? > > Il giorno giovedì 19 gennaio 2017 15:07:38 UTC+1, Andrea Fae' ha scritto: >> >> It's not working. I want to rename the name of the tables but in >> production I don't want this tables. thanks >> >> What is the goal of what you're trying to do?
Is this a case of starting with one schema of the database and finding that you need a different one? If there's a radical change in the schema, but you have data you want to preserve, perhaps what you should do is export that data, make a backup just in case, and then delete everything from yourapp/databases. This will result in a new sqlite file (I think you said you were using sqlite) as well as table files, and when you have database looking the way it needs to be, you can massage the exported data and import it into the new tables. /dps > Il giorno mercoledì 18 gennaio 2017 18:21:06 UTC+1, Richard ha scritto: >>> >>> databases/*files are the "memory" of web2py to know which tables have >>> been created in the backend and which have not... If you delete it, web2py >>> think the related table is not defined in the backend and will try to >>> create it, which will lead to the error message you have as the table is >>> already created in your sqlite database... >>> >>> To fix that you have to migrate=false and fake_migrate=True then set >>> back migrate=True between these change you have to make a page reload (any >>> page) of you app... It will force web2py to reanalyse and sync web2py with >>> the backend. >>> >>> Note: In production, you should set migrate to false.... >>> >>> Richard >>> >>> On Wed, Jan 18, 2017 at 11:22 AM, Andrea Fae' <[email protected]> wrote: >>> >>>> Why if I delete xxxxxxxxxxxx.table files and log file inside database >>>> folder sqlite I have this error? sqlite is or not a only one file? Is it >>>> something regarding migrate=true or false? Can I have a better explanation >>>> than the book? Thank you >>>> >>>> -- >>>> Resources: >>>> - http://web2py.com >>>> - http://web2py.com/book (Documentation) >>>> - http://github.com/web2py/web2py (Source code) >>>> - https://code.google.com/p/web2py/issues/list (Report Issues) >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "web2py-users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

