Don't use MySQL but try setting the migrate=False in the DAL creation 
(usually in models/db.py).
And add migrate=True to all your own tables (eg. products).


quarta-feira, 15 de Maio de 2019 às 12:53:05 UTC+1, Ron Chatterjee escreveu:
>
>
> Hello all,
>
> In PA I am running this app with an existing mysql database and I am 
> having migration issue. 
>
> If I run the db.py with db.migrate, it says 
> 1050, "Table 'auth_user' already exists
>
> If I run the table with migrate=False, and fake_migrate = True I get 
> another error:
>
> mytable.products' doesn't exist"
>
>
> Products table below is not being generated in the mysql database. I did 
> show tables and its not being populated. 
>
>
>  db.py
> -------------
>     db = DAL(configuration.get('db.uri'),
>              pool_size=configuration.get('db.pool_size'),
>              migrate_enabled=configuration.get('db.migrate'),
>              check_reserved=['all'])
>
>
>
>
> db.define_table("products",
>                 Field("product_title", "string", requires=IS_NOT_EMPTY() 
> ,label='Product Title'),
>                 Field('Product_discription', 
> 'text',requires=IS_NOT_EMPTY(),label='Product Discription'),
>                 Field("product_image", 'upload', label="Product Image"),
>                 Field("product_document", "upload", label='Product PDF 
> Document'),
>                 Field('product_video', requires=IS_EMPTY_OR(IS_URL())),
>                 auth.signature)
>
>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/744f67b3-2dc7-45f1-97a4-8a96253081f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to