Try to recreate the table in sqlite too,  because doesn't reflect you
schema in define_table

there is a "status" field not present in the definition and is
"modified_on" ismissing.



On Mon, Mar 2, 2020 at 8:19 PM Jörg Schneider <softw...@jomajobe.de> wrote:

> I tried to migrate from sqlite database to mysql/mariadb but following the
> instructions on
> https://realpython.com/web2py-migrating-from-sqlite-to-mysql/ didn't work
> for me, because of different database scheme created by dal on mysql
> database. Unfortunately "fake_migrate=True" didn't work either.
>
> For example:
>
> db.define_table('repo',
>                 Field('title', requires=IS_NOT_EMPTY(), label='Liedtitel'),
>                 Field('composer', default='unbekannt', label='Komponist'),
>                 Field('lyrics', label='Liedtext'),
>                 Field('arrangement', label='Liedsatz'),
>                 Field('biblical', label='Bibelstelle'),
>                 Field('genre', 'reference repository_genre', default='2'),
>                 Field('purpose',requires=IS_IN_SET(PURPOSES),
> default=PURPOSES[0], label='Satz für'),
>                 Field('pdf', 'upload',
> uploadfolder=os.path.join(request.folder, 'static/repository'),
> label='PDF-Datei'),
>                 Field('transl', type='text', label='Übersetzung'),
>                 Field('transl_file', 'upload',
> uploadfolder=os.path.join(request.folder, 'static/repository'),
> label='Anhang zur Übersetzung'),
>                 auth.signature,
>                 format='%(title)s %(composer)s'
>                )
>
> has following table in *sqlite*:
>
>
>    1. id
>    2. title
>    3. composer
>    4. lyrics
>    5. arrangement
>    6. *genre*
>    7.
> *pdf *
>    8.
> *transl *
>    9.
> *transl_file *
>    10.
> *status *
>    11.
> *purpose *
>    12.
> *biblical *
>    13.
> *modified_by *
>    14.
> *created_by *
>    15.
> *created_on *
>
>
> which has other order than created on the *mysql* table:
>
>
>    1. id
>    2. title
>    3. composer
>    4. lyrics
>    5. arrangement
>    6. biblical
>    7. genre
>    8. purpose
>    9. pdf
>    10. transl
>    11. transl_file
>    12. created_on
>    13. created_by
>    14. modified_on
>    15. modified_by
>
> --
> 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 web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/551c1d7c-7a06-4592-b9ba-1bc2f5601438%40googlegroups.com
> <https://groups.google.com/d/msgid/web2py/551c1d7c-7a06-4592-b9ba-1bc2f5601438%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Massimiliano

-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CANPTPx%2Be%3DQ3_iyP-Dc50OYOuXWtBBmP5wczhHXf5j3UTF9xrLQ%40mail.gmail.com.

Reply via email to