So a buddy of mine and I have been experimenting with web2py and from the start its great! The only issue we have is using it with existing db(s)... Is there a way to use it easily with an existing db? I have found a few workarounds, like to create your DB layer on a new db and import your old db into the new one. This seems to be clunky and takes time... We would like to be able to hook-up and go!
Thanks!
Answers (1)
Comments (1)
0
anthony 10 years ago
If your tables use auto-incrementing integer fields as primary keys, then there is no problem using the DAL to model your database -- you just have to set the primary key field to be of type "id". Otherwise, you can create keyed tables, but there will be some limitations. See http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Legacy-databases-and-keyed-tables.